Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package duy.doge.kiki;
- import java.util.logging.Logger;
- import org.bukkit.Bukkit;
- import org.bukkit.ChatColor;
- import org.bukkit.Location;
- import org.bukkit.Server;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.command.ConsoleCommandSender;
- import org.bukkit.entity.Player;
- import org.bukkit.event.Listener;
- import org.bukkit.plugin.PluginManager;
- import org.bukkit.plugin.java.JavaPlugin;
- import org.bukkit.scheduler.BukkitScheduler;
- public class Main
- extends JavaPlugin
- implements Listener
- {
- public void onEnable()
- {
- Bukkit.getConsoleSender().sendMessage("&7[&6PackMusic&7] &aPlugins has been enable".replace("&", "�"));
- getServer().getPluginManager().registerEvents(this, this);
- }
- public void onDisable()
- {
- getLogger().info(ChatColor.DARK_RED + "Pai pai................................");
- }
- public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
- {
- if (!(sender instanceof Player))
- {
- sender.sendMessage("You must be a player to use commands");
- return true;
- }
- final Player p = (Player)sender;
- Location loc = p.getEyeLocation();
- if ((cmd.getName().equalsIgnoreCase("packmusic")) ||
- (args.length == 0))
- {
- sender.sendMessage("�c�lPackMusic >>");
- sender.sendMessage("�b/packmusic stop");
- sender.sendMessage("�b/packmusic Night_17 - Taku");
- sender.sendMessage("�b/packmusic Happy_New_Year - ABBA");
- sender.sendMessage("�b/packmusic ROSES - Chainsmoker");
- sender.sendMessage("�b/packmusic Tet_dong_day - Kay Tr?n");
- sender.sendMessage("�b/packmusic Beo_dat_may_troi - Anh Th?ng");
- sender.sendMessage("");
- sender.sendMessage("�7V� m?t s? b�i nh?c kh�c");
- return true;
- }
- if (args[0].equalsIgnoreCase("stop"))
- {
- p.stopSound("Happy_New_Year");
- p.stopSound("ROSES");
- p.stopSound("Tet_dong_day");
- p.stopSound("Beo_dat_may_troi");
- p.stopSound("Night-17");
- p.sendMessage(ChatColor.GREEN + "�? t?t nh?c");
- }
- if (args[0].equalsIgnoreCase("Night_17"))
- {
- p.stopSound("Happy_New_Year");
- p.stopSound("ROSES");
- p.stopSound("Tet_dong_day");
- p.stopSound("Beo_dat_may_troi");
- p.sendMessage("�ang ch�i nh?c Night-17......");
- Bukkit.getScheduler().runTaskLater(this, new Runnable()
- {
- public void run()
- {
- p.playSound(p.getLocation(), "Night-17", 500.0F, 1.0F);
- }
- }, 20L);
- return true;
- }
- if (args[0].equalsIgnoreCase("Happy_New_Year"))
- {
- p.stopSound("Night-17");
- p.stopSound("ROSES");
- p.stopSound("Tet_dong_day");
- p.stopSound("Beo_dat_may_troi");
- p.sendMessage("�ang ch�i nh?c Happy New Year......");
- Bukkit.getScheduler().runTaskLater(this, new Runnable()
- {
- public void run()
- {
- p.playSound(p.getLocation(), "Happy_New_Year", 500.0F, 1.0F);
- }
- }, 20L);
- return true;
- }
- if (args[0].equalsIgnoreCase("ROSES"))
- {
- p.stopSound("Night-17");
- p.stopSound("Happy_New_Year");
- p.stopSound("Tet_dong_day");
- p.stopSound("Beo_dat_may_troi");
- p.sendMessage("�ang ch�i nh?c ROSES......");
- Bukkit.getScheduler().runTaskLater(this, new Runnable()
- {
- public void run()
- {
- p.playSound(p.getLocation(), "ROSES", 500.0F, 50.0F);
- }
- }, 20L);
- return true;
- }
- if (args[0].equalsIgnoreCase("Tet_dong_day"))
- {
- p.stopSound("Night-17");
- p.stopSound("Happy_New_Year");
- p.stopSound("ROSES");
- p.stopSound("Beo_dat_may_troi");
- p.sendMessage("�ang ch�i nh?c T?t �ong �?y......");
- Bukkit.getScheduler().runTaskLater(this, new Runnable()
- {
- public void run()
- {
- p.playSound(p.getLocation(), "Tet_dong_day", 500.0F, 1.0F);
- }
- }, 20L);
- return true;
- }
- if (args[0].equalsIgnoreCase("Beo_dat_may_troi"))
- {
- p.stopSound("Night-17");
- p.stopSound("Happy_New_Year");
- p.stopSound("ROSES");
- p.stopSound("Tet_dong_day");
- p.sendMessage("�ang ch�i nh?c B�o d?t m�y tr�i......");
- Bukkit.getScheduler().runTaskLater(this, new Runnable()
- {
- public void run()
- {
- p.playSound(p.getLocation(), "Beo_dat_may_troi", 500.0F, 1.0F);
- }
- }, 20L);
- return true;
- }
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment