Some command fixes

Fix EditSession being created for commands that don't need it
Fix error from schematic list (when there are files in sub directories)
Fix dispatcher redundantly checking a huge number of permissions
This commit is contained in:
Jesse Boyd
2016-12-24 15:56:53 +11:00
committed by wizjany
parent b2fb73582f
commit 4a8bba7a54
15 changed files with 79 additions and 93 deletions

View File

@ -90,7 +90,7 @@ public class WorldEditCommands {
min = 0,
max = 0
)
public void cui(Player player, LocalSession session, EditSession editSession, CommandContext args) throws WorldEditException {
public void cui(Player player, LocalSession session, CommandContext args) throws WorldEditException {
session.setCUISupport(true);
session.dispatchCUISetup(player);
}
@ -102,7 +102,7 @@ public class WorldEditCommands {
min = 1,
max = 1
)
public void tz(Player player, LocalSession session, EditSession editSession, CommandContext args) throws WorldEditException {
public void tz(Player player, LocalSession session, CommandContext args) throws WorldEditException {
TimeZone tz = TimeZone.getTimeZone(args.getString(0));
session.setTimezone(tz);
player.print("Timezone set for this session to: " + tz.getDisplayName());