Add API to get/set inhabited time of a Chunk

This commit is contained in:
md_5 2019-09-07 16:48:30 +10:00
parent b79a86edeb
commit 023f438cca

View File

@ -199,6 +199,18 @@ public class CraftChunk implements Chunk {
return getWorld().getPluginChunkTickets(getX(), getZ());
}
@Override
public long getInhabitedTime() {
return getHandle().q();
}
@Override
public void setInhabitedTime(long ticks) {
Preconditions.checkArgument(ticks >= 0, "ticks cannot be negative");
getHandle().b(ticks);
}
@Override
public ChunkSnapshot getChunkSnapshot() {
return getChunkSnapshot(true, false, false);