Paper/src/main/java/org/bukkit/craftbukkit/CraftChunk.java

50 Zeilen
911 B
Java

2010-12-27 03:13:03 +01:00
package org.bukkit.craftbukkit;
import org.bukkit.Chunk;
2011-01-04 15:17:05 +01:00
import org.bukkit.World;
2010-12-27 03:13:03 +01:00
public class CraftChunk implements Chunk {
2011-01-04 15:17:05 +01:00
private final CraftWorld world;
2010-12-27 03:13:03 +01:00
private final int x;
private final int z;
2011-01-04 15:17:05 +01:00
protected CraftChunk(final CraftWorld world, final int x, final int z) {
this.world = world;
2010-12-27 03:13:03 +01:00
this.x = x;
this.z = z;
}
2011-01-04 15:17:05 +01:00
/**
* Gets the world containing this chunk
*
* @return World
*/
public World getWorld() {
return world;
}
2010-12-27 03:13:03 +01:00
/**
* Gets the X-coordinate of this chunk
*
* @return X-coordinate
*/
public int getX() {
return x;
}
/**
* Gets the Z-coordinate of this chunk
*
* @return Z-coordinate
*/
public int getZ() {
return z;
}
2010-12-29 01:29:18 +01:00
@Override
public String toString() {
return "CraftChunk{" + "x=" + x + "z=" + z + '}';
}
2010-12-27 03:13:03 +01:00
}