patch error on no entity in list
This commit is contained in:
parent
395749b312
commit
1febc27d67
1 changed files with 7 additions and 0 deletions
|
@ -2,6 +2,7 @@ package me.unurled.sacredrealms.sr.commands.admin;
|
||||||
|
|
||||||
import static me.unurled.sacredrealms.sr.utils.Component.NOT_PLAYER;
|
import static me.unurled.sacredrealms.sr.utils.Component.NOT_PLAYER;
|
||||||
import static me.unurled.sacredrealms.sr.utils.Component.comp;
|
import static me.unurled.sacredrealms.sr.utils.Component.comp;
|
||||||
|
import static me.unurled.sacredrealms.sr.utils.Component.textComp;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -25,6 +26,12 @@ public class EntityTypeCommand implements TabExecutor {
|
||||||
sender.sendMessage(comp(NOT_PLAYER));
|
sender.sendMessage(comp(NOT_PLAYER));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
EntityManager em = Manager.getInstance(EntityManager.class);
|
||||||
|
if (em.getTypes().isEmpty()) {
|
||||||
|
sender.sendMessage(textComp("There are no entity types to display."));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Window window =
|
Window window =
|
||||||
Window.single().setViewer(p).setTitle(args[1]).setGui(EntityTypeGUI.listGui()).build();
|
Window.single().setViewer(p).setTitle(args[1]).setGui(EntityTypeGUI.listGui()).build();
|
||||||
window.open();
|
window.open();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue