Skip to content

Commit

Permalink
Fix issues with non-op players not being able to use enchantments
Browse files Browse the repository at this point in the history
Closes #2
  • Loading branch information
Geolykt committed Sep 1, 2020
1 parent fa9d3fe commit 51ecb44
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.geolykt</groupId>
<artifactId>enchantments-plus</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public void onCommand(PlayerCommandPreprocessEvent event) {
// probability, and the level at which the item is being enchanted if the player has permission
@EventHandler
public void onEnchantItem(EnchantItemEvent evt) {
if (!evt.getEnchanter().hasPermission("enchantments_plus.enchant.get")) {
if (!evt.getEnchanter().hasPermission("enchplus.enchant.get")) {
return;
}
if (evt.getItem().getType() == FISHING_ROD && evt.getExpLevelCost() <= 4) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public static BlockFace getCardinalDirection(float yaw, float pitch) {
// Returns true if a player can use a certain enchantment at a certain time (permissions and cooldowns),
// otherwise false
public static boolean canUse(Player player, int enchantmentID) {
if (!player.hasPermission("enchantments_plus.enchant.use")) {
if (!player.hasPermission("enchplus.enchant.use")) {
return false;
}
if (EnchantPlayer.matchPlayer(player).getCooldown(enchantmentID) != 0) {
Expand Down

0 comments on commit 51ecb44

Please sign in to comment.