fix NO_PLAYERS policy completion
This commit is contained in:
parent
fa94de734b
commit
9eb5f2cfd3
2 changed files with 9 additions and 3 deletions
|
@ -360,6 +360,9 @@ public abstract class Splashes {
|
||||||
"Hergestellt in China!",
|
"Hergestellt in China!",
|
||||||
"Jetzt ohne Einzelspieler!",
|
"Jetzt ohne Einzelspieler!",
|
||||||
"Jetzt mit tieferen Schluchten!",
|
"Jetzt mit tieferen Schluchten!",
|
||||||
"[TEXT ZENSIERT]"
|
"Was bist du denn für ein hübsches Ding?",
|
||||||
|
"[TEXT ZENSIERT]",
|
||||||
|
"Mehr Energie!",
|
||||||
|
"Maximale Energie!"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,7 @@ public class EntityListParser extends EntityParser {
|
||||||
|
|
||||||
public Collection<String> getCompletions(CommandEnvironment env) {
|
public Collection<String> getCompletions(CommandEnvironment env) {
|
||||||
Collection<String> comp = super.getCompletions(env);
|
Collection<String> comp = super.getCompletions(env);
|
||||||
|
if(this.policy != UserPolicy.NO_PLAYERS)
|
||||||
comp.add("*");
|
comp.add("*");
|
||||||
for(Class<? extends Entity> clazz : EntityRegistry.getAllClasses()) {
|
for(Class<? extends Entity> clazz : EntityRegistry.getAllClasses()) {
|
||||||
if(!this.livingOnly || EntityLiving.class.isAssignableFrom(clazz))
|
if(!this.livingOnly || EntityLiving.class.isAssignableFrom(clazz))
|
||||||
|
@ -133,7 +134,9 @@ public class EntityListParser extends EntityParser {
|
||||||
for(EntityType type : EntityType.values()) {
|
for(EntityType type : EntityType.values()) {
|
||||||
comp.add(type.getName());
|
comp.add(type.getName());
|
||||||
}
|
}
|
||||||
Collections.addAll(comp, "Player", "Living", "**");
|
if(this.policy != UserPolicy.NO_PLAYERS)
|
||||||
|
comp.add("Player");
|
||||||
|
Collections.addAll(comp, "Living", "**");
|
||||||
return comp;
|
return comp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue