mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 02:55:47 +01:00
Start of update() + added sign
This commit is contained in:
parent
08a62e37ac
commit
55e9522955
@ -143,4 +143,20 @@ public class CraftBlockState implements BlockState {
|
||||
public Block getBlock() {
|
||||
return world.getBlockAt(x, y, z);
|
||||
}
|
||||
|
||||
public boolean update() {
|
||||
return update(false);
|
||||
}
|
||||
|
||||
public boolean update(boolean force) { // TODO
|
||||
Block block = getBlock();
|
||||
|
||||
synchronized (block) {
|
||||
if (block.getType() != this.getType()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
27
src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
Normal file
27
src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
package org.bukkit.craftbukkit.block;
|
||||
|
||||
import org.bukkit.Block;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Sign;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
|
||||
public class CraftSign extends CraftBlockState implements Sign {
|
||||
public CraftSign(final CraftWorld world, final int x, final int y, final int z, final int type, final byte data) {
|
||||
super(world, x, y, z, type, data);
|
||||
}
|
||||
|
||||
public String[] getLines() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
public String getLine(int index) throws IndexOutOfBoundsException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
public void setLine(int index, String line) throws IndexOutOfBoundsException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user