Spigot Tablist wird nicht richtig gesetzt?

Ich habe langsam keine Ahnung mehr was ich noch tun soll.

package game.squid.utils;

import org.bukkit.Bukkit;

import org.bukkit.ChatColor;

import org.bukkit.entity.Player;

import org.bukkit.scoreboard.Scoreboard;

import squid.game.games.BlockGame;

public class ScoreboardManager{

public static void registerScoreboard(Player p) {

for(Player all : Bukkit.getOnlinePlayers()) {

Scoreboard board = Bukkit.getScoreboardManager().getNewScoreboard();

all.sendMessage("Debug1");

org.bukkit.scoreboard.Team teamBlue = board.registerNewTeam("TeamBlue");

org.bukkit.scoreboard.Team teamRed = board.registerNewTeam("TeamRed");

org.bukkit.scoreboard.Team teamYellow = board.registerNewTeam("TeamYellow");

org.bukkit.scoreboard.Team teamGreen = board.registerNewTeam("TeamGreen");

all.sendMessage("Debug3");

teamBlue.setPrefix(ChatColor.AQUA.toString() + "§bBLUE ");

teamRed.setPrefix(ChatColor.RED.toString() + "§cRED ");

teamYellow.setPrefix(ChatColor.YELLOW.toString() + "§eYELLOW ");

teamGreen.setPrefix(ChatColor.GREEN.toString() + "§aGREEN ");

all.sendMessage("Debug4");

all.setScoreboard(board);

if(Team.getTeam(p) == BlockGame.blueTeam) {

teamBlue.addEntry(p.getName());

all.sendMessage("Debug5");

continue;

}

if(Team.getTeam(p) == BlockGame.redTeam) {

teamRed.addEntry(p.getName());

all.sendMessage("Debug6");

continue;

if(Team.getTeam(p) == BlockGame.yellowTeam) {

teamYellow.addEntry(p.getName());

all.sendMessage("Debug7");

continue;

}

if(Team.getTeam(p) == BlockGame.greenTeam) {

teamGreen.addEntry(p.getName());

all.sendMessage("Debug8");

continue;

}

}

}

}

Bild zu Frage
programmieren, Java, Minecraft, Minecraft Server, Plug-in, Spigot
Wieso funktioniert das Plugin nicht?

Hallo. Ich programmiere gerade ein Plugin. Eigendlich funktioniert es, doch es gibt ein problem. Es solten 2 Spieler an verschiedenen orten Teleportirt werden, doch beide Spieler werden an ein Ort Teleportiert. Hier der Code:

public class TeleportEvent implements Listener {
    public static Bootrennen plugin;

    public TeleportEvent(Bootrennen plugin) {

        TeleportEvent.plugin = plugin;
    }

    public static void start() {
        Location location = plugin.getConfig().getLocation("location.start1");
        Location loc = plugin.getConfig().getLocation("location.start2");
        int i = 1;
        for(Player current : Bukkit.getOnlinePlayers()) {
            Location playerLocation = plugin.getConfig().getLocation("location.start" + i);
            current.teleport(playerLocation);
            if (location != null) {
                if(location.getBlock() != current.getLocation().getBlock()) {
                    i = 1;
                   current.teleport(Objects.requireNonNull(plugin.getConfig().getLocation("location.start1")));
                    Boat bt = (Boat) current.getWorld().spawnEntity(location, EntityType.BOAT);
                    bt.addPassenger(current);
                } else {
                    if (loc != null) {
                       i = 2;
                        current.teleport(Objects.requireNonNull(plugin.getConfig().getLocation("location.start2")));
                        Boat bt = (Boat) current.getWorld().spawnEntity(location, EntityType.BOAT);
                        bt.addPassenger(current);
                      
                       i++;
                    }
                }
            }

        }
    }

    @EventHandler
    public void onExit(VehicleExitEvent e) {
        Player player = (Player) e.getExited();
        if (e.getExited().hasPermission("Operator")) {
            e.setCancelled(false);
        } else {
            player.sendMessage(ChatColor.RED + "Du darfst das nicht!");
            e.setCancelled(true);

        }
    }
}
Computer, Java, Minecraft, Spigot, Minecraft Plugin
Fehler wenn ich auf Spigot 1.8.8 Server joine?

Hi. Ich komme nicht auf meinen Spigot 1.8.8 Server. Immer wenn ich versuche zu joinen kommt unendlich lange diese Meldung ganz schnell wiederholt in der Konsole:

[16:25:56 WARN]: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.RuntimeException: Unable to access address of buffer
        at io.netty.channel.epoll.Native.read(Native Method) ~[spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
        at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.doReadBytes(EpollSocketChannel.java:678) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
        at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.epollInReady(EpollSocketChannel.java:714) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
        at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe$3.run(EpollSocketChannel.java:755) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:268) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
        at java.base/java.lang.Thread.run(Thread.java:831) [?:?]

Ich habe kein einziges Plugin auf dem Server und seit dem ersten Start nichts verändert. Und ja ich bin auch gewhitelisted und so...

Server, Computer, Java, Minecraft, Minecraft Server, Bukkit, craftbukkit, Spigot, minecraft 1.8, Spiele und Gaming

Meistgelesene Fragen zum Thema Spigot