mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 11:38:29 +01:00
Implemented entity age methods
This commit is contained in:
parent
ac0641887b
commit
af1838305c
@ -286,4 +286,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getTicksLived() {
|
||||||
|
return getHandle().ticksLived;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTicksLived(int value) {
|
||||||
|
if (value <= 0) {
|
||||||
|
throw new IllegalArgumentException("Age must be at least 1 tick");
|
||||||
|
}
|
||||||
|
getHandle().ticksLived = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user