Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-24 01:50:06 +01:00
get tool from player
Dieser Commit ist enthalten in:
Ursprung
d6280ec945
Commit
8b9a2ff18c
@ -128,7 +128,7 @@ public class FaweBukkit implements IFawe, Listener {
|
||||
}
|
||||
|
||||
try {
|
||||
Class.forName("com.destroystokyo.paper.event.server.AsyncTabCompleteEvent");
|
||||
Class.forName("com.destroystokyo.paper.event.server.AsyncTabCompleteEvent");
|
||||
Bukkit.getPluginManager().registerEvents(new AsyncTabCompleteListener(WorldEditPlugin.getInstance()), plugin);
|
||||
} catch (Throwable ignore) {
|
||||
debug("====== USE PAPER ======");
|
||||
|
@ -83,10 +83,10 @@ public class ToolUtilCommands {
|
||||
@CommandPermissions("worldedit.brush.options.mask")
|
||||
public void mask(Player player, LocalSession session, @Optional Mask mask) throws WorldEditException {
|
||||
if (mask == null) {
|
||||
session.getBrushTool(player.getItemInHand(HandSide.MAIN_HAND).getType()).setMask(null);
|
||||
session.getBrushTool(player).setMask(null);
|
||||
player.print("Brush mask disabled.");
|
||||
} else {
|
||||
session.getBrushTool(player.getItemInHand(HandSide.MAIN_HAND).getType()).setMask(mask);
|
||||
session.getBrushTool(player).setMask(mask);
|
||||
player.print("Brush mask set.");
|
||||
}
|
||||
}
|
||||
@ -100,7 +100,7 @@ public class ToolUtilCommands {
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.options.material")
|
||||
public void material(Player player, LocalSession session, Pattern pattern) throws WorldEditException {
|
||||
session.getBrushTool(player.getItemInHand(HandSide.MAIN_HAND).getType()).setFill(pattern);
|
||||
session.getBrushTool(player).setFill(pattern);
|
||||
player.print("Brush material set.");
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ public class ToolUtilCommands {
|
||||
@CommandPermissions("worldedit.brush.options.range")
|
||||
public void range(Player player, LocalSession session, CommandContext args) throws WorldEditException {
|
||||
int range = args.getInteger(0);
|
||||
session.getBrushTool(player.getItemInHand(HandSide.MAIN_HAND).getType()).setRange(range);
|
||||
session.getBrushTool(player).setRange(range);
|
||||
player.print("Brush range set.");
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ public class ToolUtilCommands {
|
||||
|
||||
int radius = args.getInteger(0);
|
||||
we.checkMaxBrushRadius(radius);
|
||||
session.getBrushTool(player.getItemInHand(HandSide.MAIN_HAND).getType()).setSize(radius);
|
||||
session.getBrushTool(player).setSize(radius);
|
||||
player.print("Brush size set.");
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class ShapedBrushCommand extends SimpleCommand<Object> {
|
||||
|
||||
try {
|
||||
WorldEdit.getInstance().checkMaxBrushRadius(radius);
|
||||
BrushTool tool = session.getBrushTool(player.getItemInHand(HandSide.MAIN_HAND).getType());
|
||||
BrushTool tool = session.getBrushTool(player);
|
||||
tool.setSize(radius);
|
||||
tool.setFill(null);
|
||||
tool.setBrush(new OperationFactoryBrush(factory, regionFactory, session), permission);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren