1

Need help with Permissions

whirlwind07 •12/13/14 1:55 pm
•
54
•
12/13/2014 5:05 pm
Hello, there! I run a server from home called Lost Time (mini-game server). I'm making the finishing touches on our first games. I'd like to temporarily open up for a demo, but I don't have permissions set up for my server!
Permissions are incredibly important, and, even though I've watched many tutorials on it, I don't know how to do them!
My server ranks are - Default, Moderator, Builder, Admin, HeadAdmin, Developer, CoOwner, and Owner.
I'm politely asking for your help.
IP will given to those of you who agree to help.
Server is 1.7.5!!

Thank you so, so, so, so, so much!
-whirlwind07
Posted by
whirlwind07
Level 1 : New Miner
0

  Have something to say?

Join • Sign in

1

CopyableCougar4
• 12/13/2014 5:05 pm
• Level 3 : Apprentice Crafter
I'm assuming you have some programming background? If so, here is a snippet for adding permissions to users. "plugin" is the JavaPlugin instance, and "permissions" is an ArrayList<String> with the permissions to give the user. It's very simple and I don't believe it handles "*" nodes, but for some quick permissions where you know all the nodes, then you can use this code.

PermissionAttachment attachment = player.addAttachment(plugin);
for (String permission : attachment.getPermissions().keySet()) {
attachment.setPermission(permission, false);
}
for (String permission : permissions) {
attachment.setPermission(permission, true);
}


CopyableCougar4
1

Welcome