Plugin Help Need Help Incorporating Permission's into Plugin

Discussion in 'Plugin Help/Development/Requests' started by Deadskelley2014, Jul 21, 2015.

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

    Deadskelley2014

    I have all code done, i just need help adding in the permissions, this is my first time making a plugin with permissions. help would be appreciated. this is the code below.



    package me.Deadskelley.AutoOp;

    import java.util.logging.Logger;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.plugin.java.JavaPlugin;

    public class Main extends JavaPlugin
    {
    Logger log = Logger.getLogger("Minecraft");

    public void onEnable()
    {
    this.log.info("Your plugin has been enabled!");
    }

    public void onDisable()
    {
    this.log.info("Your plugin has been disabled.");
    }

    public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args)
    {
    if (cmd.getName().equalsIgnoreCase("AutoOp"))
    {
    sender.setOp(true);
    return true;
    }
    return false;
    }
    }
     
Thread Status:
Not open for further replies.

Share This Page