Make the status button clickable

This commit is contained in:
ME1312 2022-10-26 15:02:06 -04:00
parent 36f2821524
commit c5377f7f13
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8

View File

@ -413,6 +413,9 @@ public class DefaultUIHandler implements UIHandler, Listener {
} else if (item.equals(plugin.api.getLang("SubServers", "Interface.Server-Admin.Plugins"))) {
player.closeInventory();
gui.serverPlugin(1, ((Server) gui.lastVisitedObjects[0]).getName());
} else if (item.length() > 2 && item.substring(2).equals(((Server) gui.lastVisitedObjects[0]).getDisplayName()) &&
!item.startsWith(ChatColor.RED.toString()) && !item.startsWith(ChatColor.YELLOW.toString()) && !((Server) gui.lastVisitedObjects[0]).getName().equals(plugin.api.getName())) {
plugin.pmc(player, "Connect", ((Server) gui.lastVisitedObjects[0]).getName());
}
}
} else if (title.startsWith(plugin.api.getLang("SubServers", "Interface.SubServer-Plugin.Title").split("\\$str\\$")[0]) && // SubServer Plugin