2017-05-26 08:43:56 +02:00
|
|
|
--- a/net/minecraft/server/CustomFunction.java
|
|
|
|
+++ b/net/minecraft/server/CustomFunction.java
|
2018-07-15 02:00:00 +02:00
|
|
|
@@ -45,7 +45,7 @@
|
|
|
|
}
|
2017-05-26 08:43:56 +02:00
|
|
|
|
2018-07-15 02:00:00 +02:00
|
|
|
try {
|
|
|
|
- ParseResults parseresults = customfunctiondata.a().getCommandDispatcher().a().parse(s, customfunctiondata.f());
|
|
|
|
+ ParseResults parseresults = customfunctiondata.d().parse(s, customfunctiondata.f()); // CraftBukkit
|
2017-05-26 08:43:56 +02:00
|
|
|
|
2018-07-15 02:00:00 +02:00
|
|
|
if (parseresults.getReader().canRead()) {
|
|
|
|
if (parseresults.getExceptions().size() == 1) {
|
2018-07-19 02:58:31 +02:00
|
|
|
@@ -142,7 +142,14 @@
|
|
|
|
}
|
|
|
|
|
|
|
|
public void a(CustomFunctionData customfunctiondata, CommandListenerWrapper commandlistenerwrapper, ArrayDeque<CustomFunctionData.a> arraydeque, int i) throws CommandSyntaxException {
|
|
|
|
- customfunctiondata.d().execute(new ParseResults(this.a.getContext().withSource(commandlistenerwrapper), this.a.getReader(), this.a.getExceptions()));
|
|
|
|
+ // CraftBukkit start
|
|
|
|
+ org.bukkit.craftbukkit.command.VanillaCommandWrapper.WorldRescueContext rescue = new org.bukkit.craftbukkit.command.VanillaCommandWrapper.WorldRescueContext().start(commandlistenerwrapper.getWorld());
|
|
|
|
+ try {
|
|
|
|
+ customfunctiondata.d().execute(new ParseResults(this.a.getContext().withSource(commandlistenerwrapper), this.a.getReader(), this.a.getExceptions()));
|
|
|
|
+ } finally {
|
|
|
|
+ rescue.end();
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
}
|
|
|
|
|
|
|
|
public String toString() {
|