Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main extends JavaPlugin{
- private static boolean play = false;
- @Override
- public void onEnable() {
- Bukkit.getScheduler().scheduleAsyncRepeatingTask(this, new Runnable(){
- public void run(){
- new Intoxicated();
- }
- }, 0, 160);
- }
- public static void playAll(Sound s, float a1){
- if(!play)return;
- for(Player p : Bukkit.getOnlinePlayers()){
- World w = p.getWorld();
- w.playSound(p.getLocation(), s, 1, a1);
- }
- }
- @Override
- public boolean onCommand(CommandSender sender, Command command, String cmd, String[] args) {
- if(cmd.equalsIgnoreCase("play")){
- play = true;
- }
- if(cmd.equalsIgnoreCase("pause")){
- play = false;
- }
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment