Skocz do zawartości
  • 0

Bungeecord


XXXXXXXXXX

Pytanie

Zrobiłem listener w którym po kliknięciu na item przenosi na serwer PvP ale jest jakiś błąd, proszę o pomoc:

org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[server.jar:git-Spigot-21fe707-e1ebe52]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[server.jar:git-Spigot-21fe707-e1ebe52]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [server.jar:git-Spigot-21fe707-e1ebe52]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [server.jar:git-Spigot-21fe707-e1ebe52]
at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:228) [server.jar:git-Spigot-21fe707-e1ebe52]
at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:195) [server.jar:git-Spigot-21fe707-e1ebe52]
at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:191) [server.jar:git-Spigot-21fe707-e1ebe52]
at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:717) [server.jar:git-Spigot-21fe707-e1ebe52]
at net.minecraft.server.v1_8_R3.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:52) [server.jar:git-Spigot-21fe707-e1ebe52]
at net.minecraft.server.v1_8_R3.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:1) [server.jar:git-Spigot-21fe707-e1ebe52]
at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [server.jar:git-Spigot-21fe707-e1ebe52]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_131]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_131]
at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [server.jar:git-Spigot-21fe707-e1ebe52]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [server.jar:git-Spigot-21fe707-e1ebe52]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [server.jar:git-Spigot-21fe707-e1ebe52]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [server.jar:git-Spigot-21fe707-e1ebe52]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [server.jar:git-Spigot-21fe707-e1ebe52]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by: org.bukkit.plugin.messaging.ChannelNotRegisteredException: Attempted to send a plugin message through the unregistered channel `BungeeCord'.
at org.bukkit.plugin.messaging.StandardMessenger.validatePluginMessage(StandardMessenger.java:482) ~[server.jar:git-Spigot-21fe707-e1ebe52]
at org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer.sendPluginMessage(CraftPlayer.java:1039) ~[server.jar:git-Spigot-21fe707-e1ebe52]
at pl.Knight.Login.Main.sendPlayerLobby(Main.java:44) ~[?:?]
at pl.Knight.Login.Listeners.onInteract2(Listeners.java:98) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[server.jar:git-Spigot-21fe707-e1ebe52]
... 18 more

 

Odnośnik do komentarza
Udostępnij na innych stronach

1 odpowiedź na to pytanie

Rekomendowane odpowiedzi

  • 0
Caused by: org.bukkit.plugin.messaging.ChannelNotRegisteredException: Attempted to send a plugin message through the unregistered channel `BungeeCord'.
public class MyPlugin extends JavaPlugin implements PluginMessageListener {
  @Override
  public void onEnable() {
    this.getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
    this.getServer().getMessenger().registerIncomingPluginChannel(this, "BungeeCord", this);
  }

  @Override
  public void onPluginMessageReceived(String channel, Player player, byte[] message) {
    if (!channel.equals("BungeeCord")) {
      return;
    }
    ByteArrayDataInput in = ByteStreams.newDataInput(message);
    String subchannel = in.readUTF();
    if (subchannel.equals("SomeSubChannel")) {
      // Use the code sample in the 'Response' sections below to read
      // the data.
    }
  }
}

 

Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...