
Untitled
By: a guest on
May 26th, 2012 | syntax:
None | size: 1.54 KB | hits: 23 | expires: Never
package com.github.Havefunpeeps.McLottery;
import java.util.logging.Logger;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.java.JavaPlugin;
public class McLottery extends JavaPlugin{
public final Logger logger = Logger.getLogger("Minecraft");
public static McLottery plugin;
public void onDisable() {
PluginDescriptionFile pdfFile = this.getDescription();
this.logger.info(pdfFile.getName() + " Has Been Disabled!");
}
public void onEnable() {
PluginDescriptionFile pdfFile = this.getDescription();
this.logger.info(pdfFile.getName() + " Version " + pdfFile.getVersion() + " Has Been Enabled!");
}
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
Player player = (Player) sender;
if(commandLabel.equalsIgnoreCase("mclottery")){
player.sendMessage("This plugin is a Lottery for minecraft!");
player.sendMessage("The Pot for the next lottery is: " +IronDeposited+ " Iron, " +GoldDeposited+ " Gold, and " +DiamondsDeposited+ " Diamonds.");
player.sendMessage("To Deposit into the Lottery for a chance to win it all: /mclgive #Iron #Gold #Diamonds");
}
if(commandLabel.equalsIgnoreCase("mclgive")){
if(args.length == 3){
//record amount
}else{
player.sendMessage("You used an incorrect format for the command! Please review the Command Usage!");
}
}
return false;
}
}