13
0
geforkt von Mirrors/Paper

Implemented entity age methods

By: Nathan Adams <dinnerbone@dinnerbone.com>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2011-10-11 02:23:10 +01:00
Ursprung 9ad2b97138
Commit e2369da502

Datei anzeigen

@ -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;
}
}