Update item stack with bungee server status?

Discussion in 'Plugin Development' started by voltywolty, Jan 20, 2024.

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


    I have a server plugin my game mode is dependent on. In my game mode plugin, I have a line called

    ServerManager.setServerStatus(mapName + ", Starting Soon");
    that is called in the onEnable.

    My ServerManager is in my server plugin here:
    public static void setServerStatus(String status) {
            serverStatus = status;
    This then gets updated in an Item Stack in a listener every time the player left clicks:
        private void openGameListInventory(Player player) {
            Inventory gameListInv = Bukkit.createInventory(null, 9, "Game List");
            ItemStack game = new ItemStack(Material.RED_CONCRETE);
            game.setDurability((short) 9);
            ItemMeta gameMeta = game.getItemMeta();
            ArrayList<String> gameLore = new ArrayList<>();
            gameLore.add(ChatColor.YELLOW + "Players: " + ChatColor.GOLD + ServerManager.online);
            gameLore.add(ChatColor.WHITE + ServerManager.serverStatus);
            if (plugin.getServerManager().isServerOnline())
                gameListInv.setItem(0, game);
    However, it isn't updating the status. The status will just say "null" rather than what I put in DvZ. I'm not too sure what is causing this. Can anyone help?
  2. Offline

    timtower Administrator Administrator Moderator

    Bungeecord requires offline mode
    Offline mode is not suppported by Bukkit
Thread Status:
Not open for further replies.

Share This Page