mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 04:46:40 +00:00
Remove CUI and other cleaning
This commit is contained in:
@ -23,7 +23,7 @@ import com.boydti.fawe.Fawe;
|
||||
import com.boydti.fawe.FaweVersion;
|
||||
import com.boydti.fawe.config.BBC;
|
||||
import com.boydti.fawe.config.Settings;
|
||||
import com.boydti.fawe.util.*;
|
||||
import com.boydti.fawe.util.IncendoPaster;
|
||||
import com.sk89q.minecraft.util.commands.Command;
|
||||
import com.sk89q.minecraft.util.commands.CommandContext;
|
||||
import com.sk89q.minecraft.util.commands.CommandPermissions;
|
||||
@ -32,16 +32,24 @@ import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.entity.Player;
|
||||
import com.sk89q.worldedit.event.platform.ConfigurationLoadEvent;
|
||||
import com.sk89q.worldedit.extension.platform.*;
|
||||
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.CommandManager;
|
||||
import com.sk89q.worldedit.extension.platform.Platform;
|
||||
import com.sk89q.worldedit.extension.platform.Platform;
|
||||
import com.sk89q.worldedit.extension.platform.PlatformManager;
|
||||
import com.sk89q.worldedit.extension.platform.PlatformManager;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.Map;
|
||||
import java.util.TimeZone;
|
||||
|
||||
@Command(aliases = {"worldedit", "we", "fawe"}, desc = "Updating, informational, debug and help commands")
|
||||
public class WorldEditCommands {
|
||||
@ -54,19 +62,19 @@ public class WorldEditCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"version", "ver"},
|
||||
usage = "",
|
||||
desc = "Get WorldEdit/FAWE version",
|
||||
min = 0,
|
||||
max = 0,
|
||||
queued = false
|
||||
aliases = { "version", "ver" },
|
||||
usage = "",
|
||||
desc = "Get WorldEdit/FAWE version",
|
||||
min = 0,
|
||||
max = 0,
|
||||
queued = false
|
||||
)
|
||||
public void version(Actor actor) throws WorldEditException {
|
||||
FaweVersion fVer = Fawe.get().getVersion();
|
||||
String fVerStr = fVer == null ? "unknown" : "-" + fVer.build;
|
||||
actor.print(BBC.getPrefix() + "FastAsyncWorldEdit-1.13" + fVerStr + " by Empire92");
|
||||
actor.print("FastAsyncWorldEdit-1.13" + fVerStr + " by Empire92");
|
||||
if (fVer != null) {
|
||||
actor.printDebug("------------------------------------");
|
||||
actor.printDebug("----------- Platforms -----------");
|
||||
FaweVersion version = Fawe.get().getVersion();
|
||||
Date date = new GregorianCalendar(2000 + version.year, version.month - 1, version.day).getTime();
|
||||
actor.printDebug(" - DATE: " + date.toLocaleString());
|
||||
@ -76,11 +84,13 @@ public class WorldEditCommands {
|
||||
actor.printDebug("------------------------------------");
|
||||
}
|
||||
PlatformManager pm = we.getPlatformManager();
|
||||
actor.printDebug("Platforms:");
|
||||
|
||||
actor.printDebug("----------- Platforms -----------");
|
||||
for (Platform platform : pm.getPlatforms()) {
|
||||
actor.printDebug(String.format(" - %s", platform.getPlatformName()));
|
||||
actor.printDebug(String.format("* %s", platform.getPlatformName()));
|
||||
}
|
||||
actor.printDebug("Capabilities:");
|
||||
|
||||
actor.printDebug("----------- Capabilities -----------");
|
||||
for (Capability capability : Capability.values()) {
|
||||
Platform platform = pm.queryCapability(capability);
|
||||
actor.printDebug(String.format(" - %s: %s", capability.name(), platform != null ? platform.getPlatformName() : "NONE"));
|
||||
@ -90,11 +100,11 @@ public class WorldEditCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"reload"},
|
||||
usage = "",
|
||||
desc = "Reload configuration and translations",
|
||||
min = 0,
|
||||
max = 0
|
||||
aliases = { "reload" },
|
||||
usage = "",
|
||||
desc = "Reload configuration and translations",
|
||||
min = 0,
|
||||
max = 0
|
||||
)
|
||||
@CommandPermissions("worldedit.reload")
|
||||
public void reload(Actor actor) throws WorldEditException {
|
||||
@ -102,7 +112,7 @@ public class WorldEditCommands {
|
||||
we.getEventBus().post(new ConfigurationLoadEvent(we.getPlatformManager().queryCapability(Capability.CONFIGURATION).getConfiguration()));
|
||||
Fawe.get().setupConfigs();
|
||||
CommandManager.getInstance().register(we.getPlatformManager().queryCapability(Capability.USER_COMMANDS));
|
||||
actor.print(BBC.getPrefix() + "Reloaded FastAsyncWorldEdit configuration and translation files");
|
||||
actor.print("Configuration and translations reloaded!");
|
||||
}
|
||||
|
||||
@Command(
|
||||
@ -139,11 +149,11 @@ public class WorldEditCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"cui"},
|
||||
usage = "",
|
||||
desc = "Complete CUI handshake (internal usage)",
|
||||
min = 0,
|
||||
max = 0
|
||||
aliases = { "cui" },
|
||||
usage = "",
|
||||
desc = "Complete CUI handshake (internal usage)",
|
||||
min = 0,
|
||||
max = 0
|
||||
)
|
||||
public void cui(Player player, LocalSession session) throws WorldEditException {
|
||||
session.setCUISupport(true);
|
||||
@ -151,11 +161,11 @@ public class WorldEditCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"tz"},
|
||||
usage = "[timezone]",
|
||||
desc = "Set your timezone for snapshots",
|
||||
min = 1,
|
||||
max = 1
|
||||
aliases = { "tz" },
|
||||
usage = "[timezone]",
|
||||
desc = "Set your timezone for snapshots",
|
||||
min = 1,
|
||||
max = 1
|
||||
)
|
||||
public void tz(Player player, LocalSession session, CommandContext args) throws WorldEditException {
|
||||
TimeZone tz = TimeZone.getTimeZone(args.getString(0));
|
||||
@ -165,13 +175,14 @@ public class WorldEditCommands {
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = {"help"},
|
||||
usage = "[<command>]",
|
||||
aliases = { "help" },
|
||||
usage = "[<command>]",
|
||||
desc = "Displays help for FAWE commands",
|
||||
min = 0,
|
||||
max = -1,
|
||||
queued = false
|
||||
min = 0,
|
||||
max = -1,
|
||||
queued = false
|
||||
)
|
||||
@CommandPermissions("worldedit.help")
|
||||
public void help(Actor actor, CommandContext args) throws WorldEditException {
|
||||
UtilityCommands.help(args, we, actor);
|
||||
}
|
||||
|
Reference in New Issue
Block a user