@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/CommandDispatcher.java
|
||||
+++ b/net/minecraft/server/CommandDispatcher.java
|
||||
@@ -19,12 +19,21 @@
|
||||
--- a/net/minecraft/commands/CommandDispatcher.java
|
||||
+++ b/net/minecraft/commands/CommandDispatcher.java
|
||||
@@ -102,12 +102,21 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
CommandAdvancement.a(this.b);
|
||||
CommandAttribute.a(this.b);
|
||||
CommandExecute.a(this.b);
|
||||
@@ -105,14 +114,57 @@
|
||||
@@ -188,14 +197,57 @@
|
||||
}
|
||||
|
||||
this.b.findAmbiguities((commandnode, commandnode1, commandnode2, collection) -> {
|
||||
@@ -83,7 +83,7 @@
|
||||
StringReader stringreader = new StringReader(s);
|
||||
|
||||
if (stringreader.canRead() && stringreader.peek() == '/') {
|
||||
@@ -139,7 +191,7 @@
|
||||
@@ -222,7 +274,7 @@
|
||||
if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
|
||||
int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
|
||||
IChatMutableComponent ichatmutablecomponent = (new ChatComponentText("")).a(EnumChatFormat.GRAY).format((chatmodifier) -> {
|
||||
@@ -92,7 +92,7 @@
|
||||
});
|
||||
|
||||
if (j > 10) {
|
||||
@@ -189,11 +241,36 @@
|
||||
@@ -272,11 +324,36 @@
|
||||
}
|
||||
|
||||
public void a(EntityPlayer entityplayer) {
|
||||
@@ -130,7 +130,7 @@
|
||||
entityplayer.playerConnection.sendPacket(new PacketPlayOutCommands(rootcommandnode));
|
||||
}
|
||||
|
||||
@@ -204,7 +281,7 @@
|
||||
@@ -287,7 +364,7 @@
|
||||
CommandNode<CommandListenerWrapper> commandnode2 = (CommandNode) iterator.next();
|
||||
|
||||
if (commandnode2.canUse(commandlistenerwrapper)) {
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
argumentbuilder.requires((icompletionprovider) -> {
|
||||
return true;
|
||||
@@ -227,7 +304,7 @@
|
||||
@@ -310,7 +387,7 @@
|
||||
argumentbuilder.redirect((CommandNode) map.get(argumentbuilder.getRedirect()));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/server/CommandListenerWrapper.java
|
||||
+++ b/net/minecraft/server/CommandListenerWrapper.java
|
||||
@@ -15,6 +15,8 @@
|
||||
import java.util.stream.Stream;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/commands/CommandListenerWrapper.java
|
||||
+++ b/net/minecraft/commands/CommandListenerWrapper.java
|
||||
@@ -36,6 +36,8 @@
|
||||
import net.minecraft.world.phys.Vec2F;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
+import com.mojang.brigadier.tree.CommandNode; // CraftBukkit
|
||||
+
|
||||
public class CommandListenerWrapper implements ICompletionProvider {
|
||||
|
||||
public static final SimpleCommandExceptionType a = new SimpleCommandExceptionType(new ChatMessage("permissions.requires.player"));
|
||||
@@ -32,6 +34,7 @@
|
||||
@@ -53,6 +55,7 @@
|
||||
private final ResultConsumer<CommandListenerWrapper> l;
|
||||
private final ArgumentAnchor.Anchor m;
|
||||
private final Vec2F n;
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
public CommandListenerWrapper(ICommandListener icommandlistener, Vec3D vec3d, Vec2F vec2f, WorldServer worldserver, int i, String s, IChatBaseComponent ichatbasecomponent, MinecraftServer minecraftserver, @Nullable Entity entity) {
|
||||
this(icommandlistener, vec3d, vec2f, worldserver, i, s, ichatbasecomponent, minecraftserver, entity, false, (commandcontext, flag, j) -> {
|
||||
@@ -128,9 +131,23 @@
|
||||
@@ -149,9 +152,23 @@
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(int i) {
|
||||
@@ -41,7 +41,7 @@
|
||||
public Vec3D getPosition() {
|
||||
return this.d;
|
||||
}
|
||||
@@ -192,7 +209,7 @@
|
||||
@@ -213,7 +230,7 @@
|
||||
while (iterator.hasNext()) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
entityplayer.sendMessage(ichatmutablecomponent, SystemUtils.b);
|
||||
}
|
||||
}
|
||||
@@ -252,4 +269,10 @@
|
||||
@@ -273,4 +290,10 @@
|
||||
public IRegistryCustom q() {
|
||||
return this.i.getCustomRegistry();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/ICommandListener.java
|
||||
+++ b/net/minecraft/server/ICommandListener.java
|
||||
@@ -22,6 +22,13 @@
|
||||
--- a/net/minecraft/commands/ICommandListener.java
|
||||
+++ b/net/minecraft/commands/ICommandListener.java
|
||||
@@ -23,6 +23,13 @@
|
||||
public boolean shouldBroadcastCommands() {
|
||||
return false;
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
};
|
||||
|
||||
void sendMessage(IChatBaseComponent ichatbasecomponent, UUID uuid);
|
||||
@@ -31,4 +38,6 @@
|
||||
@@ -32,4 +39,6 @@
|
||||
boolean shouldSendFailure();
|
||||
|
||||
boolean shouldBroadcastCommands();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/ArgumentEntity.java
|
||||
+++ b/net/minecraft/server/ArgumentEntity.java
|
||||
@@ -84,9 +84,15 @@
|
||||
--- a/net/minecraft/commands/arguments/ArgumentEntity.java
|
||||
+++ b/net/minecraft/commands/arguments/ArgumentEntity.java
|
||||
@@ -93,9 +93,15 @@
|
||||
}
|
||||
|
||||
public EntitySelector parse(StringReader stringreader) throws CommandSyntaxException {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/ArgumentBlock.java
|
||||
+++ b/net/minecraft/server/ArgumentBlock.java
|
||||
@@ -43,7 +43,7 @@
|
||||
--- a/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
|
||||
+++ b/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
|
||||
@@ -55,7 +55,7 @@
|
||||
};
|
||||
private final StringReader i;
|
||||
private final boolean j;
|
||||
@@ -9,7 +9,7 @@
|
||||
private final Map<String, String> l = Maps.newHashMap();
|
||||
private MinecraftKey m = new MinecraftKey("");
|
||||
private BlockStateList<Block, IBlockData> n;
|
||||
@@ -219,7 +219,7 @@
|
||||
@@ -231,7 +231,7 @@
|
||||
Iterator iterator = iblockstate.getValues().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
if (t0 instanceof Integer) {
|
||||
suggestionsbuilder.suggest((Integer) t0);
|
||||
@@ -488,7 +488,7 @@
|
||||
@@ -500,7 +500,7 @@
|
||||
Optional<T> optional = iblockstate.b(s);
|
||||
|
||||
if (optional.isPresent()) {
|
||||
@@ -27,7 +27,7 @@
|
||||
this.k.put(iblockstate, optional.get());
|
||||
} else {
|
||||
this.i.setCursor(i);
|
||||
@@ -522,7 +522,7 @@
|
||||
@@ -534,7 +534,7 @@
|
||||
private static <T extends Comparable<T>> void a(StringBuilder stringbuilder, IBlockState<T> iblockstate, Comparable<?> comparable) {
|
||||
stringbuilder.append(iblockstate.getName());
|
||||
stringbuilder.append('=');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/ArgumentParserSelector.java
|
||||
+++ b/net/minecraft/server/ArgumentParserSelector.java
|
||||
@@ -127,7 +127,7 @@
|
||||
--- a/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java
|
||||
+++ b/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java
|
||||
@@ -137,7 +137,7 @@
|
||||
axisalignedbb = this.a(this.v == null ? 0.0D : this.v, this.w == null ? 0.0D : this.w, this.x == null ? 0.0D : this.x);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
if (this.s == null && this.t == null && this.u == null) {
|
||||
function = (vec3d) -> {
|
||||
@@ -188,8 +188,10 @@
|
||||
@@ -198,8 +198,10 @@
|
||||
};
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
this.G = this::d;
|
||||
if (!this.l.canRead()) {
|
||||
throw ArgumentParserSelector.d.createWithContext(this.l);
|
||||
@@ -443,6 +445,12 @@
|
||||
@@ -453,6 +455,12 @@
|
||||
}
|
||||
|
||||
public EntitySelector parse() throws CommandSyntaxException {
|
||||
@@ -35,7 +35,7 @@
|
||||
this.E = this.l.getCursor();
|
||||
this.G = this::b;
|
||||
if (this.l.canRead() && this.l.peek() == '@') {
|
||||
@@ -451,7 +459,7 @@
|
||||
@@ -461,7 +469,7 @@
|
||||
}
|
||||
|
||||
this.l.skip();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntitySelector.java
|
||||
+++ b/net/minecraft/server/EntitySelector.java
|
||||
@@ -64,7 +64,7 @@
|
||||
--- a/net/minecraft/commands/arguments/selector/EntitySelector.java
|
||||
+++ b/net/minecraft/commands/arguments/selector/EntitySelector.java
|
||||
@@ -75,7 +75,7 @@
|
||||
}
|
||||
|
||||
private void e(CommandListenerWrapper commandlistenerwrapper) throws CommandSyntaxException {
|
||||
|
||||
Reference in New Issue
Block a user