use of me.botsko.prism.wands.RollbackWand in project Prism-Bukkit by prism.
the class Preview method apply.
/**
*
* @return
*/
@Override
public void apply() {
if (!worldChangeQueue.isEmpty()) {
if (!is_preview && player != null) {
Wand oldwand = null;
if (Prism.playersWithActiveTools.containsKey(player.getName())) {
// Pull the wand in use
oldwand = Prism.playersWithActiveTools.get(player.getName());
}
boolean show_nearby = true;
if (oldwand != null && oldwand instanceof RollbackWand) {
show_nearby = false;
}
if (show_nearby) {
// Inform nearby players
plugin.notifyNearby(player, parameters.getRadius(), player.getDisplayName() + " is performing a " + processType.name().toLowerCase() + " near you.");
// Inform staff
if (plugin.getConfig().getBoolean("prism.alerts.alert-staff-to-applied-process")) {
final String cmd = parameters.getOriginalCommand();
if (cmd != null) {
plugin.alertPlayers(player, ChatColor.WHITE + processType.name().toLowerCase() + " by " + player.getDisplayName() + ChatColor.GRAY + parameters.getOriginalCommand());
}
}
}
}
// Offload the work of world changes
// to a scheduled sync task
processWorldChanges();
}
}
Aggregations