mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-05 22:16:10 +01:00
Fix ClassCastException in tabCompletor (fixes #942)
This commit is contained in:
parent
f7f8c59f60
commit
149f6e1511
1 changed files with 5 additions and 3 deletions
|
@ -80,15 +80,17 @@ index 5a620f3fd..35774f8bf 100644
|
|||
|
||||
public void a(PacketPlayInSettings packetplayinsettings) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index aa098172f..883aca80a 100644
|
||||
index aa098172f..09eb79439 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
} else {
|
||||
offers = tabCompleteChat(player, message);
|
||||
}
|
||||
|
||||
-
|
||||
- TabCompleteEvent tabEvent = new TabCompleteEvent(player, message, offers);
|
||||
+ TabCompleteEvent tabEvent = new TabCompleteEvent(player, message, offers, message.startsWith("/") || forceCommand, pos != null ? MCUtil.toLocation(((EntityPlayer) player).world, pos) : null); // Paper
|
||||
+
|
||||
+ TabCompleteEvent tabEvent = new TabCompleteEvent(player, message, offers, message.startsWith("/") || forceCommand, pos != null ? MCUtil.toLocation(((CraftWorld) player.getWorld()).getHandle(), pos) : null); // Paper
|
||||
getPluginManager().callEvent(tabEvent);
|
||||
|
||||
return tabEvent.isCancelled() ? Collections.EMPTY_LIST : tabEvent.getCompletions();
|
||||
|
|
Loading…
Add table
Reference in a new issue