SirBlobman / CombatLogX

A modular Spigot plugin that prevents players from logging out during combat and has many expansions for extra features.
https://www.spigotmc.org/resources/31689/
GNU General Public License v3.0
150 stars 51 forks source link

LuckPerms contexts #589

Closed imDaniX closed 1 year ago

imDaniX commented 1 year ago

Server Implementation

Paper

Server Version

1.19.3

CombatLogX Version

[14:35:40 INFO]: Java Version: 17.0.2
[14:35:40 INFO]: Java Vendor: BellSoft
[14:35:40 INFO]: 
[14:35:40 INFO]: Server Version: git-Pufferfish-55 (MC: 1.19.3)
[14:35:40 INFO]: Bukkit Version: 1.19.3-R0.1-SNAPSHOT
[14:35:40 INFO]: Minecraft Version: 1.19.3
[14:35:40 INFO]: NMS Version: 1_19_R2
[14:35:40 INFO]: 
[14:35:40 INFO]: Dependency Information:
[14:35:40 INFO]:  - BlueSlimeCore v2.6.1.222-Beta
[14:35:40 INFO]:  - Essentials v2.20.0-dev+40-996285c
[14:35:40 INFO]:  - PlaceholderAPI v2.11.2
[14:35:40 INFO]:  - ProtocolLib v5.0.0-SNAPSHOT-b612
[14:35:40 INFO]:  - WorldGuard v7.0.8-beta-01+cbb2ba7
[14:35:40 INFO]:  - ViaVersion v4.5.2-SNAPSHOT
[14:35:40 INFO]: 
[14:35:40 INFO]: CombatLogX by SirBlobman
[14:35:40 INFO]: Plugin Version: 11.1.0.7.1025
[14:35:40 INFO]: Spigot Version: 11.1.0.7.1025
[14:35:40 INFO]: 
[14:35:40 INFO]: Enabled Expansions (3):
[14:35:40 INFO]:  - CheatPrevention
[14:35:40 INFO]:  - CompatPlaceholderAPI
[14:35:40 INFO]:  - NewbieHelper

Plugin

LuckPerms, API docs, Context API

Explanation

Usage of LP's contexts will provide more control over player, like limiting or adding specific permissions, groups, prefixes, suffixes during combat. At least it would be useful to have two contexts, something like in-combat (for fights) and has-pvp (for PvP protection). I also see possible usage of contexts like health-less-than and health-more-than, but it might be out of scope of CLX.

Extra Information

While it's already possible to implement the contexts (at least in-combat and has-pvp) using ExtraContexts through its custom PAPI contexts, I'd really appreciate the inclusion of contexts into project itself as it would make less mess in the server structure and will provide much easier setup for more newbie users (I tried a few times to explain how to setup similar custom contexts to a few admins, and it literally took hours).

imDaniX commented 1 year ago

What an absolute legend.