权限 - IzzelAliz/Multiverse-Core GitHub Wiki
#权限
注意: 你是在找 所有权限 吗?
Multiverse 支持任何使用 SuperPerms Bukkit 权限 API 的插件. 直到现在 (1/19/2012) 有这些权限插件: PermissionsBukkit, bPerms, PEX 和 GroupManager.
Multiverse 允许你通过权限控制谁能进入世界! 当你导入或创建一个世界到 Multiverse-Core 时, 它将自动创建一个权限: multiverse.access.世界名称
.如果一个玩家 拥有 multiverse.access.世界名称
, 他就可以进入这个世界.
注意: 确保你将 enforceaccess
启用 于 [[config.yml]]
. 如果 enforceaccess
设置为 false
任何人 可以进入 任何 世界并且 所有世界通行权限会被忽略.
如果你给玩家权限 multiverse.access.*
, 他们就能进入所有世界.
PermissionsBukkit 是 Bukkit 官方的权限管理插件, 使用新的 Permissions API. 其他的权限插件可能不通过这个 API 管理权限, 但是官方的 (PermissionsBukkit) 是我们拥有的. 幸运的是, PermissionsBukkit 包括了一个用于兼容老的权限API的桥梁, 这个桥梁在 Multiverse 2 不是 必须的.
Setting up the permissions in the config is pretty straight forward. You may find it similar to pre-1000 permission plugins. Here is an example config file which includes some permissions for Multiverse 2:
users:
myplayername:
permissions:
groups:
- admin
groups:
default:
permissions:
permissions.build: false
multiverse.core.tp.self: true
admin:
permissions:
permissions.*: true
multiverse.world.create: true
inheritance:
- default
messages:
build: '&cYou do not have permission to build here.'
With this setup, all users will have the ability to teleport themselves using the /mvtp
command, while users assigned to the admin group will also have the ability create worlds. Notice also that the admin has permissions.*: true
and therefore can use the PermissionsBukkit commands in game. This may be especially useful for Multiverse 2.
You can use: multiverse.*
to give someone all permissions for Multiverse. If you only want to give someone access to all worlds, use: multiverse.access.*
for example.
Multiverse has the courtesy to show which permission node is needed for a command if you enter a /command and it fails due to permissions. Having this info readily available to you in the game can save you some time looking up the permission, and allow you to enter that permission into a group on the spot if need be. An admin can simply enter permissions in as you need them. For example you try to run /mvlist
and oh my you dont have permission, but you will be notified that you need multiverse.world.list
permission node. Entering
/perm group setperm admin multiverse.core.list true
will add the permission to your admin group and viola! you have permission to use that command. MV has a lot of commands and permissions, so adding them in a need-to-use basis can sometimes be easier.
OP's by default have all the Multiverse permissions set to true. So the easiest way to give your admins all the Multiverse permissions is to just make them OP. Of course, this may not be the best option for everyone.
A lot of people seem to have trouble understanding how the access permissions work. This is an actual transcript of me (@FernFerret) playing on a test server, and typing exactly what happened. Whenever you see a >
that means that I typed a command in the console.
11:18:38 [INFO] [world2]<fernferret> I do not have multiverse.core.list.worlds, I can't see any worlds
>perm player setperm fernferret multiverse.core.list.worlds true
11:18:59 [INFO] Player fernferret now has multiverse.core.list.worlds = true.
11:19:15 [INFO] [world2]<fernferret> cool. I can see the world list, but there are 0 worlds listed
>perm player setperm fernferret multiverse.access.world true
11:19:32 [INFO] Player fernferret now has multiverse.access.world = true.
11:19:42 [INFO] [world2]<fernferret> sweet. Now I can see the world 'world'
11:20:08 [INFO] [world2]<fernferret> I can't TP there though, I don't have *any* multiverse.teleport.X perm nodes
>perm player setperm fernferret multiverse.teleport.self.* true
11:20:26 [INFO] Player fernferret now has multiverse.teleport.self.* = true.
11:20:38 [INFO] [world]<fernferret> woo I'm in 'world'
11:20:54 [INFO] [world]<fernferret> now I can't tp to 'world' again, i need the spawn.self perm...
>perm player setperm fernferret multiverse.core.spawn.self true
11:21:05 [INFO] Player fernferret now has multiverse.core.spawn.self = true.
11:21:18 [INFO] [world]<fernferret> woo! now i'm at spawn!!!!!!111!
11:21:31 [INFO] [world]<fernferret> but I can't go back to world2...
11:21:34 [INFO] [world]<fernferret> I need some perms!
>perm player setperm fernferret multiverse.access.world2 true
11:21:44 [INFO] Player fernferret now has multiverse.access.world2 = true.
11:21:56 [INFO] [world2]<fernferret> hellz yea!!!!111! world2!!
11:24:05 [INFO] [world2]<fernferret> hmm ok, let's not give me the exact teleport perm... i'll test now!
11:24:15 [INFO] [world]<fernferret> ow...
11:24:20 [INFO] [world]<fernferret> i'm underground somewhere
11:24:25 [INFO] [world]<fernferret> the exact perm is dangerous
>perm player setperm fernferret multiverse.teleport.self.e false
11:24:40 [INFO] Player fernferret now has multiverse.teleport.self.e = false.
11:24:51 [INFO] [world]<fernferret> I went back to spawn
11:25:26 [INFO] [world]<fernferret> ok. I gave myself the false exact perm
11:25:36 [INFO] [world]<fernferret> but that gets checked _after_ the higher perm
11:25:48 [INFO] [world]<fernferret> so I need to deny myself the parent, and just give myself the child perms
>perm player setperm fernferret multiverse.teleport.self.* false
11:26:14 [INFO] Player fernferret now has multiverse.teleport.self.* = false.
11:26:24 [INFO] [world]<fernferret> ok. I have no tp perms again.
11:26:35 [INFO] [world]<fernferret> now i'll _just_ give myself the ones I want, world and player
>perm player setperm fernferret multiverse.teleport.self.w true
11:26:41 [INFO] Player fernferret now has multiverse.teleport.self.w = true.
>perm player setperm fernferret multiverse.teleport.self.pl true
11:26:47 [INFO] Player fernferret now has multiverse.teleport.self.pl = true.
11:26:55 [INFO] [world]<fernferret> oh, and cannon! cannons are awesome!
>perm player setperm fernferret multiverse.teleport.self.ca true
11:27:00 [INFO] Player fernferret now has multiverse.teleport.self.ca = true.
11:27:15 [INFO] [world]<fernferret> weeeeeeeeeeeee (shot out of cannon)