Multiple commands won't register as separate

Discussion in 'Plugin Development' started by CheifKeef, Mar 2, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    CheifKeef

    Im having a problem, I'm trying to make my own plugin for my server, it has a lot of different commands, but they are not registering as a new command, when in game i type /saveall it says Saving in progress and also kits, here is my code. i tried using } else if(//code) { but it would highlight else

    Code:
    package me.PokeMasterBrobee.testing;
    
    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 testing extends JavaPlugin{
        public final Logger logger = Logger.getLogger("Minecraft");
        public static testing plugin;
    
        @Override
        public void onEnable() {
            getConfig().options().copyDefaults(true);
            saveConfig();
            PluginDescriptionFile pdfFile = this.getDescription();
            this.logger.info(pdfFile.getName() + " Has been enabled!");
        }
       
        @Override
        public void onDisable() {
            PluginDescriptionFile pdfFile = this.getDescription();
            this.logger.info(pdfFile.getName() + " Has been disabled!");
        }
       
    public boolean onCommand(CommandSender sender, Command cmd, String Label, String[] args) {
        Player player = (Player) sender;
        if(cmd.getName().equalsIgnoreCase("SaveAll"));
        if(player.hasPermission("fuktpvp.use.saveall"));
        Bukkit.savePlayers();
        Bukkit.broadcastMessage(ChatColor.RED + "Saving in progress, expect lag.");
        if(cmd.getName().equalsIgnoreCase("kits"));
        player.sendMessage(ChatColor.RED + "Kits will be added soon!");;
            }
        }
    
     
  2. You dont know java. dont even try to make bukkit (made in java! 0_0) plugins!
     
  3. Offline

    CheifKeef

    Don't be like that, I'm trying, if you don't have help leave thanks
     
  4. Its a fact. you learn NOTHING and just copy & pasting code. You need to know the basics and syntax (you dont know it)
     
  5. Offline

    CheifKeef

    i didn't copy any code as a matter of fact, I'm playing with the code, all i copied was the Public boolean code and , the if statements i remembered from videos i watched before.
     
  6. Last edited: Mar 2, 2015
Thread Status:
Not open for further replies.

Share This Page