Fixed player burial
This commit is contained in:
parent
d479b02246
commit
3b36b74284
@ -84,12 +84,12 @@ public class BuryPlayer extends Core {
|
||||
|
||||
public void Bury(final World world, final int X, final int Y, final int Z, final Player player) {
|
||||
final Location loc = new Location(world, X, Y, Z);
|
||||
loc.getWorld().getBlockAt(X, Y - 1, Z).breakNaturally();
|
||||
loc.getWorld().getBlockAt(X, Y - 2, Z).breakNaturally();
|
||||
loc.getWorld().getBlockAt(X, Y - 3, Z).breakNaturally();
|
||||
loc.getWorld().getBlockAt(X, Y - 1, Z - 1).breakNaturally();
|
||||
loc.getWorld().getBlockAt(X, Y - 2, Z - 1).breakNaturally();
|
||||
loc.getWorld().getBlockAt(X, Y - 3, Z - 1).breakNaturally();
|
||||
loc.getWorld().getBlockAt(X, Y - 1, Z).setType(Material.AIR);
|
||||
loc.getWorld().getBlockAt(X, Y - 2, Z).setType(Material.AIR);
|
||||
loc.getWorld().getBlockAt(X, Y - 3, Z).setType(Material.AIR);
|
||||
loc.getWorld().getBlockAt(X, Y - 1, Z - 1).setType(Material.AIR);
|
||||
loc.getWorld().getBlockAt(X, Y - 2, Z - 1).setType(Material.AIR);
|
||||
loc.getWorld().getBlockAt(X, Y - 3, Z - 1).setType(Material.AIR);
|
||||
player.teleport(new Location(world, X, Y - 3, Z));
|
||||
RegenBlocks(world, X, Y, Z, player.getName());
|
||||
}
|
||||
@ -98,7 +98,7 @@ public class BuryPlayer extends Core {
|
||||
final Location loc = new Location(world, X, Y, Z);
|
||||
final Location signloc = new Location(world, X, Y, Z - 2);
|
||||
final Block signblock = signloc.add(0.0, 0.0, 0.0).getBlock();
|
||||
signblock.setType(Material.matchMaterial("SIGN_POST"));
|
||||
signblock.setType(Material.OAK_SIGN);
|
||||
final Sign sign = (Sign) signblock.getState();
|
||||
sign.setLine(1, playername);
|
||||
sign.update();
|
||||
|
Reference in New Issue
Block a user