Do not loop what is not needed

This commit is contained in:
Fabrizio La Rosa 2020-07-07 09:18:11 +02:00 committed by Brianna
parent 20fbbf176c
commit e019d3febd
1 changed files with 1 additions and 1 deletions

View File

@ -33,8 +33,8 @@ public class CommandGiveSpawner extends AbstractCommand {
}
EntityType type = null;
String input = args[1].toUpperCase().replace("_", "").replace(" ", "");
for (EntityType types : EntityType.values()) {
String input = args[1].toUpperCase().replace("_", "").replace(" ", "");
String compare = types.name().toUpperCase().replace("_", "").replace(" ", "");
if (input.equals(compare))
type = types;