3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-07 12:00:07 +01:00

get tool from player

Dieser Commit ist enthalten in:
Jesse Boyd 2019-06-29 04:27:46 +10:00
Ursprung d6280ec945
Commit 8b9a2ff18c
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F
3 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -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 ======");

Datei anzeigen

@ -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.");
}
}

Datei anzeigen

@ -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);