mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 07:02:18 -07:00
Add API to get/set inhabited time of a Chunk
This commit is contained in:
@@ -199,6 +199,18 @@ public class CraftChunk implements Chunk {
|
|||||||
return getWorld().getPluginChunkTickets(getX(), getZ());
|
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
|
@Override
|
||||||
public ChunkSnapshot getChunkSnapshot() {
|
public ChunkSnapshot getChunkSnapshot() {
|
||||||
return getChunkSnapshot(true, false, false);
|
return getChunkSnapshot(true, false, false);
|
||||||
|
Reference in New Issue
Block a user