mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Call createProxyActor() on command Actors.
This commit is contained in:
parent
b8b097ce68
commit
de0f283656
@ -62,6 +62,7 @@ public final class CommandManager {
|
|||||||
private static final java.util.regex.Pattern numberFormatExceptionPattern = java.util.regex.Pattern.compile("^For input string: \"(.*)\"$");
|
private static final java.util.regex.Pattern numberFormatExceptionPattern = java.util.regex.Pattern.compile("^For input string: \"(.*)\"$");
|
||||||
|
|
||||||
private final WorldEdit worldEdit;
|
private final WorldEdit worldEdit;
|
||||||
|
private final PlatformManager platformManager;
|
||||||
private final Dispatcher dispatcher;
|
private final Dispatcher dispatcher;
|
||||||
private final DynamicStreamHandler dynamicHandler = new DynamicStreamHandler();
|
private final DynamicStreamHandler dynamicHandler = new DynamicStreamHandler();
|
||||||
|
|
||||||
@ -70,9 +71,11 @@ public final class CommandManager {
|
|||||||
*
|
*
|
||||||
* @param worldEdit the WorldEdit instance
|
* @param worldEdit the WorldEdit instance
|
||||||
*/
|
*/
|
||||||
CommandManager(final WorldEdit worldEdit) {
|
CommandManager(final WorldEdit worldEdit, PlatformManager platformManager) {
|
||||||
checkNotNull(worldEdit);
|
checkNotNull(worldEdit);
|
||||||
|
checkNotNull(platformManager);
|
||||||
this.worldEdit = worldEdit;
|
this.worldEdit = worldEdit;
|
||||||
|
this.platformManager = platformManager;
|
||||||
|
|
||||||
// Register this instance for command events
|
// Register this instance for command events
|
||||||
worldEdit.getEventBus().register(this);
|
worldEdit.getEventBus().register(this);
|
||||||
@ -195,7 +198,7 @@ public final class CommandManager {
|
|||||||
public void handleCommand(CommandEvent event) {
|
public void handleCommand(CommandEvent event) {
|
||||||
Request.reset();
|
Request.reset();
|
||||||
|
|
||||||
Actor actor = event.getActor();
|
Actor actor = platformManager.createProxyActor(event.getActor());
|
||||||
String split[] = commandDetection(event.getArguments());
|
String split[] = commandDetection(event.getArguments());
|
||||||
|
|
||||||
// No command found!
|
// No command found!
|
||||||
|
@ -65,7 +65,7 @@ public class PlatformManager {
|
|||||||
public PlatformManager(WorldEdit worldEdit) {
|
public PlatformManager(WorldEdit worldEdit) {
|
||||||
checkNotNull(worldEdit);
|
checkNotNull(worldEdit);
|
||||||
this.worldEdit = worldEdit;
|
this.worldEdit = worldEdit;
|
||||||
this.commandManager = new CommandManager(worldEdit);
|
this.commandManager = new CommandManager(worldEdit, this);
|
||||||
|
|
||||||
// Register this instance for events
|
// Register this instance for events
|
||||||
worldEdit.getEventBus().register(this);
|
worldEdit.getEventBus().register(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user