Fix "egg overwritten" debug message
Missing a check for non-empty list before sending message. No egg item is actually spawned.
This commit is contained in:
parent
fa1845d192
commit
b314f5e6f3
1 changed files with 5 additions and 3 deletions
|
|
@ -155,10 +155,12 @@ public class EggDestroyListener implements Listener {
|
|||
//that means editing the list does not change which blocks are actually affected by the event
|
||||
//as a workaround, allow egg blocks to be destroyed, but respawn the egg as an item
|
||||
|
||||
for (Block egg : eggs) {
|
||||
EggController.spawnEggItem(egg.getLocation(), config, data);
|
||||
if (!eggs.isEmpty()) {
|
||||
for (Block egg : eggs) {
|
||||
EggController.spawnEggItem(egg.getLocation(), config, data);
|
||||
}
|
||||
logger.log("Egg overwritten by the end spawn platform, spawning egg item at block location");
|
||||
}
|
||||
logger.log("Egg overwritten by the end spawn platform, spawning egg item at block location");
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue