Skip to content

Commit

Permalink
Fix some case-sensitive comparing in WorldScriptHelper.
Browse files Browse the repository at this point in the history
  • Loading branch information
aufdemrand committed Mar 25, 2013
1 parent 1443ae1 commit 07c2769
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -99,7 +99,7 @@ public void commandEvent(PlayerCommandPreprocessEvent event) {
context.put("raw_args", (event.getMessage().split(" ").length > 1 ? event.getMessage().split(" ", 2)[1] : ""));

// Run any event scripts and get the determination.
String determination = doEvent(command + " command", null, event.getPlayer(), context);
String determination = doEvent(command + " command", null, event.getPlayer(), context).toUpperCase();

// If a script has determined fulfilled, cancel this event so the player doesn't
// receive the default 'Invalid command' gibberish from bukkit.
Expand All @@ -113,7 +113,7 @@ public void loginEvent(PlayerLoginEvent event) {
Map<String, String> context = new HashMap<String, String>();
context.put("hostname", event.getHostname());

String determination = doEvent("player login", null, event.getPlayer(), context);
String determination = doEvent("player login", null, event.getPlayer(), context).toUpperCase();

// Handle determine kicked
if (determination.toUpperCase().startsWith("KICKED"))
Expand All @@ -125,7 +125,7 @@ public void loginEvent(PlayerQuitEvent event) {
Map<String, String> context = new HashMap<String, String>();
context.put("message", event.getQuitMessage());

String determination = doEvent("player quit", null, event.getPlayer(), context);
String determination = doEvent("player quit", null, event.getPlayer(), context).toUpperCase();

// Handle determine message
if (determination.toUpperCase().startsWith("MESSAGE"))
Expand Down

0 comments on commit 07c2769

Please sign in to comment.