EssentialsX

EssentialsX

2M Downloads

Spawn-on-join for ops

Alv5ro opened this issue ยท 6 comments

commented

I want everyone including ops to join at the spawn rather than where they were at last. In all my ranks ive included -essentials.spawn-on-join.exempt. But I want to know if there is a way I can get ops to be included in this. This is the configuration I have ATM.

# What priority should we use for handling spawning on joining the server?
# See respawn-listener-priority for possible values.
# Note: changing this may impact or break spawn-on-join functionality.
spawn-join-listener-priority: high

# When users die, should they respawn at their first home or bed, instead of the spawnpoint?
respawn-at-home: false

# Teleport all joining players to the spawnpoint
spawn-on-join: true
# The following value of `guests` states that all players in group `guests` will be teleported to spawn when joining.
#spawn-on-join: guests
# The following list value states that all players in group `guests` and `admin` are to be teleported to spawn when joining. 
#spawn-on-join:
#- member
#- Co-Owner
commented

Do you have more information about your setup? What plugins (especially permission plugin are you using)? Keep in mind that various permission plugins may work slightly differently. In general, using OP isn't necessary, recommended, nor encouraged. So ideally you can create ranks, which will not have permissions you don't want by default.

commented

Sorry for not saying the plugins earlier,
So atm im using PermissionsEx, I've created all the ranks and even though the co owner rank has every command, my brother (who takes the role) can't use command blocks. So I decided ill keep him the rank and give him op. I'm also using Essentials plugin and all Multi Verse plugins.

So basically, I either need ops to spawn at the spawnpoint or to give the Co-Owner rank the ability to use command blocks (which I can't figure out either)

This is the permissions file for co-owner rank.
Co-Owner:
inheritance:
- Admin
options:
default: false
prefix: '&8[&c-&8][&3&lCo&9-&5&lOwner&8][&c-&8]&d '
suffix: ''
permissions:
- -essentials.spawn-on-join.exempt
- '*'

As you can see I've removed spawn on join exempt for the rank as well as giving it every command. I just find it strange that he can't use the command blocks. So I think it's easier to remove the "essentials.spawn-on-join.exempt" for ops, but if you know how to allow command blocks as well, that would be great!

commented

According to the MineCraft Wiki, it looks like the player does need to be OP in order to use command blocks.

PermissionsEx is no longer supported, so you might want to consider trying LuckPerms to see if it fixes your issue. Most likely, OP is taking precedence over the negative permissions you have set. Although I do not condone it, an alternative workaround would be to not use OP when you are not using an OP specific feature, but allow your admin to OP themselves (by giving the minecraft.command.op and minecraft.command.deop permissions, or in your case * will probably grant it) temporarily to use these features.

commented

To be fair, I don't even think that LuckPerms can resolve this either, but i guess we'd have to wait for an update that would allow it. Thanks for the help and advice
-Alvaro

commented

PEX 1.x grants all permissions to ops, not just "default op" permissions, so negations don't work consistently (particularly in the case of EssentialsX exempt perms, which are "default no-one" but still get given to ops). LuckPerms can be configured to use defaults but will still negate perms consistently.

commented

[SOLUTION Thanks to @md678685] Ok, so I've now changed my permissions plugin for PermissionsEx to LuckPerms and have transferred all permissions to LuckPerms with their specified group. As you've said, the LuckPerms permissions are consistent (unlike the PermissionsEx plugin), so thanks to your advice I have solved the problem.

As long as 'essentials.spawn-on-join.exempt' is added on whatever rank it is, the command will run, whether they're opped or not.

In my case, I've opped the player so they can still use command blocks whilst spawning at the spawn

Many thanks for your time @md678685 !