mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-19 23:13:53 +00:00
Moving some commands
This commit is contained in:
@ -15,9 +15,17 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||
*/
|
||||
public class VoxelSniper extends JavaPlugin {
|
||||
private static VoxelSniper instance;
|
||||
private SniperManager sniperManager = new SniperManager(this);
|
||||
private final VoxelSniperListener voxelSniperListener = new VoxelSniperListener(this);
|
||||
private SniperManager sniperManager = new SniperManager(this);
|
||||
private VoxelSniperConfiguration voxelSniperConfiguration;
|
||||
private Brushes brushManager = new Brushes();
|
||||
|
||||
/**
|
||||
* @return {@link VoxelSniper}
|
||||
*/
|
||||
public static VoxelSniper getInstance() {
|
||||
return VoxelSniper.instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns {@link com.thevoxelbox.voxelsniper.Brushes} for current instance.
|
||||
@ -28,15 +36,6 @@ public class VoxelSniper extends JavaPlugin {
|
||||
return brushManager;
|
||||
}
|
||||
|
||||
private Brushes brushManager = new Brushes();
|
||||
|
||||
/**
|
||||
* @return {@link VoxelSniper}
|
||||
*/
|
||||
public static VoxelSniper getInstance() {
|
||||
return VoxelSniper.instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns object for accessing global VoxelSniper options.
|
||||
*
|
||||
@ -67,7 +66,7 @@ public class VoxelSniper extends JavaPlugin {
|
||||
return voxelSniperListener.onCommand((Player) sender, arguments, command.getName());
|
||||
}
|
||||
|
||||
getLogger().info("Only Players can execute commands.");
|
||||
getLogger().info("Only players can execute VoxelSniper commands.");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.thevoxelbox.voxelsniper.command;
|
||||
|
||||
import com.boydti.fawe.config.BBC;
|
||||
import com.thevoxelbox.voxelsniper.Sniper;
|
||||
import com.thevoxelbox.voxelsniper.VoxelSniper;
|
||||
import com.thevoxelbox.voxelsniper.api.command.VoxelCommand;
|
||||
@ -21,12 +22,12 @@ public class VoxelUndoCommand extends VoxelCommand {
|
||||
int amount = Integer.parseInt(args[0]);
|
||||
sniper.undo(amount);
|
||||
} catch (NumberFormatException exception) {
|
||||
player.sendMessage("Error while parsing amount of undo. Number format exception.");
|
||||
player.sendMessage(BBC.getPrefix() + "Number expected; string given.");
|
||||
}
|
||||
} else {
|
||||
sniper.undo();
|
||||
}
|
||||
plugin.getLogger().info("Player \"" + player.getName() + "\" used /u");
|
||||
// plugin.getLogger().info("Player \"" + player.getName() + "\" used /u");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user