Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.jkjames7.bc;
- import java.util.logging.Logger;
- import org.bukkit.Bukkit;
- 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 Bc extends JavaPlugin{
- public final Logger logger = Logger.getLogger("Minecraft");
- public static Bc plugin;
- public void onDisable() {
- PluginDescriptionFile pdfFile = this.getDescription();
- this.logger.info(pdfFile.getName() + "bc has been Disabled!");
- }
- @Override
- public void onEnable() {
- PluginDescriptionFile pdfFile = this.getDescription();
- this.logger.info(pdfFile.getName() + " Version " + pdfFile.getVersion() + "bc has been Enabled!");
- getConfig().options().copyDefaults(true);
- saveConfig();
- }
- public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
- Player player = (Player) sender;
- if(commandLabel.equalsIgnoreCase("bcr")){
- if(player.hasPermission("bc.r")) {
- player.sendMessage(ChatColor.RED + "RELOADED!");
- getConfig().options().copyDefaults(true);
- saveConfig();
- }
- else if(commandLabel.equalsIgnoreCase("bc1")){
- if(player.hasPermission("bc.1")) {
- Bukkit.broadcastMessage(ChatColor.DARK_PURPLE + getConfig().getString("msg1"));
- }
- else if(commandLabel.equalsIgnoreCase("bc"));
- player.sendMessage(ChatColor.AQUA + "~ Broadcaster commands:~ ");
- player.sendMessage(ChatColor.GOLD + "~ /bcr " + ChatColor.BLUE + "Use to reload the plugin config");
- player.sendMessage(ChatColor.GOLD + "~ /bc1 " + ChatColor.BLUE + "Broadcast the first set message");
- return false;
- }
- return false;
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement