Skip to content

Commit

Permalink
Update wrong permission being used.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrea committed Mar 19, 2024
1 parent c6bc946 commit d3f7776
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/io/delilaheve/AnvilEventListener.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class AnvilEventListener : Listener {

// Should find player
val player = event.view.player
if(!player.hasPermission(CustomAnvil.unsafePermission)) return
if(!player.hasPermission(CustomAnvil.affectedByPluginPermission)) return

// Test rename lonely item
if(second == null){
Expand Down Expand Up @@ -154,7 +154,7 @@ class AnvilEventListener : Listener {
@EventHandler(ignoreCancelled = true)
fun anvilExtractionCheck(event: InventoryClickEvent) {
val player = event.whoClicked as? Player ?: return
if(!player.hasPermission(CustomAnvil.unsafePermission)) return
if(!player.hasPermission(CustomAnvil.affectedByPluginPermission)) return
val inventory = event.inventory as? AnvilInventory ?: return
if (event.rawSlot != ANVIL_OUTPUT_SLOT) { return }
val output = inventory.getItem(ANVIL_OUTPUT_SLOT) ?: return
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/io/delilaheve/CustomAnvil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CustomAnvil : JavaPlugin() {
private const val bstatsPluginId = 20923

// Permission string required to use the plugin's features
const val unsafePermission = "ca.unsafe"
const val affectedByPluginPermission = "ca.affected"
// Permission string required to bypass enchantment conflicts test
const val bypassFusePermission = "ca.bypass.fuse"
// Permission string required to bypass enchantment conflicts test
Expand Down

0 comments on commit d3f7776

Please sign in to comment.