mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Fixed /scriptname.js and no-double-slash settings not working
This commit is contained in:
@ -96,8 +96,20 @@ public class WorldEditListener implements Listener {
|
||||
split = plugin.getWorldEdit().commandDetection(split);
|
||||
split[0] = "/" + split[0];
|
||||
}
|
||||
|
||||
final String newMessage = StringUtil.joinString(split, " ");
|
||||
|
||||
event.setMessage(StringUtil.joinString(split, " "));
|
||||
if (!newMessage.equals(event.getMessage())) {
|
||||
event.setMessage(newMessage);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
if (event.getMessage().length() > 0) {
|
||||
plugin.getServer().dispatchCommand(event.getPlayer(),
|
||||
event.getMessage().substring(1));
|
||||
}
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user