--- a/net/minecraft/commands/arguments/EntityArgument.java +++ b/net/minecraft/commands/arguments/EntityArgument.java @@ -102,21 +102,27 @@ } private EntitySelector parse(StringReader reader, boolean allowAtSelectors) throws CommandSyntaxException { + // CraftBukkit start + return this.parse(reader, allowAtSelectors, false); + } + + public EntitySelector parse(StringReader stringreader, boolean flag, boolean overridePermissions) throws CommandSyntaxException { + // CraftBukkit end boolean flag1 = false; - EntitySelectorParser argumentparserselector = new EntitySelectorParser(reader, allowAtSelectors); - EntitySelector entityselector = argumentparserselector.parse(); + EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, flag); + EntitySelector entityselector = argumentparserselector.parse(overridePermissions); // CraftBukkit if (entityselector.getMaxResults() > 1 && this.single) { if (this.playersOnly) { - reader.setCursor(0); - throw EntityArgument.ERROR_NOT_SINGLE_PLAYER.createWithContext(reader); + stringreader.setCursor(0); + throw EntityArgument.ERROR_NOT_SINGLE_PLAYER.createWithContext(stringreader); } else { - reader.setCursor(0); - throw EntityArgument.ERROR_NOT_SINGLE_ENTITY.createWithContext(reader); + stringreader.setCursor(0); + throw EntityArgument.ERROR_NOT_SINGLE_ENTITY.createWithContext(stringreader); } } else if (entityselector.includesEntities() && this.playersOnly && !entityselector.isSelfSelector()) { - reader.setCursor(0); - throw EntityArgument.ERROR_ONLY_PLAYERS_ALLOWED.createWithContext(reader); + stringreader.setCursor(0); + throw EntityArgument.ERROR_ONLY_PLAYERS_ALLOWED.createWithContext(stringreader); } else { return entityselector; }