mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Update wrong permission being used.
This commit is contained in:
parent
c6bc94604c
commit
d3f7776908
2 changed files with 3 additions and 3 deletions
|
|
@ -55,7 +55,7 @@ class AnvilEventListener : Listener {
|
||||||
|
|
||||||
// Should find player
|
// Should find player
|
||||||
val player = event.view.player
|
val player = event.view.player
|
||||||
if(!player.hasPermission(CustomAnvil.unsafePermission)) return
|
if(!player.hasPermission(CustomAnvil.affectedByPluginPermission)) return
|
||||||
|
|
||||||
// Test rename lonely item
|
// Test rename lonely item
|
||||||
if(second == null){
|
if(second == null){
|
||||||
|
|
@ -154,7 +154,7 @@ class AnvilEventListener : Listener {
|
||||||
@EventHandler(ignoreCancelled = true)
|
@EventHandler(ignoreCancelled = true)
|
||||||
fun anvilExtractionCheck(event: InventoryClickEvent) {
|
fun anvilExtractionCheck(event: InventoryClickEvent) {
|
||||||
val player = event.whoClicked as? Player ?: return
|
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
|
val inventory = event.inventory as? AnvilInventory ?: return
|
||||||
if (event.rawSlot != ANVIL_OUTPUT_SLOT) { return }
|
if (event.rawSlot != ANVIL_OUTPUT_SLOT) { return }
|
||||||
val output = inventory.getItem(ANVIL_OUTPUT_SLOT) ?: return
|
val output = inventory.getItem(ANVIL_OUTPUT_SLOT) ?: return
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ class CustomAnvil : JavaPlugin() {
|
||||||
private const val bstatsPluginId = 20923
|
private const val bstatsPluginId = 20923
|
||||||
|
|
||||||
// Permission string required to use the plugin's features
|
// 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
|
// Permission string required to bypass enchantment conflicts test
|
||||||
const val bypassFusePermission = "ca.bypass.fuse"
|
const val bypassFusePermission = "ca.bypass.fuse"
|
||||||
// Permission string required to bypass enchantment conflicts test
|
// Permission string required to bypass enchantment conflicts test
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue