mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
rebase on new update
This commit is contained in:
parent
f97e3c937d
commit
c1d67a3821
7 changed files with 32 additions and 71 deletions
|
|
@ -1,18 +0,0 @@
|
|||
package xyz.alexcrea.cuanvil.util
|
||||
|
||||
import org.bukkit.inventory.meta.Damageable
|
||||
|
||||
// I LOVE support of old versions and needing to do modules like that
|
||||
// That truly is my favorite activity
|
||||
// TODO clean this one of legacy removal branch
|
||||
object MaxDamageCheckerUtil {
|
||||
|
||||
/**
|
||||
* @return max damage or int max if not set
|
||||
*/
|
||||
fun getMaxDamage(meta: Damageable): Int {
|
||||
if(!meta.hasMaxDamage()) return Integer.MAX_VALUE
|
||||
return meta.maxDamage
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue