mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-26 02:49:44 -05:00
Clarify exception message for bad hanging location. Fixes BUKKIT-4824
This change adds the location and a more specific message to the IllegalArgumentException that gets thrown when a hanging entity is being spawned in a location that it cannot survive.
This commit is contained in:
1 parent
90e8aa008a
commit
cfa5490a58
1 file changed
+1
-1
@@ -999,7 +999,7 @@ public class CraftWorld implements World {
|
||||
}
|
||||
|
||||
if (entity != null && !((EntityHanging) entity).survives()) {
|
||||
entity = null;
|
||||
throw new IllegalArgumentException("Cannot spawn hanging entity for " + clazz.getName() + " at " + location);
|
||||
}
|
||||
} else if (TNTPrimed.class.isAssignableFrom(clazz)) {
|
||||
entity = new EntityTNTPrimed(world, x, y, z, null);
|
||||
|
||||
Reference in new issue
Block a user