added rotation
This commit is contained in:
@@ -33,8 +33,9 @@ public class BlockPlaceListener implements Listener {
|
||||
}
|
||||
|
||||
PixelBlock pixelBlock = new PixelBlock(newBlockLocation, event.getPlayer().getUniqueId(), UUID.fromString(event.getItemInHand().getItemMeta().getItemName()));
|
||||
if(pixelBlock.place(newBlockLocation)) {
|
||||
if(pixelBlock.place(newBlockLocation, PixelBlock.vectorToDirection(event.getPlayer().getLocation().getDirection()))) {
|
||||
event.getPlayer().getInventory().remove(event.getItemInHand());
|
||||
System.out.println(event.getPlayer().getLocation().getDirection());
|
||||
} else {
|
||||
event.getPlayer().sendMessage("Hier wurde bereits ein Pixelblock plaziert.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user