Compare commands with equals. Fixes PC-116

This commit is contained in:
samczsun 2016-05-12 17:54:23 -04:00 committed by Sam Sun
parent 494eafb97f
commit 2675789f59
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);