geforkt von Mirrors/FastAsyncWorldEdit
Call createProxyActor() on command Actors.
Dieser Commit ist enthalten in:
Ursprung
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);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren