Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-09 21:10:05 +01:00
Fixed /butcher not working correctly in-game.
@Optional does not work on parameter bindings of the PROVIDES type at this time. Fixes WORLDEDIT-3139.
Dieser Commit ist enthalten in:
Ursprung
ede28df487
Commit
8f8d991ee1
@ -375,9 +375,9 @@ public class UtilityCommands {
|
|||||||
)
|
)
|
||||||
@CommandPermissions("worldedit.butcher")
|
@CommandPermissions("worldedit.butcher")
|
||||||
@Logging(PLACEMENT)
|
@Logging(PLACEMENT)
|
||||||
public void butcher(Actor actor, @Optional Player player, @Optional LocalSession session, CommandContext args) throws WorldEditException {
|
public void butcher(Actor actor, CommandContext args) throws WorldEditException {
|
||||||
|
|
||||||
LocalConfiguration config = we.getConfiguration();
|
LocalConfiguration config = we.getConfiguration();
|
||||||
|
Player player = actor instanceof Player ? (Player) actor : null;
|
||||||
|
|
||||||
// technically the default can be larger than the max, but that's not my problem
|
// technically the default can be larger than the max, but that's not my problem
|
||||||
int radius = config.butcherDefaultRadius;
|
int radius = config.butcherDefaultRadius;
|
||||||
@ -407,6 +407,7 @@ public class UtilityCommands {
|
|||||||
|
|
||||||
int killed;
|
int killed;
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
|
LocalSession session = we.getSessionManager().get(player);
|
||||||
killed = player.getWorld().killMobs(session.getPlacementPosition(player), radius, flags.flags);
|
killed = player.getWorld().killMobs(session.getPlacementPosition(player), radius, flags.flags);
|
||||||
} else {
|
} else {
|
||||||
killed = 0;
|
killed = 0;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren