This commit is contained in:
Jesse Boyd 2017-07-18 00:48:49 +10:00
parent 8c6e24a3e5
commit 94a7834917
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -19,7 +19,6 @@
package com.sk89q.bukkit.util;
import com.sk89q.worldedit.WorldEdit;
import org.bukkit.command.CommandMap;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
@ -35,12 +34,7 @@ public class FallbackRegistrationListener implements Listener {
@EventHandler(ignoreCancelled = true)
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
boolean doubleSlash = WorldEdit.getInstance().getConfiguration().noDoubleSlash;
String msg = event.getMessage();
if (doubleSlash || !msg.startsWith("/")) {
msg = "/" + msg;
}
if (commandRegistration.dispatch(event.getPlayer(), msg)) {
if (commandRegistration.dispatch(event.getPlayer(), event.getMessage().substring(1))) {
event.setCancelled(true);
}
}