Compare commands with equals. Fixes PC-116
This commit is contained in:
parent
494eafb97f
commit
2675789f59
@ -1175,7 +1175,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
|
||||
@EventHandler
|
||||
public void hubCommand(PlayerCommandPreprocessEvent event)
|
||||
{
|
||||
if (event.getMessage().toLowerCase().startsWith("/lobby") || event.getMessage().toLowerCase().startsWith("/hub") || event.getMessage().toLowerCase().startsWith("/leave"))
|
||||
if (event.getMessage().toLowerCase().equals("/lobby") || event.getMessage().toLowerCase().equals("/hub") || event.getMessage().toLowerCase().equals("/leave"))
|
||||
{
|
||||
Portal.getInstance().sendPlayerToServer(event.getPlayer(), "Lobby");
|
||||
event.setCancelled(true);
|
||||
|
@ -140,7 +140,7 @@ public class MiscManager implements Listener
|
||||
@EventHandler
|
||||
public void HubCommand(PlayerCommandPreprocessEvent event)
|
||||
{
|
||||
if (event.getMessage().toLowerCase().startsWith("/lobby") || event.getMessage().toLowerCase().startsWith("/hub") || event.getMessage().toLowerCase().startsWith("/leave"))
|
||||
if (event.getMessage().toLowerCase().equals("/lobby") || event.getMessage().toLowerCase().equals("/hub") || event.getMessage().toLowerCase().equals("/leave"))
|
||||
{
|
||||
Manager.GetPortal().sendPlayerToServer(event.getPlayer(), "Lobby");
|
||||
event.setCancelled(true);
|
||||
|
Loading…
Reference in New Issue
Block a user