diff --git a/src/main/java/eu/mhsl/minecraft/pixelblocks/listeners/PlacePixelBlockListener.java b/src/main/java/eu/mhsl/minecraft/pixelblocks/listeners/PlacePixelBlockListener.java index bf73dae..35387ab 100644 --- a/src/main/java/eu/mhsl/minecraft/pixelblocks/listeners/PlacePixelBlockListener.java +++ b/src/main/java/eu/mhsl/minecraft/pixelblocks/listeners/PlacePixelBlockListener.java @@ -39,43 +39,5 @@ public class PlacePixelBlockListener implements Listener { newBlockLocation, direction ); -// if(!info.hasOwner()) { -// pixelBlock = PixelBlock.createPixelBlock( -// UUID.randomUUID(), -// event.getPlayer().getUniqueId(), -// newBlockLocation, -// Direction.south -// ); -//// pixelBlock = new PixelBlock( -//// newBlockLocation, -//// event.getPlayer().getUniqueId(), -//// UUID.randomUUID(), -//// direction -//// ); -// } else { -// UUID itemUUID = info.id(); -// pixelBlock = PixelBlock.createPixelBlock( -// UUID.randomUUID(), -// even.getUniqueId(), -// playerLocation.toBlockLocation(), -// Direction.south -// ); -//// pixelBlock = Main.pixelBlocks.stream() -//// .filter(block -> block.getBlockUUID().equals(itemUUID)) -//// .findFirst() -//// .orElseGet(() -> new PixelBlock( -//// newBlockLocation, -//// event.getPlayer().getUniqueId(), -//// itemUUID, -//// direction -//// )); -// } -// -// try { -// pixelBlock.place(newBlockLocation, direction); -// } catch (IllegalArgumentException e) { -// event.setCancelled(true); -// event.getPlayer().sendMessage(Component.text(e.getMessage())); -// } } } diff --git a/src/main/java/eu/mhsl/minecraft/pixelblocks/pixelblock/PixelBlock.java b/src/main/java/eu/mhsl/minecraft/pixelblocks/pixelblock/PixelBlock.java index 2fc9068..018ed2f 100644 --- a/src/main/java/eu/mhsl/minecraft/pixelblocks/pixelblock/PixelBlock.java +++ b/src/main/java/eu/mhsl/minecraft/pixelblocks/pixelblock/PixelBlock.java @@ -178,23 +178,6 @@ public class PixelBlock { .execute(); } -// public void place(Location placeLocation, Direction direction) { -// Location newLocation = placeLocation.toBlockLocation(); -// newLocation.setPitch(0); -// newLocation.setYaw(0); -// -// @Nullable PixelBlock blockAtLocation = PixelBlock.getPixelBlockFromPlacedLocation(newLocation); -// if(blockAtLocation != null && blockAtLocation != this) throw new IllegalArgumentException("Es können nicht mehrere Pixelblöcke ineinander platziert werden."); -// -// Main.logger().info(String.format("Placing PixelBlock '%s' at %s", this.blockUUID, placeLocation)); -// this.pixelBlockLocation = newLocation; -// this.facingDirection = direction; -// updateEntities(); -// Main.database.savePixelBlock(this); -// -// this.placeholder = PixelBlockPlaceholder.newPlaceholder(this); -// } - public void destroy(Player destroyedBy) { if(!this.isAccessible) return; if(Main.configuration().onlyBreakableByOwner() && !destroyedBy.getUniqueId().equals(ownerUUID)) {