Permissions: Difference between revisions

From DragonMineZ Wiki
Sync from dragonminez-wiki repository
 
Shokkoh (talk | contribs)
Sync from dragonminez-wiki repository
 
Line 99: Line 99:
! <translate><!--T:24--> Node</translate> !! <translate><!--T:25--> Default</translate> !! <translate><!--T:26--> Grants</translate>
! <translate><!--T:24--> Node</translate> !! <translate><!--T:25--> Default</translate> !! <translate><!--T:26--> Grants</translate>
|-
|-
| <code>dragonminez.admin</code> || <code>false</code> || <translate><!--T:27--> Every DMZ permission, at once. Also required (or operator level 2) for <code>/dmzconfig</code>, <code>/dmzrestoreupdate</code> and <code>/dmzdebug</code>.</translate>
| <code>dragonminez.admin</code> || <code>false</code> || <translate><!--T:27--> Every DMZ permission, at once. Also required (or operator level 2) for <code>/dmzconfig</code>, <code>/dmzrestoreupdate</code> and for using <code>/dmzdebug</code> on another player.</translate>
|}
|}


Line 354: Line 354:
| <code>dragonminez.dmzclass.set.others</code> || <code>false</code> || <translate><!--T:147--> Change another player's class.</translate> || <code>ClassCommand</code>
| <code>dragonminez.dmzclass.set.others</code> || <code>false</code> || <translate><!--T:147--> Change another player's class.</translate> || <code>ClassCommand</code>
|-
|-
| <code>dragonminez.admin</code> || <code>false</code> || <translate><!--T:148--> Also required (or operator level 2) for <code>/dmzconfig</code>, <code>/dmzrestoreupdate</code> and <code>/dmzdebug</code>.</translate> || <code>ConfigCommand</code>, <code>RestoreCommand</code>, <code>DebugCommand</code>
| <code>dragonminez.dmztrigger.self</code> || <code>false</code> || <translate><!--T:151--> Trigger test forms, racial skills and states on yourself with <code>/dmztrigger</code>.</translate> || <code>TriggerCommand</code>
|-
| <code>dragonminez.dmztrigger.others</code> || <code>false</code> || <translate><!--T:152--> The same, on another player.</translate> || <code>TriggerCommand</code>
|-
| <code>dragonminez.admin</code> || <code>false</code> || <translate><!--T:148--> Also required (or operator level 2) for <code>/dmzconfig</code>, <code>/dmzrestoreupdate</code> and for using <code>/dmzdebug</code> on another player.</translate> || <code>ConfigCommand</code>, <code>RestoreCommand</code>, <code>DebugCommand</code>
|}
|}



Latest revision as of 00:45, 22 October 2026

Every DragonMineZ command node is registered through Forge's PermissionAPI, so server owners running a permissions mod (LuckPerms, PermissionsEx and the like) can grant fine-grained access instead of relying on blanket operator status. Without a permissions mod, DMZ falls back to vanilla operator levels.

Nodes are defined in DMZPermissions.java. Each one is registered under the dragonminez namespace, so its full name is dragonminez.<node>, for example dragonminez.admin or dragonminez.dmzstats.set.self. For what each command does, see Commands.

How a permission check resolves

For every command gated by a DMZ permission, the check passes if any of these is true:

  1. The player has the specific node for that action.
  2. The player has dragonminez.admin, which grants every DMZ permission at once.
  3. The player is a vanilla operator of level 2 or higher (player.hasPermissions(2)).

