Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9cff9b6f51 |
No files matched your search
@@ -1 +0,0 @@
|
||||
.gitea/CODEOWNERS linguist-detectable=false
|
||||
@@ -1,3 +0,0 @@
|
||||
# Pull requests request review from the eligible staff team(s).
|
||||
# One approval from either an Admin or Developer satisfies branch protection.
|
||||
* @trueog/Admins @trueog/Developers
|
||||
@@ -32,7 +32,6 @@ public class FileData {
|
||||
if (yaml.contains(config.getPath())) continue;
|
||||
yaml.set(config.getPath(), config.getObject());
|
||||
}
|
||||
ensureSection(yaml, "groups");
|
||||
customYML.saveFile();
|
||||
TabCompleteFilter.getInstance().getTabManager().getGroupDataMap().clear();
|
||||
|
||||
@@ -64,7 +63,6 @@ public class FileData {
|
||||
if (yaml.contains(args.getPath())) continue;
|
||||
yaml.set(args.getPath(), args.getObject());
|
||||
}
|
||||
ensureSection(yaml, "custom-args");
|
||||
customYML.saveFile();
|
||||
TabCompleteFilter.getInstance().getTabManager().getCustomArgDataMap().clear();
|
||||
|
||||
@@ -72,10 +70,4 @@ public class FileData {
|
||||
TabCompleteFilter.getInstance().getTabManager().addCustomArgData(argData.getKey(), argData.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
private void ensureSection(YamlConfiguration yaml, String path) {
|
||||
if (yaml.getConfigurationSection(path) == null) {
|
||||
yaml.createSection(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import java.util.logging.Level;
|
||||
|
||||
import dev.lee.tcf.TabCompleteFilter;
|
||||
import dev.lee.tcf.data.CustomArgData;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
@@ -61,11 +60,9 @@ public class FileManager {
|
||||
Map<String, List<String>> groupData = new HashMap<>();
|
||||
CustomYML customYML = getYML("config");
|
||||
YamlConfiguration yaml = customYML.getFile();
|
||||
ConfigurationSection groupsSection = yaml.getConfigurationSection("groups");
|
||||
if (!yaml.isConfigurationSection("groups")) return groupData;
|
||||
|
||||
if (groupsSection == null) return groupData;
|
||||
|
||||
for (String key : groupsSection.getKeys(false)) {
|
||||
for (String key : yaml.getConfigurationSection("groups").getKeys(false)) {
|
||||
try {
|
||||
groupData.put(key, yaml.getStringList("groups." + key));
|
||||
} catch (Exception e) {
|
||||
@@ -79,24 +76,17 @@ public class FileManager {
|
||||
Map<String, CustomArgData> argData = new HashMap<>();
|
||||
CustomYML customYML = getYML("args");
|
||||
YamlConfiguration yaml = customYML.getFile();
|
||||
ConfigurationSection customArgsSection = yaml.getConfigurationSection("custom-args");
|
||||
if (!yaml.isConfigurationSection("custom-args")) return argData;
|
||||
|
||||
if (customArgsSection == null) return argData;
|
||||
|
||||
for (String key : customArgsSection.getKeys(false)) {
|
||||
for (String key : yaml.getConfigurationSection("custom-args").getKeys(false)) {
|
||||
try {
|
||||
String base = "custom-args." + key;
|
||||
boolean permissionCheck = yaml.getBoolean(base + ".permission-check");
|
||||
String permission = yaml.getString(base + ".permission");
|
||||
String command = yaml.getString(base + ".command");
|
||||
Map<Integer, List<String>> args = new HashMap<>();
|
||||
ConfigurationSection argsSection = yaml.getConfigurationSection(base + ".args");
|
||||
|
||||
if (argsSection == null || command == null || command.isBlank()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (String argKey : argsSection.getKeys(false)) {
|
||||
if (!yaml.isConfigurationSection(base + ".args")) continue;
|
||||
for (String argKey : yaml.getConfigurationSection(base + ".args").getKeys(false)) {
|
||||
int number = Integer.parseInt(argKey);
|
||||
List<String> numberArgs = yaml.getStringList(base + ".args." + argKey);
|
||||
args.put(number, numberArgs);
|
||||
|
||||
+22
-234
@@ -1,236 +1,24 @@
|
||||
# ============================================================================
|
||||
# TabCompleteFilter — TRUE-OG config (built from live LuckPerms export)
|
||||
# ----------------------------------------------------------------------------
|
||||
# HOW IT WORKS:
|
||||
# - WHITELIST. PlayerCommandSendEvent clears all tab commands, then re-adds
|
||||
# only those listed for the tcf groups the player has.
|
||||
# - A group "x" applies to a player who has permission tcf.x
|
||||
# - !! No tcf.<group> perm = ZERO tab completions. Everyone needs tcf.default.
|
||||
# - Groups STACK. We exploit LuckPerms RANK INHERITANCE: attach one tcf node
|
||||
# at each rank group; higher ranks inherit the lower tcf.* nodes, so each
|
||||
# command is listed ONCE at the tier that first grants its permission.
|
||||
# - Visibility only. Players still need the command's own perm to run it.
|
||||
# These lists were pruned to the perms each rank actually has.
|
||||
# - WorldEdit "//" commands: written with two slashes; plugin strips one.
|
||||
#
|
||||
# Your rank chain (each inherits the previous):
|
||||
# default -> og -> og-pro -> og-master -> tester -> youtube
|
||||
# -> helper -> builder -> moderator -> admin
|
||||
#
|
||||
# LUCKPERMS SETUP (run once; inheritance handles the rest):
|
||||
# /lp group default permission set tcf.default true
|
||||
# /lp group og permission set tcf.og true
|
||||
# /lp group og-pro permission set tcf.ogpro true
|
||||
# /lp group og-master permission set tcf.ogmaster true
|
||||
# /lp group helper permission set tcf.helper true
|
||||
# /lp group builder permission set tcf.builder true
|
||||
# /lp group moderator permission set tcf.moderator true
|
||||
# /lp group admin permission set tcf.bypass true # admin sees ALL
|
||||
#
|
||||
# NOTE: tester/youtube grant no NEW root commands (cosmetic/subcommand
|
||||
# perms only), so they get no tcf group — they inherit the tiers below.
|
||||
# ============================================================================
|
||||
|
||||
# Admins use tcf.bypass (above). Leave OP bypass on as a safety net.
|
||||
op-player-filter-bypass: true
|
||||
|
||||
# Groups - Permission group for tcf.{group} (ex: tcf.default)
|
||||
# List of registered commands that will show in tab complete for group
|
||||
# The user will also need the perm for the command itself
|
||||
op-player-filter-bypass: false
|
||||
groups:
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# default — every player (group.default). Baseline from default-rank perms.
|
||||
# --------------------------------------------------------------------------
|
||||
default:
|
||||
# info / help
|
||||
- /help # essentials.help
|
||||
- /list # essentials.list
|
||||
- /rules # essentials.rules
|
||||
- /ranks # utilities.ranks
|
||||
- /ping # utilities.ping
|
||||
- /firstplayed # firstplayed.*
|
||||
- /playtime # pt.use
|
||||
- /topplaytime # pt.top
|
||||
- /uptime # pt.uptime
|
||||
- /togglephantoms # utilities.togglephantoms
|
||||
- /togglescoreboard
|
||||
- /cleanupin # nodespawnog.cleanupin
|
||||
# communication
|
||||
- /msg # essentials.msg
|
||||
- /r # essentials.r
|
||||
- /mail # essentials.mail
|
||||
- /ignore # essentials.ignore
|
||||
# teleport / homes
|
||||
- /spawn # essentials.spawn
|
||||
- /home # essentials.home
|
||||
- /sethome # essentials.sethome(.multiple)
|
||||
- /delhome # essentials.delhome
|
||||
- /tpa # essentials.tpa
|
||||
- /tpaccept # essentials.tpaccept
|
||||
- /tpdeny # essentials.tpdeny
|
||||
- /tpacancel # essentials.tpacancel
|
||||
- /suicide # essentials.suicide
|
||||
# economy (DiamondBank)
|
||||
- /balance # diamondbank-og.balance
|
||||
- /baltop # diamondbank-og.balancetop
|
||||
- /pay # diamondbank-og.pay
|
||||
- /deposit # diamondbank-og.deposit
|
||||
- /withdraw # diamondbank-og.withdraw
|
||||
- /compress # diamondbank-og.compress
|
||||
# shops
|
||||
- /qs # quickshop.create.* / use
|
||||
- /find # quickshop.find + finditem.use
|
||||
# bounties
|
||||
- /bounty # bountyhunters.*
|
||||
# minigames (own perms, default-true — not in LP export)
|
||||
- /duel # duels.queue/stats/toggle
|
||||
- /spectate # duels.spectate
|
||||
- /queue # duels.queue
|
||||
- /splegg
|
||||
- /spleef
|
||||
- /buildbattle
|
||||
- /battlearena
|
||||
- /hub
|
||||
- /plugins
|
||||
- /tps
|
||||
# voting (VotingPlugin defaults — not in LP export)
|
||||
- /vote
|
||||
- /votetop
|
||||
- /voteparty
|
||||
- /voteurl
|
||||
- /votehelp
|
||||
- /votepoints
|
||||
- /voteshop
|
||||
- /votestreak
|
||||
- /votegui
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# og — first donor tier (group og). Premium chat.
|
||||
# --------------------------------------------------------------------------
|
||||
og:
|
||||
- /p # chat-og.donors (premium chat)
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# ogpro — donor (group og-pro). New player commands unlocked at this rank.
|
||||
# --------------------------------------------------------------------------
|
||||
ogpro:
|
||||
- /sit # betterchairs.cmd.sit
|
||||
- /togglechairs # betterchairs.cmd.toggle
|
||||
- /hat # essentials.hat
|
||||
- /enderchest # essentials.enderchest
|
||||
- /editsign # essentials.editsign
|
||||
- /cosmetics # particlehats.command.h/help
|
||||
- /petm # petmaster.setcolor
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# ogmaster — top donor (group og-master).
|
||||
# --------------------------------------------------------------------------
|
||||
ogmaster:
|
||||
- /back # essentials.back
|
||||
- /tdc # toggledeathcoordinates.use
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# helper — staff entry (group helper).
|
||||
# --------------------------------------------------------------------------
|
||||
helper:
|
||||
- /gamemode # essentials.gamemode + minecraft.command.gamemode
|
||||
- /gmc
|
||||
- /gms
|
||||
- /gma
|
||||
- /gmsp
|
||||
- /co # coreprotect.lookup.* / rollback
|
||||
- /tp # essentials.tp
|
||||
- /skull # essentials.skull
|
||||
- /weather # essentials.weather
|
||||
- /noclip # noclip.use
|
||||
- /launchpad # launchpad.can*
|
||||
- /imageframe # images.command
|
||||
- /worldeditsui # wesui.command
|
||||
- /flyingbow # flyingbow.cangive
|
||||
- /region # worldguard.region.select / toggle-bypass
|
||||
- /kick # staffog.command.kick
|
||||
- /tempban # staffog.command.tempban
|
||||
- /tempmute # staffog.command.tempmute
|
||||
- /linkpanel # staffog.panelaccess
|
||||
- /chatreport # staffog.isstaff
|
||||
# WorldEdit navigation (helper-granted)
|
||||
- /ascend # worldedit.navigation.ascend
|
||||
- /descend # worldedit.navigation.descend
|
||||
- /jumpto # worldedit.navigation.jumpto.command
|
||||
- /thru # worldedit.navigation.thru.command
|
||||
- /up # worldedit.navigation.up
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# builder — build team (group builder). Full WorldEdit.
|
||||
# --------------------------------------------------------------------------
|
||||
builder:
|
||||
- /worldedit # worldedit.* (subset granted)
|
||||
- //wand
|
||||
- //set
|
||||
- //replace
|
||||
- //copy
|
||||
- //cut
|
||||
- //paste
|
||||
- //undo
|
||||
- //redo
|
||||
- //pos1
|
||||
- //pos2
|
||||
- //hpos1
|
||||
- //hpos2
|
||||
- //expand
|
||||
- //contract
|
||||
- //stack
|
||||
- //move
|
||||
- //rotate
|
||||
- //flip
|
||||
- //calc
|
||||
- //fill
|
||||
- //drain
|
||||
- //fixwater
|
||||
- //fixlava
|
||||
- //regen
|
||||
- //removenear
|
||||
- //drawsel
|
||||
- //listchunks
|
||||
- /brush # worldedit.brush.*
|
||||
- /schematic # worldedit.schematic.*
|
||||
- //snapshot # worldedit.snapshots.*
|
||||
- /toggleeditwand # worldedit.wand.toggle
|
||||
- /holograms # holograms.command
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# moderator — full mod toolkit (group moderator).
|
||||
# --------------------------------------------------------------------------
|
||||
moderator:
|
||||
# punishments
|
||||
- /ban # essentials.ban
|
||||
- /banip # essentials.banip
|
||||
- /tempban # essentials.tempban
|
||||
- /mute # essentials.mute
|
||||
- /permban # staffog.command.permban
|
||||
- /permmute # staffog.command.permmute
|
||||
# player management / inspection
|
||||
- /me # essentials.me
|
||||
- /seen # essentials.seen.*
|
||||
- /whois # essentials.whois
|
||||
- /world # essentials.world
|
||||
- /gc # essentials.gc
|
||||
- /broadcast # essentials.broadcast
|
||||
- /feed # essentials.feed
|
||||
- /fly # essentials.fly
|
||||
- /enchant # essentials.enchant
|
||||
- /give # essentials.give + minecraft.command.give
|
||||
- /clearinventory # essentials.clearinventory.others
|
||||
- /vanish # essentials.vanish
|
||||
- /tellraw # minecraft.command.tellraw
|
||||
# inventory / containers
|
||||
- /openinv # openinv.*
|
||||
- /openender
|
||||
- /searchinv
|
||||
- /searchender
|
||||
# admin-grade plugin tools
|
||||
- /luckperms # luckperms.*
|
||||
- /papi # placeholderapi.*
|
||||
- /oldcombatmechanics # oldcombatmechanics.*
|
||||
- /worldguard # worldguardgui.* / region.define/list/remove
|
||||
# TheHerobrine event control
|
||||
- /hbdropshard # theherobrine.command.dropshard
|
||||
- /hbforcestart # theherobrine.command.forcestart
|
||||
- /help
|
||||
- /msg
|
||||
- /r
|
||||
- /tell
|
||||
- /tpa
|
||||
- /tpaaccept
|
||||
- /back
|
||||
- /rules
|
||||
- /afk
|
||||
- /baltop
|
||||
- /mail
|
||||
- /stats
|
||||
- /shop
|
||||
mod:
|
||||
- /ban
|
||||
- /kick
|
||||
- /mute
|
||||
- //calculate
|
||||
Reference in new issue
Block a user