Permalink
Browse files

It now seems to run fine

  • Loading branch information...
me4502 committed Dec 21, 2018
1 parent 8088d0d commit 02382f15ba8d5e7b1f38208da9e50473dfb7e42d
@@ -138,7 +138,7 @@ public void report(CommandContext args, final Actor sender) throws CommandExcept

if (args.hasFlag('p')) {
sender.checkPermission("worldguard.report.pastebin");
ActorCallbackPaste.pastebin(worldGuard.getSupervisor(), sender, result, "WorldGuard report: %s.report");
ActorCallbackPaste.pastebin(worldGuard.getSupervisor(), sender, result, "WorldGuard report: %s.report", worldGuard.getExceptionConverter());
}
}

@@ -191,7 +191,7 @@ public void profile(final CommandContext args, final Actor sender) throws Comman
sampler = activeSampler = builder.start();
}

AsyncCommandHelper.wrap(sampler.getFuture(), worldGuard.getSupervisor(), sender)
AsyncCommandHelper.wrap(sampler.getFuture(), worldGuard.getSupervisor(), sender, worldGuard.getExceptionConverter())
.formatUsing(minutes)
.registerWithSupervisor("Running CPU profiler for %d minute(s)...")
.sendMessageAfterDelay("(Please wait... profiling for %d minute(s)...)")
@@ -217,7 +217,7 @@ public void onSuccess(Sampler result) {
}

if (pastebin) {
ActorCallbackPaste.pastebin(worldGuard.getSupervisor(), sender, output, "Profile result: %s.profile");
ActorCallbackPaste.pastebin(worldGuard.getSupervisor(), sender, output, "Profile result: %s.profile", worldGuard.getExceptionConverter());
}
}

@@ -76,7 +76,7 @@ public void addMember(CommandContext args, Actor sender) throws CommandException
WorldGuard.getInstance().getExecutorService().submit(resolver),
resolver.createAddAllFunction(region.getMembers()));

AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender)
AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender, worldGuard.getExceptionConverter())
.formatUsing(region.getId(), world.getName())
.registerWithSupervisor("Adding members to the region '%s' on '%s'")
.sendMessageAfterDelay("(Please wait... querying player names...)")
@@ -137,7 +137,7 @@ public void addOwner(CommandContext args, Actor sender) throws CommandException,
WorldGuard.getInstance().getExecutorService().submit(resolver),
resolver.createAddAllFunction(region.getOwners()));

AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender)
AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender, worldGuard.getExceptionConverter())
.formatUsing(region.getId(), world.getName())
.registerWithSupervisor("Adding owners to the region '%s' on '%s'")
.sendMessageAfterDelay("(Please wait... querying player names...)")
@@ -184,7 +184,7 @@ public void removeMember(CommandContext args, Actor sender) throws CommandExcept
resolver.createRemoveAllFunction(region.getMembers()));
}

AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender)
AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender, worldGuard.getExceptionConverter())
.formatUsing(region.getId(), world.getName())
.registerWithSupervisor("Removing members from the region '%s' on '%s'")
.sendMessageAfterDelay("(Please wait... querying player names...)")
@@ -231,7 +231,7 @@ public void removeOwner(CommandContext args, Actor sender) throws CommandExcepti
resolver.createRemoveAllFunction(region.getOwners()));
}

AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender)
AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender, worldGuard.getExceptionConverter())
.formatUsing(region.getId(), world.getName())
.registerWithSupervisor("Removing owners from the region '%s' on '%s'")
.sendMessageAfterDelay("(Please wait... querying player names...)")
@@ -131,7 +131,7 @@ public void define(CommandContext args, Actor sender) throws CommandException {
task.addOwnersFromCommand(args, 2);
ListenableFuture<?> future = WorldGuard.getInstance().getExecutorService().submit(task);

AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), player)
AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), player, worldGuard.getExceptionConverter())
.formatUsing(id)
.registerWithSupervisor("Adding the region '%s'...")
.sendMessageAfterDelay("(Please wait... adding '%s'...)")
@@ -183,7 +183,7 @@ public void redefine(CommandContext args, Actor sender) throws CommandException
RegionAdder task = new RegionAdder(manager, region);
ListenableFuture<?> future = WorldGuard.getInstance().getExecutorService().submit(task);

AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), player)
AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), player, worldGuard.getExceptionConverter())
.formatUsing(id)
.registerWithSupervisor("Updating the region '%s'...")
.sendMessageAfterDelay("(Please wait... updating '%s'...)")
@@ -284,7 +284,7 @@ public void claim(CommandContext args, Actor sender) throws CommandException {
task.setOwnersInput(new String[]{player.getName()});
ListenableFuture<?> future = worldGuard.getExecutorService().submit(task);

AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), player)
AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), player, worldGuard.getExceptionConverter())
.formatUsing(id)
.registerWithSupervisor("Claiming the region '%s'...")
.sendMessageAfterDelay("(Please wait... claiming '%s'...)")
@@ -439,7 +439,7 @@ public void list(CommandContext args, Actor sender) throws CommandException {

ListenableFuture<?> future = WorldGuard.getInstance().getExecutorService().submit(task);

AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender)
AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender, worldGuard.getExceptionConverter())
.registerWithSupervisor("Getting list of regions...")
.sendMessageAfterDelay("(Please wait... fetching region list...)")
.thenTellErrorsOnly("Failed to fetch region list");
@@ -743,7 +743,7 @@ public void remove(CommandContext args, Actor sender) throws CommandException {
task.setRemovalStrategy(RemovalStrategy.UNSET_PARENT_IN_CHILDREN);
}

AsyncCommandHelper.wrap(WorldGuard.getInstance().getExecutorService().submit(task), worldGuard.getSupervisor(), sender)
AsyncCommandHelper.wrap(WorldGuard.getInstance().getExecutorService().submit(task), worldGuard.getSupervisor(), sender, worldGuard.getExceptionConverter())
.formatUsing(existing.getId())
.registerWithSupervisor("Removing the region '%s'...")
.sendMessageAfterDelay("(Please wait... removing '%s'...)")
@@ -787,7 +787,7 @@ public void load(CommandContext args, final Actor sender) throws CommandExceptio

ListenableFuture<?> future = WorldGuard.getInstance().getExecutorService().submit(new RegionManagerReloader(manager));

AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender)
AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender, worldGuard.getExceptionConverter())
.forRegionDataLoad(world, false);
} else {
// Load regions for all worlds
@@ -802,7 +802,7 @@ public void load(CommandContext args, final Actor sender) throws CommandExceptio

ListenableFuture<?> future = WorldGuard.getInstance().getExecutorService().submit(new RegionManagerReloader(managers));

AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender)
AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender, worldGuard.getExceptionConverter())
.registerWithSupervisor("Loading regions for all worlds")
.sendMessageAfterDelay("(Please wait... loading region data for all worlds...)")
.thenRespondWith(
@@ -846,7 +846,7 @@ public void save(CommandContext args, final Actor sender) throws CommandExceptio

ListenableFuture<?> future = WorldGuard.getInstance().getExecutorService().submit(new RegionManagerSaver(manager));

AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender)
AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender, worldGuard.getExceptionConverter())
.forRegionDataSave(world, false);
} else {
// Save for all worlds
@@ -861,7 +861,7 @@ public void save(CommandContext args, final Actor sender) throws CommandExceptio

ListenableFuture<?> future = WorldGuard.getInstance().getExecutorService().submit(new RegionManagerSaver(managers));

AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender)
AsyncCommandHelper.wrap(future, worldGuard.getSupervisor(), sender, worldGuard.getExceptionConverter())
.registerWithSupervisor("Saving regions for all worlds")
.sendMessageAfterDelay("(Please wait... saving region data for all worlds...)")
.thenRespondWith(
@@ -95,7 +95,8 @@

plugin.checkPermission(receiver, "worldguard.debug.pastebin");
ActorCallbackPaste
.pastebin(WorldGuard.getInstance().getSupervisor(), plugin.wrapCommandSender(receiver), result, "Event debugging report: %s.txt");
.pastebin(WorldGuard.getInstance().getSupervisor(), plugin.wrapCommandSender(receiver), result,
"Event debugging report: %s.txt", WorldGuard.getInstance().getExceptionConverter());
} else {
receiver.sendMessage(result.replaceAll("(?m)^", ChatColor.AQUA.toString()));

0 comments on commit 02382f1

Please sign in to comment.