Commands run from the server console or command blocks (anything that isn't a player) always pass DMZ permission checks.

return PermissionAPI.getPermission(player, node) || PermissionAPI.getPermission(player, ADMIN) || player.hasPermissions(2);

Commands gated by vanilla operator level

A few commands don't use DMZ nodes at all: they simply require operator level 2, and are not affected by dragonminez.admin.

Command Note
/dmzraid Every subcommand (see Raids).
/dmzworldboss Every subcommand except results, which anyone can use (see World Bosses).
/dmztournament Every subcommand (see Tournaments).
/dmzquest questnpc The quest-NPC spawning subcommands (the rest of /dmzquest uses nodes).

/dmzracial reply accept|reject (answering a Namekian assimilation request) needs no permission at all.

Without a permissions mod

Without LuckPerms, PermissionsEx or a similar mod handling these nodes, each node falls back to its default. In practice, only operators of level 2 or higher can use anything gated by a node that defaults to false. Everyone else only gets the handful of nodes that default to true (see the tables below), which are mostly "view or list your own stuff".

Granting nodes with a permissions mod

Example using LuckPerms syntax (adjust it for the mod you run):

/lp user <player> permission set dragonminez.dmzstats.set.self true
/lp group <group> permission set dragonminez.dmzquest.list.others true
/lp user <player> permission set dragonminez.admin true

DMZ doesn't ship its own grant or revoke command: node management is entirely up to your permissions mod.

Node reference

Nodes default to false (operators and admins only) unless the table says true. Rows written as ….self / .others are two nodes: one for using the command on yourself and one for using it on other players.

Admin

Node Default Grants
dragonminez.admin false Every DMZ permission, at once. Also required (or operator level 2) for /dmzconfig, /dmzrestoreupdate and for using /dmzdebug on another player.

Stats

Nodes of StatsCommand (/dmzstats).

Node Default Grants
dragonminez.dmzstats.set.self false Set your own stats.
dragonminez.dmzstats.set.others false Set another player's stats.
dragonminez.dmzstats.add.self false Add to or remove from your own stats (add and remove).
dragonminez.dmzstats.add.others false Add to or remove from another player's stats.
dragonminez.dmzstats.info.self true View your own stats.
dragonminez.dmzstats.info.others false View another player's stats.
dragonminez.dmzstats.reset.self false Reset or relocate your own stats.
dragonminez.dmzstats.reset.others false Reset or relocate another player's stats.

Skills

Nodes of SkillsCommand (/dmzskill).

Node Default Grants
dragonminez.dmzskill.set.self / .others false Set skill levels.
dragonminez.dmzskill.add.self / .others false Add a skill.
dragonminez.dmzskill.remove.self / .others false Remove a skill.
dragonminez.dmzskill.list.self true List your own skills.
dragonminez.dmzskill.list.others false List another player's skills.

Techniques

Nodes of TechCommand (/dmztech).

Node Default Grants
dragonminez.dmztech.add.self / .others false Grant a ki technique.
dragonminez.dmztech.remove.self / .others false Remove a ki technique.
dragonminez.dmztech.list.self true List your own techniques.
dragonminez.dmztech.list.others false List another player's techniques.
dragonminez.dmztech.experience.self / .others false Change technique experience.

Technique cooldowns

Nodes of CooldownsCommand (/dmzcooldowns).

Node Default Grants
dragonminez.dmzcooldowns.self false Change your own ki and strike technique cooldowns.
dragonminez.dmzcooldowns.others false Change another player's ki and strike technique cooldowns.

Bonus stats

Nodes of BonusCommand (/dmzbonus).

Node Default Grants
dragonminez.dmzbonus.add.self / .others false Add bonus stats.
dragonminez.dmzbonus.clear.self / .others false Remove or clear bonus stats (remove and clear).

Effects

Nodes of EffectsCommand (/dmzeffect).

Node Default Grants
dragonminez.dmzeffect.give.self / .others false Give a status effect.
dragonminez.dmzeffect.remove.self / .others false Remove a status effect.
dragonminez.dmzeffect.clear.self / .others false Clear all effects.
dragonminez.dmzeffect.list.self true List your own effects.
dragonminez.dmzeffect.list.others false List another player's effects.

Points

Nodes of PointsCommand (/dmzpoints).

Node Default Grants
dragonminez.dmzpoints.set.self / .others false Set points.
dragonminez.dmzpoints.add.self / .others false Add points.
dragonminez.dmzpoints.remove.self / .others false Remove points.
dragonminez.dmzpoints.info.self true View your own points.
dragonminez.dmzpoints.info.others false View another player's points.

Quests and sagas

Nodes of StoryCommand (/dmzquest).

Node Default Grants
dragonminez.dmzquest.list.self true List your own quest progress.
dragonminez.dmzquest.list.others false List another player's quest progress.
dragonminez.dmzquest.info true View quest metadata.
dragonminez.dmzquest.start.self / .others false Force-start a quest.
dragonminez.dmzquest.finish.self / .others false Force-complete a quest.
dragonminez.dmzquest.fail.self / .others false Force-fail a quest.
dragonminez.dmzquest.reset.self / .others false Reset a quest.
dragonminez.dmzquest.track.self true Set your own tracked quest.
dragonminez.dmzquest.track.others false Set another player's tracked quest.
dragonminez.dmzquest.startsaga.self / .others false Force-start every quest in a saga.
dragonminez.dmzquest.finishsaga.self / .others false Force-complete every quest in a saga.
dragonminez.dmzquest.resetsaga.self / .others false Reset an entire saga.
dragonminez.dmzquest.difficulty.self false See or change your own story difficulty (/dmzquest difficulty).
dragonminez.dmzquest.difficulty.others false Change other players' story difficulty.

Other commands

Node Default Grants Command class
dragonminez.dmzlocate false Locate special structures. LocateCommand
dragonminez.dmzstructure false Read structure-local coordinates and structure NPCs (/dmzstructure). StructureCommand
dragonminez.dmzdragonballs.status false View where every Dragon Ball set is tracked (/dmzdragonballs status). DragonBallsCommand
dragonminez.dmzdragonballs.regenerate false Refill a Dragon Ball set up to its configured copies (/dmzdragonballs regenerate). DragonBallsCommand
dragonminez.dmzrevive.self / .others false Revive a player. ReviveCommand
dragonminez.dmzparty.use true Invite, accept and reject invitations, kick, disband and toggle party PvP, with /dmzparty or the Party tab. Listing your party (/dmzparty, /dmzparty list) and leaving it don't need it. PartyCommand
dragonminez.dmzmastery.set / .add false Set or add transformation mastery. MasteryCommand
dragonminez.dmz.reload false Run /dmzreload (see Reloading and Updating Changes). ReloadCommand
dragonminez.dmzform.set.self / .others false Set a form. FormsCommand
dragonminez.dmzform.add.self / .others false Grant a form. FormsCommand
dragonminez.dmzform.remove.self / .others false Remove a form. FormsCommand
dragonminez.dmzform.list.self true List your own forms. FormsCommand
dragonminez.dmzform.list.others false List another player's forms. FormsCommand
dragonminez.dmzracial.reset.self / .others false Reset racial skills. RacialSkillCommand
dragonminez.dmzweight.give false Give weight training items. WeightCommand
dragonminez.dmzalignment.set.self / .others false Set alignment. AlignmentCommand
dragonminez.dmzalignment.add.self / .others false Add alignment. AlignmentCommand
dragonminez.dmzalignment.remove.self / .others false Remove alignment. AlignmentCommand
dragonminez.dmzalignment.info.self true View your own alignment. AlignmentCommand
dragonminez.dmzalignment.info.others false View another player's alignment. AlignmentCommand
dragonminez.dmztail.self true Grow or cut your own tail. TailCommand
dragonminez.dmztail.others false Grow or cut another player's tail. TailCommand
dragonminez.dmzminigame.self false Open or learn training minigames for yourself with /dmzminigame. MinigameCommand
dragonminez.dmzminigame.others false Open or teach training minigames to other players. MinigameCommand
dragonminez.dmzhalo.self / .others false Toggle a halo. HaloCommand
dragonminez.dmzhair.self true Resync or reset your own hair. HairCommand
dragonminez.dmzhair.others false Resync or reset another player's hair. HairCommand
dragonminez.dmzclass.set.self false Change your own class. ClassCommand
dragonminez.dmzclass.set.others false Change another player's class. ClassCommand
dragonminez.dmztrigger.self false Trigger test forms, racial skills and states on yourself with /dmztrigger. TriggerCommand
dragonminez.dmztrigger.others false The same, on another player. TriggerCommand
dragonminez.admin false Also required (or operator level 2) for /dmzconfig, /dmzrestoreupdate and for using /dmzdebug on another player. ConfigCommand, RestoreCommand, DebugCommand

Applying changes

Nodes are registered when the mod starts and don't need a config-style reload: grant and revoke changes take effect as soon as your permissions mod applies them (LuckPerms, for instance, applies most changes immediately).