code refactoring
This commit is contained in:
parent
ffbdf2e367
commit
bcb1fa2e56
5 changed files with 45 additions and 28 deletions
|
@ -42,7 +42,7 @@ public class EntityTypeCommand implements TabExecutor {
|
|||
}
|
||||
if (args.length < 3) {
|
||||
EntityManager em = Manager.getInstance(EntityManager.class);
|
||||
if (!em.getTypes().stream().map(SREntityType::getID).toList().contains(args[1])) {
|
||||
if (!em.getTypes().stream().map(SREntityType::getId).toList().contains(args[1])) {
|
||||
sender.sendMessage("Invalid entity type.");
|
||||
return true;
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ public class EntityTypeCommand implements TabExecutor {
|
|||
}
|
||||
if (args.length == 2) {
|
||||
return Manager.getInstance(EntityManager.class).getTypes().stream()
|
||||
.map(SREntityType::getID)
|
||||
.map(SREntityType::getId)
|
||||
.toList();
|
||||
}
|
||||
if (args.length == 3 && (args[0].equalsIgnoreCase("edit"))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue