mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Add command queue option + fix nearest target
This commit is contained in:
parent
fcb7c23380
commit
3a29022d19
@ -1846,6 +1846,7 @@ public class PS {
|
||||
|
||||
// WorldEdit
|
||||
options.put("worldedit.require-selection-in-mask", Settings.REQUIRE_SELECTION);
|
||||
options.put("worldedit.queue-commands", Settings.QUEUE_COMMANDS);
|
||||
options.put("worldedit.enable-for-helpers", Settings.WE_ALLOW_HELPER);
|
||||
options.put("worldedit.max-volume", Settings.WE_MAX_VOLUME);
|
||||
options.put("worldedit.max-iterations", Settings.WE_MAX_ITERATIONS);
|
||||
@ -1962,6 +1963,7 @@ public class PS {
|
||||
Settings.TELEPORT_ON_LOGIN = config.getBoolean("teleport.on_login");
|
||||
|
||||
// WorldEdit
|
||||
Settings.QUEUE_COMMANDS = config.getBoolean("worldedit.queue-commands");
|
||||
Settings.REQUIRE_SELECTION = config.getBoolean("worldedit.require-selection-in-mask");
|
||||
Settings.WE_ALLOW_HELPER = config.getBoolean("worldedit.enable-for-helpers");
|
||||
Settings.WE_MAX_VOLUME = config.getLong("worldedit.max-volume");
|
||||
|
@ -41,12 +41,6 @@ import com.plotsquared.general.commands.CommandDeclaration;
|
||||
)
|
||||
public class Target extends SubCommand {
|
||||
|
||||
public Target() {
|
||||
requiredArguments = new Argument[] {
|
||||
Argument.PlotID
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(final PlotPlayer plr, final String[] args) {
|
||||
final Location ploc = plr.getLocation();
|
||||
|
@ -96,6 +96,7 @@ public class Settings {
|
||||
* Default worldedit-require-selection-in-mask: false
|
||||
*/
|
||||
public static boolean REQUIRE_SELECTION = true;
|
||||
public static boolean QUEUE_COMMANDS = false;
|
||||
public static boolean WE_ALLOW_HELPER = false;
|
||||
public static long WE_MAX_VOLUME = 500000;
|
||||
public static long WE_MAX_ITERATIONS = 1000;
|
||||
|
@ -145,7 +145,7 @@ public class WEListener implements Listener {
|
||||
private boolean set = false;
|
||||
|
||||
public boolean delay(final Player player, final String command, boolean delayed) {
|
||||
if (!Settings.EXPERIMENTAL_FAST_ASYNC_WORLDEDIT || set) {
|
||||
if (!Settings.QUEUE_COMMANDS || !Settings.EXPERIMENTAL_FAST_ASYNC_WORLDEDIT || set) {
|
||||
return false;
|
||||
}
|
||||
boolean free = SetBlockQueue.addNotify(null);
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user