Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-09 13:00:05 +01:00
Fixed compile issue
Dieser Commit ist enthalten in:
Ursprung
e72f1b32df
Commit
d415f79e4b
@ -142,6 +142,7 @@ public class SelectionCommands {
|
|||||||
actor.printError("You must provide coordinates as console.");
|
actor.printError("You must provide coordinates as console.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!session.getRegionSelector(world).selectSecondary(pos.toBlockPoint(), ActorSelectorLimits.forActor(actor))) {
|
if (!session.getRegionSelector(world).selectSecondary(pos.toBlockPoint(), ActorSelectorLimits.forActor(actor))) {
|
||||||
BBC.SELECTOR_ALREADY_SET.send(actor);
|
BBC.SELECTOR_ALREADY_SET.send(actor);
|
||||||
return;
|
return;
|
||||||
@ -158,16 +159,16 @@ public class SelectionCommands {
|
|||||||
@CommandPermissions("worldedit.selection.hpos")
|
@CommandPermissions("worldedit.selection.hpos")
|
||||||
public void hpos1(Player player, LocalSession session) throws WorldEditException {
|
public void hpos1(Player player, LocalSession session) throws WorldEditException {
|
||||||
|
|
||||||
BlockVector3 pos = player.getBlockTrace(300).toBlockPoint();
|
Location pos = player.getBlockTrace(300);
|
||||||
|
|
||||||
if (pos != null) {
|
if (pos != null) {
|
||||||
if (!session.getRegionSelector(player.getWorld()).selectPrimary(pos, ActorSelectorLimits.forActor(player))) {
|
if (!session.getRegionSelector(player.getWorld()).selectPrimary(pos.toBlockPoint(), ActorSelectorLimits.forActor(player))) {
|
||||||
BBC.SELECTOR_ALREADY_SET.send(player);
|
BBC.SELECTOR_ALREADY_SET.send(player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
session.getRegionSelector(player.getWorld())
|
session.getRegionSelector(player.getWorld())
|
||||||
.explainPrimarySelection(player, session, pos);
|
.explainPrimarySelection(player, session, pos.toBlockPoint());
|
||||||
} else {
|
} else {
|
||||||
BBC.NO_BLOCK.send(player);
|
BBC.NO_BLOCK.send(player);
|
||||||
}
|
}
|
||||||
@ -180,16 +181,16 @@ public class SelectionCommands {
|
|||||||
@CommandPermissions("worldedit.selection.hpos")
|
@CommandPermissions("worldedit.selection.hpos")
|
||||||
public void hpos2(Player player, LocalSession session) throws WorldEditException {
|
public void hpos2(Player player, LocalSession session) throws WorldEditException {
|
||||||
|
|
||||||
BlockVector3 pos = player.getBlockTrace(300).toBlockPoint();
|
Location pos = player.getBlockTrace(300);
|
||||||
|
|
||||||
if (pos != null) {
|
if (pos != null) {
|
||||||
if (!session.getRegionSelector(player.getWorld()).selectSecondary(pos, ActorSelectorLimits.forActor(player))) {
|
if (!session.getRegionSelector(player.getWorld()).selectSecondary(pos.toBlockPoint(), ActorSelectorLimits.forActor(player))) {
|
||||||
BBC.SELECTOR_ALREADY_SET.send(player);
|
BBC.SELECTOR_ALREADY_SET.send(player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
session.getRegionSelector(player.getWorld())
|
session.getRegionSelector(player.getWorld())
|
||||||
.explainSecondarySelection(player, session, pos);
|
.explainSecondarySelection(player, session, pos.toBlockPoint());
|
||||||
} else {
|
} else {
|
||||||
BBC.NO_BLOCK.send(player);
|
BBC.NO_BLOCK.send(player);
|
||||||
}
|
}
|
||||||
@ -469,10 +470,10 @@ public class SelectionCommands {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
region = session.getSelection(player.getWorld());
|
region = session.getSelection(player.getWorld());
|
||||||
|
|
||||||
player.print("Type: " + session.getRegionSelector(player.getWorld()).getTypeName());
|
player.print("Type: " + session.getRegionSelector(player.getWorld()).getTypeName());
|
||||||
|
|
||||||
for (String line : session.getRegionSelector(player.getWorld())
|
for (String line : session.getRegionSelector(player.getWorld()).getInformationLines()) {
|
||||||
.getInformationLines()) {
|
|
||||||
player.print(line);
|
player.print(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -481,8 +482,6 @@ public class SelectionCommands {
|
|||||||
.subtract(region.getMinimumPoint())
|
.subtract(region.getMinimumPoint())
|
||||||
.add(1, 1, 1);
|
.add(1, 1, 1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
player.print("Size: " + size);
|
player.print("Size: " + size);
|
||||||
player.print("Cuboid distance: " + region.getMaximumPoint().distance(region.getMinimumPoint()));
|
player.print("Cuboid distance: " + region.getMaximumPoint().distance(region.getMinimumPoint()));
|
||||||
player.print("# of blocks: " + region.getArea());
|
player.print("# of blocks: " + region.getArea());
|
||||||
@ -552,7 +551,7 @@ public class SelectionCommands {
|
|||||||
aliases = { ";", "/desel", "/deselect" },
|
aliases = { ";", "/desel", "/deselect" },
|
||||||
desc = "Choose a region selector"
|
desc = "Choose a region selector"
|
||||||
)
|
)
|
||||||
public void select(Actor actor, World world, LocalSession session, EditSession editSession,
|
public void select(Actor actor, World world, LocalSession session,
|
||||||
@Arg(desc = "Selector to switch to", def = "")
|
@Arg(desc = "Selector to switch to", def = "")
|
||||||
SelectorChoice selector,
|
SelectorChoice selector,
|
||||||
@Arg(desc = "Selector mask", def = "") Mask maskOpt,
|
@Arg(desc = "Selector mask", def = "") Mask maskOpt,
|
||||||
@ -624,7 +623,7 @@ public class SelectionCommands {
|
|||||||
break;
|
break;
|
||||||
case LIST:
|
case LIST:
|
||||||
default:
|
default:
|
||||||
CommandListBox box = new CommandListBox("Selection modes", null);
|
CommandListBox box = new CommandListBox("Selection modes", null, null);
|
||||||
box.setHidingHelp(true);
|
box.setHidingHelp(true);
|
||||||
TextComponentProducer contents = box.getContents();
|
TextComponentProducer contents = box.getContents();
|
||||||
contents.append(SubtleFormat.wrap("Select one of the modes below:")).newline();
|
contents.append(SubtleFormat.wrap("Select one of the modes below:")).newline();
|
||||||
@ -663,5 +662,4 @@ public class SelectionCommands {
|
|||||||
session.setRegionSelector(world, newSelector);
|
session.setRegionSelector(world, newSelector);
|
||||||
session.dispatchCUISelection(actor);
|
session.dispatchCUISelection(actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren