Update wrong permission being used.

This commit is contained in:
alexcrea 2024-03-19 02:54:49 +01:00
parent c6bc94604c
commit d3f7776908
2 changed files with 3 additions and 3 deletions

View file

@ -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){
@ -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

View file

@ -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