mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Implemented entity age methods
This commit is contained in:
1 parent
ac0641887b
commit
af1838305c
1 file changed
+11
@@ -286,4 +286,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user