3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-02 17:40:09 +01:00

Update Upstream

98adde2 Allow toggleplace to work on any Actor + Locatable
Dieser Commit ist enthalten in:
NotMyFault 2021-04-10 11:15:41 +02:00
Ursprung 19592df1f6
Commit 88764d8d46
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 158F5701A6AAD00C
2 geänderte Dateien mit 9 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -44,6 +44,7 @@ import com.sk89q.worldedit.extension.input.InputParseException;
import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.extension.input.ParserContext;
import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.extension.platform.Capability; 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.extent.clipboard.Clipboard;
import com.sk89q.worldedit.function.mask.Mask; import com.sk89q.worldedit.function.mask.Mask;
import com.sk89q.worldedit.internal.command.CommandRegistrationHandler; import com.sk89q.worldedit.internal.command.CommandRegistrationHandler;
@ -405,11 +406,15 @@ public class GeneralCommands {
desc = "Switch between your position and pos1 for placement" desc = "Switch between your position and pos1 for placement"
) )
@CommandPermissions("worldedit.toggleplace") @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()) { if (session.togglePlacementPosition()) {
player.print(Caption.of("worldedit.toggleplace.pos1")); actor.print(Caption.of("worldedit.toggleplace.pos1"));
} else { } else {
player.print(Caption.of("worldedit.toggleplace.player")); actor.print(Caption.of("worldedit.toggleplace.player"));
} }
} }

Datei anzeigen

@ -297,6 +297,7 @@
"worldedit.gmask.set": "Global mask set.", "worldedit.gmask.set": "Global mask set.",
"worldedit.toggleplace.pos1": "Now placing at pos #1.", "worldedit.toggleplace.pos1": "Now placing at pos #1.",
"worldedit.toggleplace.player": "Now placing at the block you stand in.", "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.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.either-b-or-i": "You cannot use both the 'b' and 'i' flags simultaneously.",
"worldedit.searchitem.searching": "(Please wait... searching items.)", "worldedit.searchitem.searching": "(Please wait... searching items.)",