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 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; } } } } }
This is where I get the errors http://gyazo.com/2c75ac185561df7a7d2f14a33ce951ce can anyone help? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
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.
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[])
Illegal modifier for the variable group; only final is permitted are you sure you are importing the right things and spelling them correctly?
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.
mineu999 Stop bumping your thread every 30-60 minutes. I have no idea what "mod+" you are talking about.
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 +