Fix for staff hosted

This commit is contained in:
Shaun Bennett 2014-12-23 05:48:45 -06:00
parent 5f509ca488
commit 582ed34d21
3 changed files with 4 additions and 4 deletions

View File

@ -9,4 +9,5 @@ public class ServerInfo
public String Map;
public String ServerType;
public String Game;
public boolean HostedByStaff;
}

View File

@ -437,6 +437,7 @@ public class ServerManager extends MiniPlugin
serverInfo.MOTD = args.length > 0 ? args[0] : serverStatus.getMotd();
serverInfo.CurrentPlayers = serverStatus.getPlayerCount();
serverInfo.MaxPlayers = serverStatus.getMaxPlayerCount();
serverInfo.HostedByStaff = serverStatus.getMotd().contains("StaffHosted");
if (args.length > 1)
serverInfo.ServerType = args[1];

View File

@ -223,9 +223,7 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
if (serverInfo.MOTD.contains("Private"))
return;
boolean staffServer = serverInfo.MOTD.contains("StaffHosted");
if (staffServer)
if (serverInfo.HostedByStaff)
{
if (slot >= 9)
return;
@ -316,7 +314,7 @@ public class ServerNpcPage extends ShopPageBase<ServerManager, ServerNpcShop> im
if (serverInfo.Map != null)
lore.add(ChatColor.RESET + C.cYellow + "Map: " + C.cWhite + serverInfo.Map);
if (serverInfo.MOTD.contains("StaffHosted"))
if (serverInfo.HostedByStaff)
{
lore.add(" ");
lore.add(ChatColor.RESET + C.cGreen + "Hosted by a Staff Member");