mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 10:56:42 +00:00
Added //gmask to set a *GLOBAL* mask that affects nearly ALL operations. Now you can confine //sphere to a region or create //walls that do not replace existing blocks.
This commit is contained in:
@ -25,6 +25,7 @@ import com.sk89q.minecraft.util.commands.CommandPermissions;
|
||||
import com.sk89q.minecraft.util.commands.NestedCommand;
|
||||
import com.sk89q.worldedit.*;
|
||||
import com.sk89q.worldedit.blocks.ItemType;
|
||||
import com.sk89q.worldedit.masks.Mask;
|
||||
|
||||
/**
|
||||
* General WorldEdit commands.
|
||||
@ -81,6 +82,27 @@ public class GeneralCommands {
|
||||
}
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"/gmask", "gmask"},
|
||||
usage = "[mask]",
|
||||
desc = "Set the global mask",
|
||||
min = 0,
|
||||
max = -1
|
||||
)
|
||||
@CommandPermissions({"worldedit.global-mask"})
|
||||
public static void mask(CommandContext args, WorldEdit we,
|
||||
LocalSession session, LocalPlayer player, EditSession editSession)
|
||||
throws WorldEditException {
|
||||
if (args.argsLength() == 0) {
|
||||
session.setMask(null);
|
||||
player.print("Global mask disabled.");
|
||||
} else {
|
||||
Mask mask = we.getBlockMask(player, session, args.getJoinedStrings(0));
|
||||
session.setMask(mask);
|
||||
player.print("Global mask set.");
|
||||
}
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"toggleplace"},
|
||||
usage = "",
|
||||
|
Reference in New Issue
Block a user