mod and plugin conflict

Discussion in 'Plugin Development' started by Nikita22314, Mar 19, 2022.

Thread Status:
Not open for further replies.
  1. Offline

    Nikita22314

    Greetings. I wrote a plug-in for the "Capture points" mode. I put "Mohist" on the core. Put the mod "techguns". As soon as I start the game with the command, the player is teleported to the right coordinates, but the camera flies into the void. There is a feeling that the player is in the abyss. This happens to all players on the server. If you remove the mod, everything works fine.
    game start code:


    Code:
     starting = true;
            board = Bukkit.getScoreboardManager().getMainScoreboard();
            try {
                playerKillAmount = board.registerNewObjective("scores", "dummy");
            }
            catch (IllegalArgumentException e)
            {
                playerKillAmount = board.getObjective("scores");
                playerKillAmount.unregister();
                playerKillAmount = board.registerNewObjective("scores", "dummy");
            }
            playerKillAmount.setDisplayName("Очки:");
            bluesc = playerKillAmount.getScore(ChatColor.BLUE + "Синие:");
            bluesc.setScore(0);
            redsc = playerKillAmount.getScore(ChatColor.RED + "Красные:");
            redsc.setScore(0);
            playerKillAmount.setDisplaySlot(DisplaySlot.SIDEBAR);
            for (Player player : Bukkit.getOnlinePlayers())
            {
                if(Bukkit.getScoreboardManager().getMainScoreboard().getTeam("red").hasPlayer(player))
                {
                    player.teleport(new Location(Bukkit.getWorld("world"), redSpawn.getX(), redSpawn.getY(), redSpawn.getZ()));
                }
                if(Bukkit.getScoreboardManager().getMainScoreboard().getTeam("blue").hasPlayer(player))
                {
                    player.teleport(new Location(Bukkit.getWorld("world"), blueSpawn.getX(), blueSpawn.getY(), blueSpawn.getZ()));
                }
    
               
    
    
            }
            counter.start();
        }

    counter:

    Code:
    public class Counter extends Thread {
            public void run() {
                for (Player p : Bukkit.getOnlinePlayers())
                {
                    block(p);
                }
                Bukkit.broadcastMessage(ChatColor.RED + "5");
                try {
                    sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                Bukkit.broadcastMessage(ChatColor.RED + "4");
                try {
                    sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                Bukkit.broadcastMessage(ChatColor.RED + "3");
                try {
                    sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                Bukkit.broadcastMessage(ChatColor.RED + "2");
                try {
                    sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                Bukkit.broadcastMessage(ChatColor.RED + "1");
                try {
                    sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                Bukkit.broadcastMessage(ChatColor.RED + "GO!");
                for (Player p : Bukkit.getOnlinePlayers())
                {
                    unblock(p);
                }
                starting = false;
                isGameStarted = true;
            }
        }
    Has anyone met with this?
     
  2. Online

    timtower Administrator Administrator Moderator

    Locked
    Modded servers are not supported by Bukkit
     
Thread Status:
Not open for further replies.

Share This Page