Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package test.plugin;
- import org.bukkit.Bukkit;
- import org.bukkit.Sound;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandExecutor;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import test.plugin.main.Main;
- public class gdf implements CommandExecutor {
- int tt;
- static Main main;
- public gdf(Main instance){
- main = instance;
- }
- public boolean onCommand(final CommandSender sender, Command cmd, String label, String[] args) {
- //test
- if(cmd.getName().equalsIgnoreCase("t")){
- final Player p =(Player)sender;
- if(!p.hasPermission("t.admin")){
- tt = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(main, new Runnable(){
- public void run(){
- p.playSound(p.getLocation(), Sound.ENDERDRAGON_GROWL, 100, 100);
- p.playSound(p.getLocation(), Sound.WITHER_DEATH, 100, 100);
- p.playSound(p.getLocation(), Sound.ANVIL_LAND, 100, 100);
- p.playSound(p.getLocation(), Sound.AMBIENCE_CAVE, 100, 100);
- }
- }, 0L, 20L);
- return true;
- }
- p.sendMessage("ok");
- return true;
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement