Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MyListener extends PluginListener {
- public boolean onCommand(Player player, String[] split) {
- player.sendMessage("You used a command.");
- if (split[0].equals("/forcedestroy") && player.canUseCommand("/forcedestroy")) {
- player.sendMessage("You used the forcedestroy command.");
- Location L = player.getLocation();
- player.sendMessage("I have your location...");
- Block underPlayer = etc.getServer().getBlockAt((int) L.x, (int) L.y-1, (int) L.z);
- underPlayer.setType(0);
- player.sendMessage("And now a block near you should vanished into thin air!");
- return true;
- }
- else{
- return false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement