mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Further work on this. Currently fast mode breaks doors, gotta work out why applying physics to doors breaks them.
This commit is contained in:
@ -126,16 +126,17 @@ public class GeneralCommands {
|
||||
public void reorderMode(Player player, LocalSession session, EditSession editSession, CommandContext args) throws WorldEditException {
|
||||
String newState = args.getString(0, null);
|
||||
if (newState == null) {
|
||||
player.print("The reorder mode is " + session.getReorderMode().getName());
|
||||
player.print("The reorder mode is " + session.getReorderMode().getDisplayName());
|
||||
} else {
|
||||
EditSession.ReorderMode reorderMode = EditSession.ReorderMode.getFromName(newState);
|
||||
if (reorderMode == null) {
|
||||
java.util.Optional<EditSession.ReorderMode> reorderModeOptional = EditSession.ReorderMode.getFromDisplayName(newState);
|
||||
if (!reorderModeOptional.isPresent()) {
|
||||
player.printError("Unknown reorder mode!");
|
||||
return;
|
||||
}
|
||||
|
||||
EditSession.ReorderMode reorderMode = reorderModeOptional.get();
|
||||
session.setReorderMode(reorderMode);
|
||||
player.print("The reorder mode is now " + session.getReorderMode().getName());
|
||||
player.print("The reorder mode is now " + session.getReorderMode().getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user