Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.thegarfish.siege;
- 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 Main extends JavaPlugin {
- public final Logger logger = Logger.getLogger("Minecraft");
- public static Main plugin;
- @Override
- public void onEnable(){
- PluginDescriptionFile pdfFile = this.getDescription();
- this.logger.info(pdfFile.getName() + pdfFile.getVersion() + " has been enabled" );
- }
- @Override
- public void onDisable(){
- PluginDescriptionFile pdfFile = this.getDescription();
- this.logger.info(pdfFile.getName() + pdfFile.getVersion() + " has been enabled" );
- }
- public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
- Player player = (Player) sender;
- if(label.equalsIgnoreCase("newteam") && player.isOp()){
- if(args.length == 0){
- Team.newTeam(args [0], player);
- }else{
- player.sendMessage(ChatColor.RED + "Usage: /newteam <team name>");
- }
- }
- if(label.equalsIgnoreCase("setlobby") && player.isOp()){
- if(args.length==0){
- Team.teamSetSpawn(player.getLocation(), args [0],player);
- }else{
- player.sendMessage(ChatColor.RED + "Usage: /setlobby <team name>");
- }
- }
- if(label.equalsIgnoreCase("jointeam") && player.isOp()){
- if(args.length==0){
- Team.joinTeam(player, args [0]);
- }else{
- player.sendMessage(ChatColor.RED + "Usage: /jointeam <team name>");
- }
- }
- if(label.equalsIgnoreCase("teamsetspawn")){
- if(args.length==0){
- Team.teamSetSpawn(player.getLocation(),args [0], player);
- }else{
- player.sendMessage(ChatColor.RED + "Usage: /teamsetspawn <team name>");
- }
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement