mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-02 03:16:41 +00:00
Some command fixes
Fix EditSession being created for commands that don't need it Fix error from schematic list (when there are files in sub directories) Fix dispatcher redundantly checking a huge number of permissions
This commit is contained in:
@ -46,7 +46,7 @@ public class ToolUtilCommands {
|
||||
max = 1
|
||||
)
|
||||
@CommandPermissions("worldedit.superpickaxe")
|
||||
public void togglePickaxe(Player player, LocalSession session, EditSession editSession, CommandContext args) throws WorldEditException {
|
||||
public void togglePickaxe(Player player, LocalSession session, CommandContext args) throws WorldEditException {
|
||||
|
||||
String newState = args.getString(0, null);
|
||||
if (session.hasSuperPickAxe()) {
|
||||
@ -76,7 +76,7 @@ public class ToolUtilCommands {
|
||||
max = -1
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.options.mask")
|
||||
public void mask(Player player, LocalSession session, EditSession editSession, @Optional Mask mask) throws WorldEditException {
|
||||
public void mask(Player player, LocalSession session, @Optional Mask mask) throws WorldEditException {
|
||||
if (mask == null) {
|
||||
session.getBrushTool(player.getItemInHand()).setMask(null);
|
||||
player.print("Brush mask disabled.");
|
||||
@ -94,7 +94,7 @@ public class ToolUtilCommands {
|
||||
max = 1
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.options.material")
|
||||
public void material(Player player, LocalSession session, EditSession editSession, Pattern pattern) throws WorldEditException {
|
||||
public void material(Player player, LocalSession session, Pattern pattern) throws WorldEditException {
|
||||
session.getBrushTool(player.getItemInHand()).setFill(pattern);
|
||||
player.print("Brush material set.");
|
||||
}
|
||||
@ -107,7 +107,7 @@ public class ToolUtilCommands {
|
||||
max = 1
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.options.range")
|
||||
public void range(Player player, LocalSession session, EditSession editSession, CommandContext args) throws WorldEditException {
|
||||
public void range(Player player, LocalSession session, CommandContext args) throws WorldEditException {
|
||||
int range = args.getInteger(0);
|
||||
session.getBrushTool(player.getItemInHand()).setRange(range);
|
||||
player.print("Brush range set.");
|
||||
@ -121,7 +121,7 @@ public class ToolUtilCommands {
|
||||
max = 1
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.options.size")
|
||||
public void size(Player player, LocalSession session, EditSession editSession, CommandContext args) throws WorldEditException {
|
||||
public void size(Player player, LocalSession session, CommandContext args) throws WorldEditException {
|
||||
|
||||
int radius = args.getInteger(0);
|
||||
we.checkMaxBrushRadius(radius);
|
||||
|
Reference in New Issue
Block a user