mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 18:27:17 +01:00
Implemented entity age methods
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
9ad2b97138
commit
e2369da502
1 changed files with 11 additions and 0 deletions
|
@ -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 a new issue