Fix for staff hosted
This commit is contained in:
parent
5f509ca488
commit
582ed34d21
@ -9,4 +9,5 @@ public class ServerInfo
|
||||
public String Map;
|
||||
public String ServerType;
|
||||
public String Game;
|
||||
public boolean HostedByStaff;
|
||||
}
|
@ -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];
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user