whats wrong?

Discussion in 'Plugin Development' started by mineu999, Aug 25, 2013.

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


    I'm trying to make a plugin that lists staff but there auto added to the list when there added to the pex group. Here's my code
    package me.mineu999.staffplugin;
    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.java.JavaPlugin;
    import ru.tehkode.permissions.PermissionGroup;
    import ru.tehkode.permissions.PermissionUser;
    import ru.tehkode.permissions.bukkit.PermissionsEx;
    public class Staffplugin extends JavaPlugin {
        public boolean onCommand(CommandSender sender, Command cmd, String commandlabel, String [] args) {
            Player player = (Player) sender;
            if(cmd.getName().equalsIgnoreCase("staff")) {
                sender.sendMessage(ChatColor.GOLD + ("Staff"));
                if (Bukkit.getServer().getPluginManager().isPluginEnabled("PermissionsEx")); {
                    PermissionsManager permissions = PermissionsEx.getPermissionManager();
                    public void getAllMods() {
        PermissionGroup group = PermissionsEx.getPermissionManager().getGroup("Mod");
        for (PermissionUser user : group.getUsers()) {
        return false;   
  2. Offline


    tidy up the code, and what is the actual problem here?
  3. Offline


    Techy4198 I keep getting errors in my code
  4. Offline


    what is the problem?
  5. Offline


    Last edited by a moderator: Jun 4, 2016
  6. Offline


    For the getMod method: you put it right in the middle of another method.
    For the PermissionManager error: you have to import ru.tehkode.permissions.PermissionManager.
  7. Offline


    mineu999 gimme the full class, and for the third time, WHAT ERRORS
  8. Offline


    it says permissionManger cant be resolved as a type

    at public void getAllMods()
    { it says

    - Syntax error on token "{", delete this token

    - Syntax error on token "void", @ expected

    - getAllMods cannot be resolved to a type

    PermissionGroup group = PermissionsEx.getPermissionManager().getGroup("Mod");
    it says

    - Illegal modifier for the variable group; only final is permitted

    - Line breakpoint:Staffplugin [line: 22] - onCommand(CommandSender, Command, String, String[])
  9. mineu999
    Put the getAllMods() method outside your command method.
  10. Offline


    Illegal modifier for the variable group; only final is permitted
    are you sure you are importing the right things and spelling them correctly?
  11. Offline


    Assist thank you. But I'm having trouble making a mod+ one how would I do it as I get a error the + is irrelannt

    Can anyone help me?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 4, 2016
  12. mineu999
    Stop bumping your thread every 30-60 minutes. I have no idea what "mod+" you are talking about.
    Twisted_Panda likes this.
  13. Offline


    Sorry about that. I want to add more then mods like admins devs trainees and mod+ but it won't let me do it because off the +
  14. Offline


    then rename it?
Thread Status:
Not open for further replies.

Share This Page