Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 04:20:08 +01:00
Add proper TeleportCause for /teleport
Dieser Commit ist enthalten in:
Ursprung
9a032b246b
Commit
10daedccdd
23
nms-patches/CommandTeleport.patch
Normale Datei
23
nms-patches/CommandTeleport.patch
Normale Datei
@ -0,0 +1,23 @@
|
|||||||
|
--- a/net/minecraft/server/CommandTeleport.java
|
||||||
|
+++ b/net/minecraft/server/CommandTeleport.java
|
||||||
|
@@ -69,7 +69,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
entity.stopRiding();
|
||||||
|
- ((EntityPlayer) entity).playerConnection.a(commandabstract_commandnumber.a(), commandabstract_commandnumber1.a(), commandabstract_commandnumber2.a(), f, f1, enumset);
|
||||||
|
+ ((EntityPlayer) entity).playerConnection.a(commandabstract_commandnumber.a(), commandabstract_commandnumber1.a(), commandabstract_commandnumber2.a(), f, f1, enumset, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.COMMAND); // CraftBukkit
|
||||||
|
entity.setHeadRotation(f);
|
||||||
|
} else {
|
||||||
|
float f2 = (float) MathHelper.g(commandabstract_commandnumber3.a());
|
||||||
|
@@ -94,4 +94,11 @@
|
||||||
|
public boolean isListStart(String[] astring, int i) {
|
||||||
|
return i == 0;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // CraftBukkit start - fix decompile error
|
||||||
|
+ @Override
|
||||||
|
+ public int compareTo(ICommand o) {
|
||||||
|
+ return a((ICommand) o);
|
||||||
|
+ }
|
||||||
|
+ // CraftBukkit end
|
||||||
|
}
|
@ -31,14 +31,7 @@
|
|||||||
entity.setHeadRotation(f);
|
entity.setHeadRotation(f);
|
||||||
} else {
|
} else {
|
||||||
float f2 = (float) MathHelper.g(commandabstract_commandnumber3.a());
|
float f2 = (float) MathHelper.g(commandabstract_commandnumber3.a());
|
||||||
@@ -126,10 +120,17 @@
|
@@ -132,4 +126,11 @@
|
||||||
}
|
|
||||||
|
|
||||||
public List<String> tabComplete(MinecraftServer minecraftserver, ICommandListener icommandlistener, String[] astring, @Nullable BlockPosition blockposition) {
|
|
||||||
- return astring.length != 1 && astring.length != 2 ? Collections.emptyList() : a(astring, minecraftserver.getPlayers());
|
|
||||||
+ return astring.length != 1 && astring.length != 2 ? Collections.<String>emptyList() : a(astring, minecraftserver.getPlayers()); // CraftBukkit - decompile error
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isListStart(String[] astring, int i) {
|
public boolean isListStart(String[] astring, int i) {
|
||||||
return i == 0;
|
return i == 0;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren