Advertisement
Bearstudio

Untitled

Jul 22nd, 2014
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. package me.bearstudio.Chatzy;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.ChatColor;
  5. import org.bukkit.command.Command;
  6. import org.bukkit.command.CommandSender;
  7. import org.bukkit.entity.Player;
  8. import org.bukkit.plugin.java.JavaPlugin;
  9.  
  10. public class Main extends JavaPlugin {
  11.  
  12. public void onEnable() {
  13. Bukkit.getServer().getLogger().info("Chatzy Plugin Enabled!");
  14. }
  15.  
  16. public void onDisable() {
  17. Bukkit.getServer().getLogger().info("Chatzy Plugin Disabled!");
  18. }
  19.  
  20. public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
  21.  
  22. if (!(sender instanceof Player)) {
  23. sender.sendMessage(ChatColor.RED + "The console can not use Chatzy");
  24.  
  25.  
  26.  
  27. Player player = (Player) sender;
  28.  
  29. if (cmd.getName().equalsIgnoreCase("chatzy help")) {
  30. player.sendMessage(ChatColor.GOLD + " [Chatzy v1.0 By Bearstudio] ");
  31. player.sendMessage(ChatColor.RED + " ");
  32. player.sendMessage(ChatColor.AQUA + " /say hello");
  33. }
  34. return true;
  35.  
  36. if (cmd.getName().equalsIgnoreCase("say hello")) {
  37. player.sendMessage(ChatColor.AQUA + "Hey!");
  38. }
  39. return true;
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement