Fixed NPE in GameHostManager
Fixed CD for creating server.
This commit is contained in:
parent
4bfd34034b
commit
07cca7a1d4
@ -16,7 +16,7 @@ public class HostServerCommand extends CommandBase<PersonalServerManager>
|
||||
@Override
|
||||
public void Execute(Player caller, String[] args)
|
||||
{
|
||||
if (!Recharge.Instance.use(caller, "Host Server", 30000, true, true))
|
||||
if (!Recharge.Instance.use(caller, "Host Server", 30000, false, false))
|
||||
return;
|
||||
|
||||
Plugin.hostServer(caller, caller.getName());
|
||||
|
@ -67,7 +67,7 @@ public class PersonalServerManager extends MiniPlugin
|
||||
{
|
||||
if (_interfaceItem.equals(event.getPlayer().getItemInHand()))
|
||||
{
|
||||
if (!Recharge.Instance.use(event.getPlayer(), "Host Server", 30000, true, true))
|
||||
if (!Recharge.Instance.use(event.getPlayer(), "Host Server Melon", 30000, false, false))
|
||||
return;
|
||||
|
||||
if (_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.LEGEND))
|
||||
|
@ -253,7 +253,7 @@ public class GameHostManager implements Listener
|
||||
|
||||
public boolean isPrivateServer()
|
||||
{
|
||||
return Manager.GetHost() != null || Manager.GetHost().length() > 0;
|
||||
return Manager.GetHost() != null && Manager.GetHost().length() > 0;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
Loading…
Reference in New Issue
Block a user