Visibility changes
This commit is contained in:
@@ -181,6 +181,16 @@ class Crate(
|
||||
return true
|
||||
}
|
||||
|
||||
private fun usePhysicalKey(player: Player) {
|
||||
val itemStack = player.inventory.itemInMainHand
|
||||
if (key.matches(itemStack)) {
|
||||
itemStack.amount -= 1
|
||||
if (itemStack.amount == 0) {
|
||||
itemStack.type = Material.AIR
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal fun addToKeyGUI(builder: MenuBuilder) {
|
||||
builder.setSlot(
|
||||
config.getInt("keygui.row"),
|
||||
@@ -317,16 +327,6 @@ class Crate(
|
||||
return player.profile.read(keysKey)
|
||||
}
|
||||
|
||||
fun usePhysicalKey(player: Player) {
|
||||
val itemStack = player.inventory.itemInMainHand
|
||||
if (key.matches(itemStack)) {
|
||||
itemStack.amount -= 1
|
||||
if (itemStack.amount == 0) {
|
||||
itemStack.type = Material.AIR
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun hasPhysicalKey(player: Player): Boolean {
|
||||
return key.matches(player.inventory.itemInMainHand)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user