Guest User

Untitled

a guest
Oct 29th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.51 KB | None | 0 0
  1. package me.Stoolbend.CraftList;
  2.  
  3. import java.util.List;
  4.  
  5. import org.bukkit.ChatColor;
  6. import org.bukkit.Server;
  7. import org.bukkit.command.Command;
  8. import org.bukkit.command.CommandExecutor;
  9. import org.bukkit.command.CommandSender;
  10. import org.bukkit.entity.LivingEntity;
  11. import org.bukkit.entity.Player;
  12. import java.sql.*;
  13.  
  14. public class CraftListCommandManager implements CommandExecutor {
  15.     public static CraftList plugin;
  16.     public static Server server;
  17.    
  18.     public static List<LivingEntity> entities;
  19.    
  20.     // Thanks for DominionSpy for the help with the DB Connection
  21.     public Connection CLDB;
  22.     public CraftListCommandManager(CraftList instance){
  23.         plugin = instance;
  24.         CLDB = DriverManager.getConnection("jdbc:mysql://storecraft.org:3306/storrcra_whitelist?user=STORRCRA&password=,~7Xq.rkm0PB");
  25.     }
  26.  
  27.     public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
  28.         if(label.equalsIgnoreCase("clist")){
  29.            
  30.             Player player = (Player) sender;
  31.            
  32.             if(args.length == 1 && args[0].equalsIgnoreCase("listnew")){
  33.                 //MySQL Stuff - Only for Storecraft.org Server
  34.                 //End MySQL Stuff
  35.                 sender.sendMessage(ChatColor.GREEN + "[CraftList] There are currently 0 new applications.");
  36.             }
  37.            
  38.             if(args.length == 0){
  39.                 sender.sendMessage(ChatColor.RED + "[CraftList] You didn't specify any arguments");
  40.                 //sender.sendMessage(ChatColor.YELLOW + "/clist listnew " + ChatColor.WHITE + "- Lists the amount of new applications currently waiting");
  41.             }
  42.            
  43.         }
  44.         return false;
  45.     }
  46. }
Add Comment
Please, Sign In to add comment