fix NO_PLAYERS policy completion
This commit is contained in:
parent
fa94de734b
commit
9eb5f2cfd3
2 changed files with 9 additions and 3 deletions
|
@ -125,7 +125,8 @@ public class EntityListParser extends EntityParser {
|
|||
|
||||
public Collection<String> getCompletions(CommandEnvironment env) {
|
||||
Collection<String> comp = super.getCompletions(env);
|
||||
comp.add("*");
|
||||
if(this.policy != UserPolicy.NO_PLAYERS)
|
||||
comp.add("*");
|
||||
for(Class<? extends Entity> clazz : EntityRegistry.getAllClasses()) {
|
||||
if(!this.livingOnly || EntityLiving.class.isAssignableFrom(clazz))
|
||||
comp.add(EntityRegistry.getEntityString(clazz));
|
||||
|
@ -133,7 +134,9 @@ public class EntityListParser extends EntityParser {
|
|||
for(EntityType type : EntityType.values()) {
|
||||
comp.add(type.getName());
|
||||
}
|
||||
Collections.addAll(comp, "Player", "Living", "**");
|
||||
if(this.policy != UserPolicy.NO_PLAYERS)
|
||||
comp.add("Player");
|
||||
Collections.addAll(comp, "Living", "**");
|
||||
return comp;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue