mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
b742f7a892
Upstream merge (we must go deeper) SpigotMC/Spigot@1e7bc383c3
27 lines
No EOL
1.4 KiB
Diff
27 lines
No EOL
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
|
Date: Sun, 23 Mar 2014 01:12:10 +0000
|
|
Subject: [PATCH] Check for manually prefixed commands or commands that don't
|
|
need a prefix for calling vanilla commands with command blocks
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
|
|
+++ b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
|
|
@@ -0,0 +0,0 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
|
|
}
|
|
}
|
|
|
|
+ // Spigot start - check for manually prefixed command or commands that don't need a prefix
|
|
+ org.bukkit.command.Command commandBlockCommand = commandMap.getCommand(args[0]);
|
|
+ if (commandBlockCommand instanceof VanillaCommandWrapper) {
|
|
+ this.b = ((VanillaCommandWrapper) commandBlockCommand).dispatchVanillaCommandBlock(this, this.e);
|
|
+ return;
|
|
+ }
|
|
+ // Spigot end
|
|
+
|
|
// Make sure this is a valid command
|
|
if (commandMap.getCommand(args[0]) == null) {
|
|
this.b = 0;
|
|
--
|