Advertisement
seeker6

My attempt at a plugin

Sep 17th, 2014
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.61 KB | None | 0 0
  1. package me.RainbowCreeeper.compliment.java;
  2.  
  3. import org.bukkit.command.Command;
  4. import org.bukkit.command.CommandSender;
  5. import org.bukkit.entity.Player;
  6. import org.bukkit.plugin.java.JavaPlugin;
  7.  
  8. public class ComplimentMe extends JavaPlugin {
  9.    
  10.     @Override
  11.     public void onEnable(){
  12.        
  13.     }
  14.     @Override
  15.     public void onDisable(){
  16.        
  17.     }
  18.    
  19.     String[] randomString = new String[16];{
  20.     randomString[0] = "Your skin is looking particularly amazing today!";
  21.     randomString[1] = "Wow! You look amazing holding those diamonds!";
  22.     randomString[2] = "I can't craft a world without you!";
  23.     randomString[3] = "You are the coolest player on this server!";
  24.     randomString[4] = "I bet zombies swoon over you!";
  25.     randomString[5] = "I bet you and creepers have a blast!";
  26.     randomString[6] = "I love it when you sprint like that";
  27.     randomString[7] = "Wow you are such a hard worker!";
  28.     randomString[8] = "I dig your style!";
  29.     randomString[9] = "Your potion brew me away!";
  30.     randomString[10] = "I bet people call you big miner!";
  31.     randomString[11] = "Are you a ghast cause you blew me away";
  32.     randomString[12] = "I wanna stick to you like slimes";
  33.     randomString[13] = "You are proably great a riding horses!";
  34.     randomString[14] = "your oresome!";
  35.     randomString[15] = "You probably listen to bed rock!";
  36.    
  37.            
  38.        
  39.     public boolean onCommand (CommandSender sender, Command cmd, String label, String[] args){
  40.        
  41.         if (cmd.getName().equalsIgnoreCase("praise")) {
  42.            
  43.         }
  44.            
  45.             Player player = (Player) sender;
  46.        
  47.         Player.sendMessage(randomString[(int)(Math.random()*15)]);
  48.        
  49.         return true;
  50.    
  51.        
  52.     }
  53.    
  54.         return false;
  55.     }
  56.  
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement