Create GameModeExtensions.kt

This commit is contained in:
bluefireoly
2020-06-27 00:10:13 +02:00
parent caeac3f733
commit 628c229a1a

View File

@@ -0,0 +1,11 @@
package net.axay.kspigot.extensions.bukkit
import org.bukkit.GameMode
val GameMode.isDamageable: Boolean
get() = when (this) {
GameMode.SURVIVAL -> true
GameMode.ADVENTURE -> true
GameMode.SPECTATOR -> false
GameMode.CREATIVE -> false
}