You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewIllegalArgumentException("Location " + location.getX() + ", " + location.getY() + ", " + location.getZ() + " " + " in world " + world.getName() + " is not loaded. Use CustomBlockPlaceOption.LOAD_CHUNK to load it automatically.");
244
250
}
245
251
}
246
252
247
-
if (!WorldSelection.isDestructible(originalType)) {
248
-
if (replaceIndestructible) {
253
+
Blockblock = location.getBlock();
254
+
MaterialoriginalType = block.getType();
255
+
256
+
if (!WorldSelection.isEphemeral(originalType)) {
257
+
if (breakSolidMaterial) {
249
258
block.setType(centralMaterial);
250
259
} else {
251
-
returnnull;
260
+
thrownewIllegalArgumentException("Cannot place custom block at " + location.getBlockX() + ", " + location.getBlockY() + ", " + location.getBlockZ() + " in world " + world.getName() + " because the block is solid and CustomBlockPlaceOption.BREAK_SOLID_MATERIAL is not set.");
252
261
}
253
262
} else {
254
263
block.setType(centralMaterial);
@@ -259,15 +268,15 @@ public CustomBlock placeBlock(@NotNull AbstractCustomBlock abstractCustomBlock,
thrownewIllegalArgumentException("Cannot place custom block at " + location.getBlockX() + ", " + location.getBlockY() + ", " + location.getBlockZ() + " in world " + world.getName() + " because a custom block is already present at this location. Use CustomBlockPlaceOption.REPLACE_CUSTOM_BLOCK to replace it.");
@@ -297,7 +306,7 @@ public CustomBlock placeBlock(@NotNull AbstractCustomBlock abstractCustomBlock,
297
306
298
307
if (displays.isEmpty()) {
299
308
block.setType(originalType);
300
-
ChatUtil.log("&6[BlockDisplayCreator] &4Something went wrong, custom block at location " + location.getBlockX() + " " + location.getBlockY() + " " + location.getBlockZ() + " in %s world was not placed due to missing display entities. You may have specified the spawn command incorrectly.", location.getWorld().getName());
309
+
ChatUtil.log("&6[BlockDisplayCreator] &4Something went wrong, custom block at location " + location.getBlockX() + " " + location.getBlockY() + " " + location.getBlockZ() + " in %s world was not placed due to missing display entities. You may have specified the spawn command incorrectly.", world.getName());
301
310
returnnull;
302
311
}
303
312
@@ -411,11 +420,11 @@ public static void applyDisplayTranslationRotation(@NotNull GroupSummoner<Displa
thrownewIllegalArgumentException("Cannot break custom block at " + location.getBlockX() + ", " + location.getBlockY() + ", " + location.getBlockZ() + " in world " + location.getWorld().getName() + " because no custom block is present at this location.");
0 commit comments