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

@ -60,7 +60,7 @@ public class SnapshotCommands {
max = 1
)
@CommandPermissions("worldedit.snapshots.list")
public void list(Player player, LocalSession session, EditSession editSession, CommandContext args) throws WorldEditException {
public void list(Player player, LocalSession session, CommandContext args) throws WorldEditException {
LocalConfiguration config = we.getConfiguration();
@ -110,7 +110,7 @@ public class SnapshotCommands {
max = 1
)
@CommandPermissions("worldedit.snapshots.restore")
public void use(Player player, LocalSession session, EditSession editSession, CommandContext args) throws WorldEditException {
public void use(Player player, LocalSession session, CommandContext args) throws WorldEditException {
LocalConfiguration config = we.getConfiguration();
@ -153,7 +153,7 @@ public class SnapshotCommands {
max = 1
)
@CommandPermissions("worldedit.snapshots.restore")
public void sel(Player player, LocalSession session, EditSession editSession, CommandContext args) throws WorldEditException {
public void sel(Player player, LocalSession session, CommandContext args) throws WorldEditException {
LocalConfiguration config = we.getConfiguration();
if (config.snapshotRepo == null) {
@ -200,7 +200,7 @@ public class SnapshotCommands {
max = -1
)
@CommandPermissions("worldedit.snapshots.restore")
public void before(Player player, LocalSession session, EditSession editSession, CommandContext args) throws WorldEditException {
public void before(Player player, LocalSession session, CommandContext args) throws WorldEditException {
LocalConfiguration config = we.getConfiguration();
@ -239,7 +239,7 @@ public class SnapshotCommands {
max = -1
)
@CommandPermissions("worldedit.snapshots.restore")
public void after(Player player, LocalSession session, EditSession editSession, CommandContext args) throws WorldEditException {
public void after(Player player, LocalSession session, CommandContext args) throws WorldEditException {
LocalConfiguration config = we.getConfiguration();