geforkt von Mirrors/FastAsyncWorldEdit
Update Upstream
98adde2 Allow toggleplace to work on any Actor + Locatable
Dieser Commit ist enthalten in:
Ursprung
19592df1f6
Commit
88764d8d46
@ -44,6 +44,7 @@ import com.sk89q.worldedit.extension.input.InputParseException;
|
||||
import com.sk89q.worldedit.extension.input.ParserContext;
|
||||
import com.sk89q.worldedit.extension.platform.Actor;
|
||||
import com.sk89q.worldedit.extension.platform.Capability;
|
||||
import com.sk89q.worldedit.extension.platform.Locatable;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
import com.sk89q.worldedit.function.mask.Mask;
|
||||
import com.sk89q.worldedit.internal.command.CommandRegistrationHandler;
|
||||
@ -405,11 +406,15 @@ public class GeneralCommands {
|
||||
desc = "Switch between your position and pos1 for placement"
|
||||
)
|
||||
@CommandPermissions("worldedit.toggleplace")
|
||||
public void togglePlace(Player player, LocalSession session) {
|
||||
public void togglePlace(Actor actor, LocalSession session) {
|
||||
if (!(actor instanceof Locatable)) {
|
||||
actor.print(Caption.of("worldedit.toggleplace.not-locatable"));
|
||||
return;
|
||||
}
|
||||
if (session.togglePlacementPosition()) {
|
||||
player.print(Caption.of("worldedit.toggleplace.pos1"));
|
||||
actor.print(Caption.of("worldedit.toggleplace.pos1"));
|
||||
} else {
|
||||
player.print(Caption.of("worldedit.toggleplace.player"));
|
||||
actor.print(Caption.of("worldedit.toggleplace.player"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -297,6 +297,7 @@
|
||||
"worldedit.gmask.set": "Global mask set.",
|
||||
"worldedit.toggleplace.pos1": "Now placing at pos #1.",
|
||||
"worldedit.toggleplace.player": "Now placing at the block you stand in.",
|
||||
"worldedit.toggleplace.not-locatable": "Cannot toggle placing in this context.",
|
||||
"worldedit.searchitem.too-short": "Enter a longer search string (len > 2).",
|
||||
"worldedit.searchitem.either-b-or-i": "You cannot use both the 'b' and 'i' flags simultaneously.",
|
||||
"worldedit.searchitem.searching": "(Please wait... searching items.)",
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren