mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-02 19:36:41 +00:00
Major command changes that don't work yet.
This commit is contained in:
@ -28,6 +28,7 @@ import com.sk89q.worldedit.extension.platform.Actor;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@ -71,10 +72,10 @@ public class EditSessionEvent extends Event implements Cancellable {
|
||||
/**
|
||||
* Create a new event.
|
||||
*
|
||||
* @param world the world
|
||||
* @param actor the actor, or null if there is no actor specified
|
||||
* @param world the world
|
||||
* @param actor the actor, or null if there is no actor specified
|
||||
* @param maxBlocks the maximum number of block changes
|
||||
* @param stage the stage
|
||||
* @param stage the stage
|
||||
*/
|
||||
public EditSessionEvent(@Nullable World world, Actor actor, int maxBlocks, Stage stage) {
|
||||
this.world = world;
|
||||
@ -96,9 +97,7 @@ public class EditSessionEvent extends Event implements Cancellable {
|
||||
*
|
||||
* @return the actor, which may be null if unavailable
|
||||
*/
|
||||
public
|
||||
@Nullable
|
||||
Actor getActor() {
|
||||
public @Nullable Actor getActor() {
|
||||
return actor;
|
||||
}
|
||||
|
||||
@ -107,9 +106,7 @@ public class EditSessionEvent extends Event implements Cancellable {
|
||||
*
|
||||
* @return the world
|
||||
*/
|
||||
public
|
||||
@Nullable
|
||||
World getWorld() {
|
||||
public @Nullable World getWorld() {
|
||||
return world;
|
||||
}
|
||||
|
||||
@ -173,5 +170,4 @@ public class EditSessionEvent extends Event implements Cancellable {
|
||||
return clone;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ package com.sk89q.worldedit.event.platform;
|
||||
|
||||
import com.sk89q.worldedit.event.AbstractCancellable;
|
||||
import com.sk89q.worldedit.extension.platform.Actor;
|
||||
import com.sk89q.worldedit.extension.platform.CommandManager;
|
||||
import com.sk89q.worldedit.extension.platform.PlatformCommandManager;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
@ -67,6 +67,6 @@ public class CommandEvent extends AbstractCancellable implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
CommandManager.getInstance().handleCommandOnCurrentThread(this);
|
||||
PlatformCommandManager.getInstance().handleCommandOnCurrentThread(this);
|
||||
}
|
||||
}
|
||||
|
@ -20,9 +20,9 @@
|
||||
package com.sk89q.worldedit.event.platform;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.sk89q.worldedit.event.Event;
|
||||
import com.sk89q.worldedit.extension.platform.Actor;
|
||||
import com.sk89q.worldedit.internal.util.Substring;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@ -34,7 +34,7 @@ public class CommandSuggestionEvent extends Event {
|
||||
|
||||
private final Actor actor;
|
||||
private final String arguments;
|
||||
private List<String> suggestions = Collections.emptyList();
|
||||
private List<Substring> suggestions = Collections.emptyList();
|
||||
|
||||
/**
|
||||
* Create a new instance.
|
||||
@ -71,9 +71,14 @@ public class CommandSuggestionEvent extends Event {
|
||||
/**
|
||||
* Get the list of suggestions that are to be presented.
|
||||
*
|
||||
* <p>
|
||||
* Each Substring holds the replacement as the substring,
|
||||
* and the replacement range as the original substring range.
|
||||
* </p>
|
||||
*
|
||||
* @return the list of suggestions
|
||||
*/
|
||||
public List<String> getSuggestions() {
|
||||
public List<Substring> getSuggestions() {
|
||||
return suggestions;
|
||||
}
|
||||
|
||||
@ -82,7 +87,7 @@ public class CommandSuggestionEvent extends Event {
|
||||
*
|
||||
* @param suggestions the list of suggestions
|
||||
*/
|
||||
public void setSuggestions(List<String> suggestions) {
|
||||
public void setSuggestions(List<Substring> suggestions) {
|
||||
checkNotNull(suggestions);
|
||||
this.suggestions = suggestions;
|
||||
}
|
||||
|
Reference in New Issue
Block a user