From ae3ce96216511a8816ebbe83ebe717766ece4f97 Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Fri, 7 Mar 2025 22:45:22 -0500 Subject: [PATCH 01/18] Add cmd desc, aliases, and usages extract task --- .gitignore | 1 + build-logic/build.gradle.kts | 2 + .../src/main/kotlin/CommandDataTask.kt | 92 +++++++++++++++++++ .../essentials.module-conventions.gradle.kts | 4 + 4 files changed, 99 insertions(+) create mode 100644 build-logic/src/main/kotlin/CommandDataTask.kt diff --git a/.gitignore b/.gitignore index 44ea237797a..48035c076ff 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ # Build files .gradle/ /jars/ +generated/ out/ build/ target/ diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 55f9b33098e..b4294ac7ab2 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -10,4 +10,6 @@ dependencies { implementation("net.kyori", "indra-common", "3.1.3") implementation("com.gradleup.shadow", "shadow-gradle-plugin", "8.3.6") implementation("xyz.jpenilla", "run-task", "2.3.1") + implementation("org.yaml", "snakeyaml", "2.4") + implementation("com.google.code.gson", "gson", "2.12.1") } diff --git a/build-logic/src/main/kotlin/CommandDataTask.kt b/build-logic/src/main/kotlin/CommandDataTask.kt new file mode 100644 index 00000000000..65a9aa240f9 --- /dev/null +++ b/build-logic/src/main/kotlin/CommandDataTask.kt @@ -0,0 +1,92 @@ +import com.google.gson.GsonBuilder +import org.gradle.api.DefaultTask +import org.gradle.api.tasks.OutputFile +import org.gradle.api.tasks.TaskAction +import org.yaml.snakeyaml.Yaml +import java.util.* + +abstract class CommandDataTask : DefaultTask() { + @OutputFile + val destination = project.objects.fileProperty() + + @TaskAction + private fun harvest() { + val pluginYml = project.file("src/main/resources/plugin.yml") + if (!pluginYml.exists()) { + logger.warn("No plugin.yml found to harvest") + return + } + + val messagesProps = project.rootProject.file("Essentials/src/main/resources/messages.properties") + if (!messagesProps.exists()) { + logger.warn("No messages.properties found to harvest") + return + } + + val yaml = Yaml() + val data: Map = yaml.load(pluginYml.inputStream()) + + // i promise i will be safe + @Suppress("UNCHECKED_CAST") + val commands = data["commands"] as? Map> ?: emptyMap() + + val extractedCommands = commands.mapValues { (_, details) -> + val aliases = when (val aliasesData = details["aliases"]) { + is String -> listOf(aliasesData) + is List<*> -> aliasesData.filterIsInstance() + else -> emptyList() + } + + mapOf( + "aliases" to aliases, + "description" to "", + "usage" to "", + "usages" to mutableListOf>() + ) + }.toMutableMap() + + if (extractedCommands.isEmpty()) { + logger.warn("No commands found in plugin.yml for ${project.name}") + return + } + + val properties = Properties() + messagesProps.inputStream().use { properties.load(it) } + + properties.forEach { key, value -> + val commandKeyRegex = Regex("^(\\w+)Command(Description|Usage)(\\d*)$") + val match = commandKeyRegex.matchEntire(key.toString()) + + if (match != null) { + val (command, type, index) = match.destructured + val commandData = extractedCommands[command] ?: return@forEach + + if (index.isEmpty()) { + // main description and usage + when (type) { + "Description" -> extractedCommands[command] = commandData + ("description" to value.toString()) + "Usage" -> extractedCommands[command] = commandData + ("usage" to value.toString()) + } + } else { + @Suppress("UNCHECKED_CAST") + val usagesList = commandData["usages"] as MutableList> // verbose command usages + usagesList.add( + mapOf( + "usage" to value.toString(), + "description" to properties["${command}CommandUsage${index}Description"]?.toString().orEmpty() + ) + ) + } + } + } + + val json = GsonBuilder().create().toJson(extractedCommands) + + val output = project.file("build/generated/${project.name}-commands.json") + output.parentFile.mkdirs() + output.writeText(json) + + destination.get().asFile.parentFile.mkdirs() + output.copyTo(destination.get().asFile, overwrite = true) + } +} \ No newline at end of file diff --git a/build-logic/src/main/kotlin/essentials.module-conventions.gradle.kts b/build-logic/src/main/kotlin/essentials.module-conventions.gradle.kts index 9212b2fad0b..aae70763dfe 100644 --- a/build-logic/src/main/kotlin/essentials.module-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/essentials.module-conventions.gradle.kts @@ -26,4 +26,8 @@ tasks { build { dependsOn(copyJar) } + + register("commandData") { + destination.set(rootProject.layout.projectDirectory.dir("generated").file("${project.name}-commands.json")) + } } From ddf596fcaeff1e3d2ffc7ce1b96be9985b21bfe9 Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sun, 13 Apr 2025 20:07:39 -0400 Subject: [PATCH 02/18] why --- .../essentials/commands/Commandeditsign.java | 19 +++++++++---------- .../essentials/commands/Commandhelpop.java | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandeditsign.java b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandeditsign.java index 669751de0dc..e894129e48a 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandeditsign.java +++ b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandeditsign.java @@ -17,7 +17,6 @@ import org.bukkit.block.data.type.WallHangingSign; import org.bukkit.block.data.type.WallSign; import org.bukkit.block.sign.Side; -import org.bukkit.entity.Player; import org.bukkit.event.block.SignChangeEvent; import org.bukkit.util.Vector; @@ -49,7 +48,7 @@ protected void run(final Server server, final User user, final String commandLab throw new TranslatableException("editsignCommandLimit"); } existingLines[line] = text; - if (callSignEvent(sign, user.getBase(), existingLines)) { + if (callSignEvent(sign, user, existingLines)) { return; } @@ -61,7 +60,7 @@ protected void run(final Server server, final User user, final String commandLab existingLines[i] = ""; } - if (callSignEvent(sign, user.getBase(), existingLines)) { + if (callSignEvent(sign, user, existingLines)) { return; } @@ -71,7 +70,7 @@ protected void run(final Server server, final User user, final String commandLab final int line = Integer.parseInt(args[1]) - 1; existingLines[line] = ""; - if (callSignEvent(sign, user.getBase(), existingLines)) { + if (callSignEvent(sign, user, existingLines)) { return; } @@ -106,7 +105,7 @@ protected void run(final Server server, final User user, final String commandLab user.sendTl("editsignPasteLine", line + 1, commandLabel); } - callSignEvent(sign, user.getBase(), existingLines); + callSignEvent(sign, user, existingLines); } else { throw new NotEnoughArgumentsException(); } @@ -115,22 +114,22 @@ protected void run(final Server server, final User user, final String commandLab } } - private boolean callSignEvent(final ModifiableSign sign, final Player player, final String[] lines) { + private boolean callSignEvent(final ModifiableSign sign, final User user, final String[] lines) { final SignChangeEvent event; if (VersionUtil.getServerBukkitVersion().isHigherThanOrEqualTo(VersionUtil.v1_20_1_R01)) { - if (sign.isWaxed() && !player.hasPermission("essentials.editsign.waxed.exempt")) { + if (sign.isWaxed() && !user.isAuthorized("essentials.editsign.waxed.exempt")) { return true; } - event = new SignChangeEvent(sign.getBlock(), player, lines, sign.isFront() ? Side.FRONT : Side.BACK); + event = new SignChangeEvent(sign.getBlock(), user.getBase(), lines, sign.isFront() ? Side.FRONT : Side.BACK); } else { //noinspection deprecation - event = new SignChangeEvent(sign.getBlock(), player, lines); + event = new SignChangeEvent(sign.getBlock(), user.getBase(), lines); } Bukkit.getServer().getPluginManager().callEvent(event); if (event.isCancelled()) { if (ess.getSettings().isDebug()) { - ess.getLogger().info("SignChangeEvent canceled for /editsign execution by " + player.getName()); + ess.getLogger().info("SignChangeEvent canceled for /editsign execution by " + user.getName()); } return true; } diff --git a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandhelpop.java b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandhelpop.java index 690348a9800..040ab186afa 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/commands/Commandhelpop.java +++ b/Essentials/src/main/java/com/earth2me/essentials/commands/Commandhelpop.java @@ -43,7 +43,7 @@ private void sendMessage(final IMessageRecipient from, final String[] args) thro final List recipients = new ArrayList<>(); for (IUser user : ess.getOnlineUsers()) { - if (user.getBase().hasPermission("essentials.helpop.receive")) { + if (user.isAuthorized("essentials.helpop.receive")) { recipients.add(user); } } From 4096acae7e2c08e54c12d37c1b987b714dcda790 Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Fri, 18 Apr 2025 23:11:04 -0400 Subject: [PATCH 03/18] start work on permission extraction --- .../src/main/kotlin/CommandDataTask.kt | 31 +++++++++++++++++-- .../essentials.module-conventions.gradle.kts | 1 + 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/build-logic/src/main/kotlin/CommandDataTask.kt b/build-logic/src/main/kotlin/CommandDataTask.kt index 65a9aa240f9..490259bb8ae 100644 --- a/build-logic/src/main/kotlin/CommandDataTask.kt +++ b/build-logic/src/main/kotlin/CommandDataTask.kt @@ -81,12 +81,37 @@ abstract class CommandDataTask : DefaultTask() { } val json = GsonBuilder().create().toJson(extractedCommands) - val output = project.file("build/generated/${project.name}-commands.json") output.parentFile.mkdirs() output.writeText(json) - destination.get().asFile.parentFile.mkdirs() output.copyTo(destination.get().asFile, overwrite = true) + + val sourceDir = project.file("src/main/java") + if (!sourceDir.exists() || !sourceDir.isDirectory) { + logger.warn("No Java source directory found at src/main/java; skipping isAuthorized scanning.") + return + } + + val authCallRegex = Regex("""\.\s*isAuthorized\s*\(\s*"([^"]+)""") + val permissionsFound = mutableSetOf() + + sourceDir.walkTopDown().filter { it.isFile && it.extension == "java" }.forEach { file -> + file.forEachLine { line -> + authCallRegex.findAll(line).forEach { matchResult -> + val permission = matchResult.groupValues[1] + if (permission.isNotBlank()) { + permissionsFound.add(permission) + } + } + } + } + + val authJson = GsonBuilder().create().toJson(permissionsFound) + val authOutputFile = project.file("build/generated/${project.name}-permissions.json") + authOutputFile.parentFile.mkdirs() + authOutputFile.writeText(authJson) + destination.get().asFile.parentFile.mkdirs() + authOutputFile.copyTo(destination.get().asFile, overwrite = true) } -} \ No newline at end of file +} diff --git a/build-logic/src/main/kotlin/essentials.module-conventions.gradle.kts b/build-logic/src/main/kotlin/essentials.module-conventions.gradle.kts index aae70763dfe..dbb9775cb7e 100644 --- a/build-logic/src/main/kotlin/essentials.module-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/essentials.module-conventions.gradle.kts @@ -29,5 +29,6 @@ tasks { register("commandData") { destination.set(rootProject.layout.projectDirectory.dir("generated").file("${project.name}-commands.json")) + destination.set(rootProject.layout.projectDirectory.dir("generated").file("${project.name}-permissions.json")) } } From adc22252968997a86c9805dc415f800f21b16cb4 Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 19 Apr 2025 14:18:07 -0400 Subject: [PATCH 04/18] whoops --- build-logic/src/main/kotlin/CommandDataTask.kt | 6 ++++-- .../main/kotlin/essentials.module-conventions.gradle.kts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build-logic/src/main/kotlin/CommandDataTask.kt b/build-logic/src/main/kotlin/CommandDataTask.kt index 490259bb8ae..dff3c0258d3 100644 --- a/build-logic/src/main/kotlin/CommandDataTask.kt +++ b/build-logic/src/main/kotlin/CommandDataTask.kt @@ -8,6 +8,8 @@ import java.util.* abstract class CommandDataTask : DefaultTask() { @OutputFile val destination = project.objects.fileProperty() + @OutputFile + val permissionDestination = project.objects.fileProperty() @TaskAction private fun harvest() { @@ -111,7 +113,7 @@ abstract class CommandDataTask : DefaultTask() { val authOutputFile = project.file("build/generated/${project.name}-permissions.json") authOutputFile.parentFile.mkdirs() authOutputFile.writeText(authJson) - destination.get().asFile.parentFile.mkdirs() - authOutputFile.copyTo(destination.get().asFile, overwrite = true) + permissionDestination.get().asFile.parentFile.mkdirs() + authOutputFile.copyTo(permissionDestination.get().asFile, overwrite = true) } } diff --git a/build-logic/src/main/kotlin/essentials.module-conventions.gradle.kts b/build-logic/src/main/kotlin/essentials.module-conventions.gradle.kts index dbb9775cb7e..9b609144fc6 100644 --- a/build-logic/src/main/kotlin/essentials.module-conventions.gradle.kts +++ b/build-logic/src/main/kotlin/essentials.module-conventions.gradle.kts @@ -29,6 +29,6 @@ tasks { register("commandData") { destination.set(rootProject.layout.projectDirectory.dir("generated").file("${project.name}-commands.json")) - destination.set(rootProject.layout.projectDirectory.dir("generated").file("${project.name}-permissions.json")) + permissionDestination.set(rootProject.layout.projectDirectory.dir("generated").file("${project.name}-permissions.json")) } } From f6343fcce7a9e74b941fc33c9174b0391e5af2f0 Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 19 Apr 2025 18:57:59 -0400 Subject: [PATCH 05/18] core permissions --- Essentials/src/main/resources/plugin.yml | 937 +++++++++++++++++++++-- 1 file changed, 890 insertions(+), 47 deletions(-) diff --git a/Essentials/src/main/resources/plugin.yml b/Essentials/src/main/resources/plugin.yml index 8efb209ad23..6d22e6c6e93 100644 --- a/Essentials/src/main/resources/plugin.yml +++ b/Essentials/src/main/resources/plugin.yml @@ -619,62 +619,596 @@ permissions: description: Give players with op everything by default children: essentials.gamemode.*: true - # These permissions can't be assigned from player-commands for compatibility reasons - essentials.teleport.cooldown.bypass.tpa: - default: true - description: If the player does not have this permission, /tpa will have cooldown even with the parent bypass perm - essentials.teleport.cooldown.bypass.back: + essentials.afk: + description: Allows access to the /afk command + essentials.afk.message: + description: Allows the player to set a custom AFK message + essentials.afk.others: + description: Allows the player to set another player's AFK status + essentials.afk.auto: + default: false + description: Players with this permission will be set to afk after a period of inaction as defined in the config file + essentials.afk.kickexempt: + description: Players with this permission will not be kicked for being AFK + essentials.antioch: + description: Allows access to the /antioch command + essentials.back: + description: Allows access to the /back command + essentials.back.others: + description: Allows access to the /back command for other players + essentials.back.ondeath: + default: false + description: Players with this permission will have back location stored during death + essentials.back.onteleport: default: true - description: If the player does not have this permission, /back will have cooldown even with the parent bypass perm + description: Players with this permission will have back location stored during any teleportation + essentials.back.into.: + description: Allows the player to use the /back command to travel to a specific world + essentials.backup: + description: Allows access to the /backup command + essentials.balance: + description: Allows access to the /balance command + essentials.balance.others: + description: Allows view other players balance with the /balance command + essentials.balancetop: + description: Allows access to the /balancetop command + essentials.balancetop.force: + description: Allows access to force refresh the balancetop list + essentials.balancetop.exclude: + default: false + description: Players with this permission are excluded from the balancetop + essentials.ban: + description: Allows access to the /ban command + essentials.ban.notify: + description: Allows the bearer to be notified when a player is banned + essentials.ban.exempt: + default: false + description: Prevent a specified group or player from being banned + essentials.ban.offline: + description: Allows access to the /ban command for offline players, which may in turn by used to ban exempt players who are offline + essentials.banip: + description: Allows access to the /banip command + essentials.banip.notify: + description: Allows the bearer to be notified when a player is banned + essentials.unban: + description: Allows access to the /unban command + essentials.unbanip: + description: Allows access to the /unbanip command + essentials.bigtree: + description: Allows access to the /bigtree command + essentials.book: + description: Allows access to the /book command + essentials.book.author: + description: Allows access to edit book authors with the /book command + essentials.book.others: + description: Allows access to edit other players books with the /book command + essentials.book.title: + description: Allows access to edit book titles with the /book command + essentials.bottom: + description: Allows access to the /bottom command + essentials.break: + description: Allows access to the /break command + essentials.break.bedrock: + description: Allows access to the /break command for bedrock + essentials.broadcast: + description: Allows access to the /broadcast command + essentials.broadcastworld: + description: Allows access to the /broadcastworld command + essentials.burn: + description: Allows access to the /burn command + essentials.chat.ignoreexempt: + default: false + description: Someone with this permission will not be ignored, even if they are on another persons ignore list + essentials.chat.spy: + description: Allows the bearers to see all local chat messages, regardless of their proximity to the sender + essentials.chat.spy.exempt: + description: Allows the bearer to be exempt from the local chat spy permission + essentials.clearinventory: + description: Allows access to the /clearinventory command + essentials.clearinventory.all: + description: Allows access to clear the inventory of all players with the /clearinventory command + essentials.clearinventory.others: + description: Allows access to clear the inventory of other players with the /clearinventory command + essentials.clearinventoryconfirmtoggle: + description: Allows access to the /clearinventoryconfirmtoggle command + essentials.commandcooldowns.bypass: + description: Allows the bypassing of all command cooldowns + essentials.commandcooldowns.bypass.: + description: Allows the bypassing of the cooldown for a specific command + essentials.compass: + description: Allows access to the /compass command + essentials.condense: + description: Allows access to the /condense command + essentials.createkit: + description: Allows access to the /createkit command + essentials.delkit: + description: Allows access to the /delkit command + essentials.kitreset: + description: Allows access to the /kitreset command + essentials.kitreset.others: + description: Allows access to reset other players kits with the /kitreset command + essentials.customtext: + description: Allows access to the /customtext command and all aliases + essentials.delwarp: + description: Allows access to the /delwarp command + essentials.depth: + description: Allows access to the /depth command + essentials.disposal: + description: Allows access to the /disposal command + essentials.eco: + description: Allows access to the /eco command + essentials.eco.loan: + description: Allows the bearer to possess a negative balance + essentials.enchant: + description: Allows access to the /enchant command + essentials.enchantments.allowunsafe: + description: Allows the bearer to enchant items with unsafe enchantments + essentials.enchantments.: + description: Allows the bearer to use a specific enchantment with the /enchant command + essentials.enderchest: + description: Allows access to the /enderchest command + essentials.enderchest.modify: + description: Allows the bearer to modify other players enderchests + essentials.enderchest.others: + description: Allows access to the /enderchest command for other players + essentials.essentials: + description: Allows access to the /essentials command + essentials.updatecheck: + description: The bearer will be notified of updates to EssentialsX + essentials.exp: + description: Allows access to the /exp command + essentials.exp.give: + description: Allows the bearer to give experience to themselves + essentials.exp.give.others: + description: Allows the bearer to give experience to other players + essentials.exp.others: + description: Allows the bearer to view other players experience + essentials.exp.set: + description: Allows the bearer to set experience for themselves + essentials.exp.set.others: + description: Allows the bearer to set experience for other players + essentials.ext: + description: Allows access to the /ext command + essentials.ext.others: + description: Allows access to the /ext command for other players + essentials.feed: + description: Allows access to the /feed command + essentials.feed.others: + description: Allows access to the /feed command for other players + essentials.fireball: + description: Allows access to the /fireball command. Additional permissions are required for each type of fireball. + essentials.fireball.fireball: + description: Allows access to use the fireball in the /fireball command + essentials.fireball.small: + description: Allows access to use the small fireball in the /fireball command + essentials.fireball.large: + description: Allows access to use the large fireball in the /fireball command + essentials.fireball.arrow: + description: Allows access to use the arrows in the /fireball command + essentials.fireball.dragon: + description: Allows access to use the dragon in the /fireball command + essentials.fireball.splashpotion: + description: Allows access to use the splash potion in the /fireball command + essentials.fireball.lingeringpotion: + description: Allows access to use the lingering potion in the /fireball command + essentials.fireball.trident: + description: Allows access to use the trident in the /fireball command + essentials.fireball.skull: + description: Allows access to use the skull in the /fireball command + essentials.fireball.egg: + description: Allows access to use the egg in the /fireball command + essentials.fireball.snowball: + description: Allows access to use the snowball in the /fireball command + essentials.firework: + description: Allows access to the /firework command + essentials.firework.fire: + description: Allows the bearer to use the firework command to launch a copy of the firework in hand + essentials.firework.multiple: + description: Allows the bearer to use the firework command to launch multiple fireworks + essentials.fly: + description: Allows access to the /fly command + essentials.fly.safelogin: + description: Bearers of this permission will be put into fly mode if they log in while in the air + essentials.fly.others: + description: Allows access to the /fly command for other players + essentials.gamemode: + description: Allows access to the /gamemode command + essentials.gamemode.all: + description: Allows access to all gamemodes with the /gamemode command + essentials.gamemode.others: + description: Allows access to the /gamemode command for other players + essentials.gamemode.survival: + description: Allows access to the survival gamemode with the /gamemode command + essentials.gamemode.creative: + description: Allows access to the creative gamemode with the /gamemode command + essentials.gamemode.adventure: + description: Allows access to the adventure gamemode with the /gamemode command + essentials.gamemode.spectator: + description: Allows access to the spectator gamemode with the /gamemode command essentials.gamemode.*: + description: Allows access to all gamemodes with the /gamemode command default: op children: essentials.gamemode: true essentials.gamemode.others: true essentials.gamemode.all: true - essentials.seen.extra: - default: op - children: - essentials.seen.ip: true - essentials.seen.location: true - essentials.seen.uuid: true - essentials.seen.whitelist: true - essentials.keepinv: - default: false - description: Controls whether players keep their inventory on death. - essentials.near.exclude: - default: false - description: If the player should be excluded from near lookups. - essentials.keepxp: + essentials.gc: + description: Allows access to the /gc command + essentials.getpos: + description: Allows access to the /getpos command + essentials.getpos.others: + description: Allows access to the /getpos command for other players + essentials.give: + description: Allows access to the /give command + essentials.give.item-all: + description: Allows access to the /give command for all items when permission-based-item-spawn is enabled + essentials.give.item-: + description: Allows access to the /give command for a specific item when permission-based-item-spawn is enabled + essentials.god: + description: Allows access to the /god command + essentials.god.others: + description: Allows access to the /god command for other players + essentials.god.pvp: + description: Allows the bearer to attack players while in god mode + essentials.hat: + description: Allows access to the /hat command + essentials.hat.prevent-type.: + description: Prevents the player from using the /hat command with the specified item + essentials.hat.ignore-binding: + description: Allows the bearer to use the /hat command when they have equipped an item with curse of binding + essentials.heal: + description: Allows access to the /heal command + essentials.heal.others: + description: Allows access to the /heal command for other players + essentials.help: + description: Allows access to the /help command + essentials.help.: + description: Allows access to the /help command for a specific plugin + essentials.helpop: + description: Allows access to the /helpop command + essentials.helpop.receive: + description: Allows the bearer to receive helpop messages + essentials.kill: + description: Allows access to the /kill command + essentials.kill.exempt: + description: Prevents the player from being killed by /kill + essentials.kill.force: + description: Allows the bearer to be killed by /kill even if their death is canceled + essentials.suicide: + description: Allows access to the /suicide command for multiple players + essentials.home: + description: Allows access to the /home command + essentials.home.compass: default: false - description: Allows the user to keep their exp on death, instead of dropping it. + description: Point the player's compass at their first home. compass-towards-home-perm needs to be enabled in the configuration. + essentials.home.others: + description: Allows access to teleport to other players homes with the /home command + essentials.home.bed: + description: Allows access to the /home command for beds + essentials.ice: + description: Allows access to the /ice command + essentials.ice.others: + description: Allows access to the /ice command for other players + essentials.ignore: + description: Allows access to the /ignore command + essentials.info: + description: Allows access to the /info command + essentials.invsee: + description: Allows access to the /invsee command + essentials.invsee.equip: + description: Allows access to view items in armor slots with the /invsee command + essentials.invsee.modify: + description: Allows access to modify items in other players inventories with the /invsee command essentials.invsee.preventmodify: default: false description: Prevents other players from modifying the players inventory. - essentials.afk.auto: - default: false - description: Players with this permission will be set to afk after a period of inaction as defined in the config file. - essentials.home.compass: - default: false - description: Point the player's compass at their first home. compass-towards-home-perm needs to be enabled in the configuration. - essentials.ban.exempt: + essentials.item: + description: Allows access to the /item command + essentials.itemspawn.exempt: + description: Allows the bearer to spawn items in the item blacklist + essentials.itemspawn.meta-chapter-: + description: Allows the bearer to spawn specific books only, from book.txt. with the /give command. + essentials.itemspawn.meta-author: + description: Allows the bearer to spawn items with author metadata + essentials.itemspawn.meta-book: + description: Allows the bearer to spawn items with pre-filled content from book.txt + essentials.itemspawn.meta-firework: + description: Allows the bearer to spawn items with firework metadata + essentials.itemspawn.meta-head: + description: Allows the bearer to spawn items with head metadata + essentials.itemspawn.meta-lore: + description: Allows the bearer to spawn items with lore metadata + essentials.itemspawn.meta-title: + description: Allows the bearer to spawn items with title metadata + essentials.itemlore: + description: Allows access to the /itemlore command + essentials.itemdb: + description: Allows access to the /itemdb command + essentials.itemname: + description: Allows access to the /itemname command + essentials.itemname.format: + description: Allows access to the /itemname command with formatting text + essentials.itemname.magic: + description: Allows access to the /itemname command with magic text + essentials.itemname.color: + description: Allows access to the /itemname command with color text + essentials.itemname.rgb: + description: Allows access to the /itemname command with RGB text + essentials.itemname.prevent-type.: + description: Prevents the player from using the /itemname command with the specified item + essentials.jail: + description: Allows access to the /jail command + essentials.jail.exempt: + description: Prevent a specified group or player from being jailed + essentials.jail.allow.: + description: Allows the bearer to use the specified command while jailed + essentials.jail.notify: + description: Allows the bearer to be notified when other players are jailed + essentials.jail.allow-break: + description: Allows the bearer to break blocks while jailed + essentials.jail.allow-place: + description: Allows the bearer to place blocks while jailed + essentials.jail.allow-block-damage: + description: Allows the bearer to damage blocks while jailed + essentials.jail.allow-interact: + description: Allows the bearer to interact with blocks while jailed + essentials.jails: + description: Allows access to the /jails command + essentials.deljail: + description: Allows access to the /deljail command + essentials.jump: + description: Allows access to the /jump command + essentials.jump.lock: + description: Allows access to the /jump lock command + essentials.keepxp: default: false - description: Prevent a specified group or player from being banned + description: Allows the user to keep their exp on death, instead of dropping it. + essentials.joinfullserver: + description: Allows the to join the server even if it is full + essentials.kick: + description: Allows access to the /kick command essentials.kick.exempt: default: false description: Prevents the player from being kicked. - essentials.chat.ignoreexempt: - default: false - description: Someone with this permission will not be ignored, even if they are on another persons ignore list + essentials.kick.notify: + description: Allows the bearer to be notified when other players are kicked + essentials.kickall: + description: Allows access to the /kickall command + essentials.kickall.exempt: + description: Prevents the player from being kicked by /kickall + essentials.kit: + description: Allows access to the /kit command essentials.kit.exemptdelay: default: false description: Exempts you from the kit delay feature, this affects signs as well as command. + essentials.kit.others: + description: Allows access to the /kit command for other players + essentials.kits.*: + description: Allows access to all kits + essentials.kits.: + description: Allows access to a specific kit + essentials.kittycannon: + description: Allows access to the /kittycannon command + essentials.beezooka: + description: Allows access to the /beezooka command + essentials.lightning: + description: Allows access to the /lightning command + essentials.lightning.others: + description: Allows access to the /lightning command for other players + essentials.list: + description: Allows access to the /list command + essentials.list.hidden: + description: Allow access to view hidden players in the /list command + essentials.mail: + description: Allows access to the /mail command + essentials.mail.send: + description: Allows access to send mail with the /mail command + essentials.mail.sendall: + description: Allows access to send mail to all players with the /mail command + essentials.mail.sendtemp: + description: Allows access to send temporary mail with the /mail command + essentials.mail.clear.others: + description: Allows access to clear other players mail with the /mail command + essentials.mail.clearall: + description: Allows access to clear all mail with the /mail command + essentials.me: + description: Allows access to the /me command + essentials.more: + description: Allows access to the /more command + essentials.motd: + description: Allows access to the /motd command + essentials.msg: + description: Allows access to the /msg command + essentials.msg.format: + description: Allows access to the /msg command with formatting text + essentials.msg.magic: + description: Allows access to the /msg command with magic text + essentials.msg.color: + description: Allows access to the /msg command with color text + essentials.msg.rgb: + description: Allows access to the /msg command with RGB text + essentials.msg.url: + description: Allows access to send URLs in the /msg command + essentials.msg.multiple: + description: Allows access to send messages to multiple players with the /msg command + essentials.msgtoggle: + description: Allows access to the /msgtoggle command + essentials.msgtoggle.others: + description: Allows access to the /msgtoggle command for other players + essentials.msgtoggle.bypass: + description: Allows the bearer to bypass the msgtoggle setting for other players + essentials.mute: + description: Allows access to the /mute command + essentials.mute.notify: + description: Allows the bearer to be notified when other players are muted essentials.mute.exempt: default: false description: Prevent a specified group or player from being muted + essentials.mute.unlimited: + description: Allows the bearer to override the max-mute-time setting + essentials.mute.offline: + description: Allows access to mute offline players + essentials.near: + description: Allows access to the /near command + essentials.near.maxexempt: + description: Allows the bearer to bypass the radius limit for the /near command + essentials.near.others: + description: Allows access to the /near command for other players + essentials.near.exclude: + default: false + description: If the player should be excluded from near lookups. + essentials.nick: + description: Allows access to the /nick command + essentials.nick.color: + description: Allows access to the /nick command with color text + essentials.nick.format: + description: Allows access to the /nick command with formatting text + essentials.nick.magic: + description: Allows access to the /nick command with magic text + essentials.nick.rgb: + description: Allows access to the /nick command with RGB text + essentials.nick.others: + description: Allows access to the /nick command for other players + essentials.nick.blacklist.bypass: + description: Allows the bearer to bypass the nickname blacklist + essentials.nick.changecolors: + description: Allows the bearer to change **only** the color of their nickname + essentials.nick.allowunsafe: + default: false + description: If a player has this, they can set their username to any value. Use with caution, as this has the potential to break userdata files. + essentials.nick.hideprefix: + default: false + description: Players with this permission will not have the nickname prefix applied to them + essentials.nocommandcost.all: + description: Allows the bearer to use all commands without cost + essentials.nocommandcost.: + description: Allows the bearer to use the specified command without cost + essentials.nuke: + description: Allows access to the /nuke command + essentials.oversizedstacks: + description: Allows the bearer to spawn oversized stacks + essentials.pay: + description: Allows access to the /pay command + essentials.pay.multiple: + description: Allows access to pay multiple players with the /pay command + essentials.pay.offline: + description: Allows access to pay offline players with the /pay command + essentials.payconfirmtoggle: + description: Allows access to the /payconfirmtoggle command + essentials.paytoggle: + description: Allows access to the /paytoggle command + essentials.ping: + description: Allows access to the /ping command + essentials.potion: + description: Allows access to the /potion command + essentials.potion.: + description: Allows access to the /potion command for a specific potion type + essentials.potion.apply: + description: Allows access to the /potion apply command + essentials.powertool: + description: Allows access to the /powertool command + essentials.powertool.append: + description: Allows access to add multiple commands to a powertool + essentials.powertooltoggle: + description: Allows access to the /powertooltoggle command + essentials.ptime: + description: Allows access to the /ptime command + essentials.ptime.others: + description: Allows access to the /ptime command for other players + essentials.pvpdelay.exempt: + description: Allows the bearer to bypass the pvp delay setting + essentials.pweather: + description: Allows access to the /pweather command + essentials.pweather.others: + description: Allows access to the /pweather command for other players + essentials.rtoggle: + description: Allows access to the /rtoggle command + essentials.realname: + description: Allows access to the /realname command + essentials.recipe: + description: Allows access to the /recipe command + essentials.remove: + description: Allows access to the /remove command + essentials.repair: + description: Allows access to the /repair command + essentials.repair.all: + description: Allows access to the /repair all command + essentials.repair.armor: + description: Allows access to the /repair armor command + essentials.repair.enchanted: + description: Allows access to use the /repair command on enchanted items + essentials.rest: + description: Allows access to the /rest command + essentials.rest.others: + description: Allows access to the /rest command for other players + essentials.rules: + description: Allows access to the /rules command + essentials.seen: + description: Allows access to the /seen command + essentials.seen.banreason: + description: Allows access to the /seen command with ban reason + essentials.seen.ip: + description: Allows access to the /seen command with IP address + essentials.seen.location: + description: Allows access to the /seen command with location + essentials.seen.uuid: + description: Allows access to the /seen command with UUID + essentials.seen.whitelist: + description: Allows access to the /seen command with whitelist status + essentials.seen.ipsearch: + description: Allows access to use IP addresses with the /seen command + essentials.seen.alts: + description: Allows access to the /seen command with alts + essentials.seen.extra: + description: Allows access to the /seen command with extra information + children: + essentials.seen.ip: true + essentials.seen.location: true + essentials.seen.uuid: true + essentials.seen.whitelist: true + essentials.sell: + description: Allows access to the /sell command + essentials.sell.bulk: + description: Allows access to bulk sell items with the /sell command + essentials.sell.hand: + description: Allows access to sell the item in hand with the /sell command + essentials.sethome: + description: Allows access to the /sethome command + essentials.renamehome: + description: Allows access to the /renamehome command + essentials.renamehome.others: + description: Allows access to rename other players homes with the /renamehome command essentials.sethome.bed: default: false description: Allows the player to right click a bed during daytime to update their 'bed' home. + essentials.sethome.multiple: + description: Allows access to set multiple homes with the /sethome command + essentials.sethome.multiple.: + description: Raises the limit of homes to a specific number defined in the config + essentials.sethome.multiple.unlimited: + description: Allows access to set unlimited homes with the /sethome command + essentials.sethome.others: + description: Allows access to set other players homes with the /sethome command + essentials.delhome: + description: Allows access to the /delhome command + essentials.delhome.others: + description: Allows access to delete other players homes with the /delhome command + essentials.setjail: + description: Allows access to the /setjail command + essentials.setwarp: + description: Allows access to the /setwarp command + essentials.setworth: + description: Allows access to the /setworth command + essentials.showkit: + description: Allows access to the /showkit command + essentials.signs.enchant.allowunsafe: + description: Allows the bearer to create and use unsafe enchantment signs + essentials.signs.protection.override: + description: Allows the bearer to break signs created by other players + essentials.signs.trade.override: + description: Allows the bearer to break trade signs created by other players + essentials.signs.trade.override.collect: + description: Allows the bearer to collect items from trade signs created by other players essentials.silentjoin: default: false description: Allow to join silently @@ -684,24 +1218,336 @@ permissions: essentials.silentquit: default: false description: Suppress leave/quit messages for users with this permission. + essentials.skull: + description: Allows access to the /skull command + essentials.skull.modify: + description: Allows access to modify other players skulls with the /skull command + essentials.skull.others: + description: Allows access to creating other players skulls with the /skull command + essentials.skull.spawn: + description: Allows access to spawn a skull with the /skull command + essentials.sleepingignored: + description: Allows the bearer to not be required to sleep to skip the night + essentials.socialspy: + description: Allows access to the /socialspy command + essentials.socialspy.others: + description: Allows access to the /socialspy command for other players + essentials.spawner: + description: Allows access to the /spawner command + essentials.spawner.delay: + description: Allows access to set the delay of a spawner with the /spawner command + essentials.spawner.*: + description: Allows access to set the type of a spawner with the /spawner command to all types + essentials.spawner.: + description: Allows access to set the type of a spawner with the /spawner command to a specific type + essentials.spawnerconvert.*: + description: Allows the bearer to place spawners of any type + essentials.spawnerconvert.: + description: Allows the bearer to place spawners of a specific type + essentials.spawnmob: + description: Allows access to the /spawnmob command + essentials.spawnmob.stack: + description: Allows access to spawn mobs in stacks with the /spawnmob command + essentials.spawnmob.*: + description: Allows access to spawn all mobs with the /spawnmob command + essentials.spawnmob.: + description: Allows access to spawn a specific mob with the /spawnmob command + essentials.speed: + description: Allows access to the /speed command + essentials.speed.others: + description: Allows access to the /speed command for other players + essentials.speed.fly: + description: Allows access to the /speed command for fly speed + essentials.speed.walk: + description: Allows access to the /speed command for walk speed + essentials.speed.bypass: + description: Allows the bearer to bypass the speed limit set in the config + essentials.sudo: + description: Allows access to the /sudo command essentials.sudo.exempt: default: false - description: Prevents the holder from being sudo'ed by another user + description: Prevents the player from being sudo'ed by another user + essentials.sudo.multiple: + description: Allows access to the /sudo command for multiple players + essentials.teleport.timer.bypass: + description: Allows the bearer to bypass the teleport delay + essentials.teleport.timer.move: + description: Allows the bearer to move while waiting for a teleport + essentials.tempban: + description: Allows access to the /tempban command essentials.tempban.exempt: default: false - description: Prevents a specified group or player from being tempbanned - essentials.nick.allowunsafe: - default: false - description: If a player has this, they can set their username to any value. Use with caution, as this has the potential to break userdata files. - essentials.balancetop.exclude: + description: Prevent a specified group or player from being tempbanned + essentials.tempban.offline: + description: Allows access to tempban offline players + essentials.tempban.unlimited: + description: Allows the bearer to override the max-tempban-time setting + essentials.tempbanip: + description: Allows access to the /tempbanip command + essentials.thunder: + description: Allows access to the /thunder command + essentials.time: + description: Allows access to the /time command + essentials.time.set: + description: Allows access to set the time with the /time command + essentials.time.world.all: + description: Allows access to set the time for all worlds with the /time command + essentials.togglejail: + description: Allows access to the /togglejail command + essentials.togglejail.offline: + description: Allows access to the /togglejail command for offline players + essentials.top: + description: Allows access to the /top command + essentials.tp: + description: Allows access to the /tp command + essentials.tpauto: + description: Allows access to the /tpauto command + essentials.tpauto.others: + description: Allows access to the /tpauto command for other players + essentials.tp.others: + description: Allows access to teleporting to other users with the /tp command + essentials.tp.position: + description: Allows access to teleporting to a position with the /tp command + essentials.tpoffline: + description: Allows access to the /tpoffline command + essentials.tpa: + description: Allows access to the /tpa command + essentials.tpaall: + description: Allows access to the /tpaall command + essentials.tpacancel: + description: Allows access to the /tpaccept command + essentials.tpaccept: + description: Allows access to the /tpaccept command + essentials.tpahere: + description: Allows access to the /tpahere command + essentials.tpall: + description: Allows access to the /tpall command + essentials.tpdeny: + description: Allows access to the /tpdeny command + essentials.tphere: + description: Allows access to the /tphere command + essentials.tpo: + description: Allows access to the /tpo command + essentials.tpohere: + description: Allows access to the /tpohere command + essentials.tppos: + description: Allows access to the /tppos command + essentials.tptoggle: + description: Allows access to the /tptoggle command + essentials.tptoggle.others: + description: Allows access to the /tptoggle command for other players + essentials.tpr: + description: Allows access to the /tpr command + essentials.settpr: + description: Allows access to the /settpr command + essentials.tree: + description: Allows access to the /tree command + essentials.unlimited: + description: Allows access to the /unlimited command + essentials.unlimited.item-all: + description: Allows access to the /unlimited command for all items when permission-based-item-spawn is enabled + essentials.unlimited.item-: + description: Allows access to the /unlimited command for a specific item when permission-based-item-spawn is enabled + essentials.unlimited.item-bucket: + description: Allows access to the /unlimited command for buckets of water and lava + essentials.unlimited.others: + description: Allows access to the /unlimited command for other players + essentials.vanish: + description: Allows access to the /vanish command + essentials.vanish.others: + description: Allows access to the /vanish command for other players + essentials.vanish.pvp: + description: Allows the bearer to attack players while in vanish mode + essentials.vanish.see: + description: Allows the bearer to see other players in vanish mode + essentials.vanish.effect: + description: Applies invisibility effects to the player when they are in vanish mode + essentials.vanish.interact: + description: Allows the bearer to interact with players in vanish mode + essentials.version: + description: Allows access to the /version command + essentials.warp: + description: Allows access to the /warp command + essentials.warp.overwrite.*: + description: Allows the bearer to overwrite all warps + essentials.warp.overwrite.: + description: Allows the bearer to overwrite a specific warp + essentials.warp.list: + description: Allows access to the /warp list command + essentials.warp.others: + description: Allows access to the /warp command for other players + essentials.warpinfo: + description: Allows access to the /warpinfo command + essentials.weather: + description: Allows access to the /weather command + essentials.whois: + description: Allows access to the /whois command + essentials.whois.ip: + description: Allows access to the /whois command with IP address + essentials.workbench: + description: Allows access to the /workbench command + essentials.anvil: + description: Allows access to the /anvil command + essentials.cartographytable: + description: Allows access to the /cartographytable command + essentials.grindstone: + description: Allows access to the /grindstone command + essentials.loom: + description: Allows access to the /loom command + essentials.stonecutter: + description: Allows access to the /stonecutter command + essentials.smithingtable: + description: Allows access to the /smithingtable command + essentials.world: + description: Allows access to the /world command + essentials.worlds.: + description: Allows access to the specific world with various commands + essentials.worth: + description: Allows access to the /worth command + essentials.signs.break.balance: + description: Allows the bearer to break balance signs + essentials.signs.break.buy: + description: Allows the bearer to break buy signs + essentials.signs.break.disposal: + description: Allows the bearer to break disposal signs + essentials.signs.break.enchant: + description: Allows the bearer to break enchant signs + essentials.signs.break.free: + description: Allows the bearer to break free signs + essentials.signs.break.gamemode: + description: Allows the bearer to break gamemode signs + essentials.signs.break.heal: + description: Allows the bearer to break heal signs + essentials.signs.break.info: + description: Allows the bearer to break info signs + essentials.signs.break.kit: + description: Allows the bearer to break kit signs + essentials.signs.break.mail: + description: Allows the bearer to break mail signs + essentials.signs.break.protection: + description: Allows the bearer to break protection signs + essentials.signs.break.repair: + description: Allows the bearer to break repair signs + essentials.signs.break.sell: + description: Allows the bearer to break sell signs + essentials.signs.break.spawnmob: + description: Allows the bearer to break spawnmob signs + essentials.signs.break.trade: + description: Allows the bearer to break trade signs + essentials.signs.break.time: + description: Allows the bearer to break time signs + essentials.signs.break.warp: + description: Allows the bearer to break warp signs + essentials.signs.break.weather: + description: Allows the bearer to break weather signs + essentials.signs.color: + description: Allows the bearer to create and use color signs + essentials.signs.format: + description: Allows the bearer to create and use format signs + essentials.signs.magic: + description: Allows the bearer to create and use magic signs + essentials.signs.rgb: + description: Allows the bearer to create and use RGB signs + essentials.signs.use.balance: + description: Allows the bearer to use balance signs + essentials.signs.use.buy: + description: Allows the bearer to use buy signs + essentials.signs.use.disposal: + description: Allows the bearer to use disposal signs + essentials.signs.use.enchant: + description: Allows the bearer to use enchant signs + essentials.signs.use.free: + description: Allows the bearer to use free signs + essentials.signs.use.gamemode: + description: Allows the bearer to use gamemode signs + essentials.signs.use.heal: + description: Allows the bearer to use heal signs + essentials.signs.use.info: + description: Allows the bearer to use info signs + essentials.signs.use.kit: + description: Allows the bearer to use kit signs + essentials.signs.use.mail: + description: Allows the bearer to use mail signs + essentials.signs.use.protection: + description: Allows the bearer to use protection signs + essentials.signs.use.repair: + description: Allows the bearer to use repair signs + essentials.signs.use.sell: + description: Allows the bearer to use sell signs + essentials.signs.use.spawnmob: + description: Allows the bearer to use spawnmob signs + essentials.signs.use.trade: + description: Allows the bearer to use trade signs + essentials.signs.use.time: + description: Allows the bearer to use time signs + essentials.signs.use.warp: + description: Allows the bearer to use warp signs + essentials.signs.use.weather: + description: Allows the bearer to use weather signs + essentials.signs.create.balance: + description: Allows the bearer to create balance signs + essentials.signs.create.buy: + description: Allows the bearer to create buy signs + essentials.signs.create.disposal: + description: Allows the bearer to create disposal signs + essentials.signs.create.enchant: + description: Allows the bearer to create enchant signs + essentials.signs.create.free: + description: Allows the bearer to create free signs + essentials.signs.create.gamemode: + description: Allows the bearer to create gamemode signs + essentials.signs.create.heal: + description: Allows the bearer to create heal signs + essentials.signs.create.info: + description: Allows the bearer to create info signs + essentials.signs.create.kit: + description: Allows the bearer to create kit signs + essentials.signs.create.mail: + description: Allows the bearer to create mail signs + essentials.signs.create.protection: + description: Allows the bearer to create protection signs + essentials.signs.create.repair: + description: Allows the bearer to create repair signs + essentials.signs.create.sell: + description: Allows the bearer to create sell signs + essentials.signs.create.spawnmob: + description: Allows the bearer to create spawnmob signs + essentials.signs.create.trade: + description: Allows the bearer to create trade signs + essentials.signs.create.time: + description: Allows the bearer to create time signs + essentials.signs.create.warp: + description: Allows the bearer to create warp signs + essentials.signs.create.weather: + description: Allows the bearer to create weather signs + essentials.editsign: + description: Allows access to the /editsign command + essentials.editsign.unlimited: + description: Allows the bearer to exceed the 15 character limit on signs + essentials.editsign.color: + description: Allows the bearer to use color codes on signs + essentials.editsign.format: + description: Allows the bearer to use formatting codes on signs + essentials.editsign.magic: + description: Allows the bearer to use magic codes on signs + essentials.editsign.rgb: + description: Allows the bearer to use RGB codes on signs + essentials.editsign.waxed.exempt: + description: Allows the bearer to edit waxed signs + essentials.keepinv: default: false - description: Players with this permission are excluded from the balancetop - essentials.back.onteleport: + description: Controls whether players keep their inventory on death. + essentials.playtime: + description: Allows access to the /playtime command + essentials.playtime.others: + description: Allows access to the /playtime command for other players + # These permissions can't be assigned from player-commands for compatibility reasons + essentials.teleport.cooldown.bypass.tpa: default: true - description: Players with this permission will have back location stored during any teleportation - essentials.back.ondeath: - default: false - description: Players with this permission will have back location stored during death + description: If the player does not have this permission, /tpa will have cooldown even with the parent bypass perm + essentials.teleport.cooldown.bypass.back: + default: true + description: If the player does not have this permission, /back will have cooldown even with the parent bypass perm essentials.exempt: default: false description: Parent permission to be exempt from many moderator actions @@ -715,6 +1561,3 @@ permissions: essentials.tempban.exempt: true essentials.exempt.protect: true essentials.editsign.waxed.exempt: true - essentials.nick.hideprefix: - default: false - description: Players with this permission will not have the nickname prefix applied to them From d36874d873b9b34eef22838f06910015971b8ca0 Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 19 Apr 2025 18:59:27 -0400 Subject: [PATCH 06/18] OMGScoots --- Essentials/src/main/resources/plugin.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/Essentials/src/main/resources/plugin.yml b/Essentials/src/main/resources/plugin.yml index 6d22e6c6e93..e6250581011 100644 --- a/Essentials/src/main/resources/plugin.yml +++ b/Essentials/src/main/resources/plugin.yml @@ -1,4 +1,3 @@ -# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.) name: Essentials main: com.earth2me.essentials.Essentials # Note to developers: This next line cannot change, or the automatic versioning system will break. From c908e6b1f85788a5534679d9ece6e5c2a260955a Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 19 Apr 2025 19:18:42 -0400 Subject: [PATCH 07/18] antibuild permissions --- .../src/main/resources/plugin.yml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/EssentialsAntiBuild/src/main/resources/plugin.yml b/EssentialsAntiBuild/src/main/resources/plugin.yml index f7dac0e8942..f0416a9a25c 100644 --- a/EssentialsAntiBuild/src/main/resources/plugin.yml +++ b/EssentialsAntiBuild/src/main/resources/plugin.yml @@ -10,6 +10,30 @@ depend: [Essentials] api-version: "1.13" permissions: + essentials.build: + description: Allows the bearer to build + essentials.build.place.: + description: Allows the bearer to place the specified material + essentials.build.break.: + description: Allows the bearer to break the specified material + essentials.build.interact.: + description: Allows the bearer to interact with the specified material + essentials.build.craft.: + description: Allows the bearer to craft the specified material + essentials.build.drop.: + description: Allows the bearer to drop the specified material + essentials.build.pickup.: + description: Allows the bearer to pick up the specified material + essentials.protect.alerts: + description: Allows the bearer to receive protect alerts + essentials.protect.alerts.notrigger: + description: Allows the bearer to be exempt from triggering protect alerts + essentials.protect.exemptbreak: + description: Allows the bearer to be exempt from the break blacklist + essentials.protect.exemptplacement: + description: Allows the bearer to be exempt from the place blacklist + essentials.protect.exemptusage: + description: Allows the bearer to be exempt from the usage blacklist essentials.exempt.protect: default: false description: Exempt from EssentialsProtect/EssentialsAntiBuild protections From 40d293053c8126cc36273a19cb59365c584c2a06 Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 19 Apr 2025 19:18:59 -0400 Subject: [PATCH 08/18] fix generating perms with modules w/o cmds --- .../src/main/kotlin/CommandDataTask.kt | 75 ++++++++++--------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/build-logic/src/main/kotlin/CommandDataTask.kt b/build-logic/src/main/kotlin/CommandDataTask.kt index dff3c0258d3..4ada5e73033 100644 --- a/build-logic/src/main/kotlin/CommandDataTask.kt +++ b/build-logic/src/main/kotlin/CommandDataTask.kt @@ -49,52 +49,55 @@ abstract class CommandDataTask : DefaultTask() { if (extractedCommands.isEmpty()) { logger.warn("No commands found in plugin.yml for ${project.name}") - return - } - - val properties = Properties() - messagesProps.inputStream().use { properties.load(it) } - - properties.forEach { key, value -> - val commandKeyRegex = Regex("^(\\w+)Command(Description|Usage)(\\d*)$") - val match = commandKeyRegex.matchEntire(key.toString()) - - if (match != null) { - val (command, type, index) = match.destructured - val commandData = extractedCommands[command] ?: return@forEach - - if (index.isEmpty()) { - // main description and usage - when (type) { - "Description" -> extractedCommands[command] = commandData + ("description" to value.toString()) - "Usage" -> extractedCommands[command] = commandData + ("usage" to value.toString()) - } - } else { - @Suppress("UNCHECKED_CAST") - val usagesList = commandData["usages"] as MutableList> // verbose command usages - usagesList.add( - mapOf( - "usage" to value.toString(), - "description" to properties["${command}CommandUsage${index}Description"]?.toString().orEmpty() + } else { + + val properties = Properties() + messagesProps.inputStream().use { properties.load(it) } + + properties.forEach { key, value -> + val commandKeyRegex = Regex("^(\\w+)Command(Description|Usage)(\\d*)$") + val match = commandKeyRegex.matchEntire(key.toString()) + + if (match != null) { + val (command, type, index) = match.destructured + val commandData = extractedCommands[command] ?: return@forEach + + if (index.isEmpty()) { + // main description and usage + when (type) { + "Description" -> extractedCommands[command] = + commandData + ("description" to value.toString()) + + "Usage" -> extractedCommands[command] = commandData + ("usage" to value.toString()) + } + } else { + @Suppress("UNCHECKED_CAST") + val usagesList = + commandData["usages"] as MutableList> // verbose command usages + usagesList.add( + mapOf( + "usage" to value.toString(), + "description" to properties["${command}CommandUsage${index}Description"]?.toString() + .orEmpty() + ) ) - ) + } } } - } - val json = GsonBuilder().create().toJson(extractedCommands) - val output = project.file("build/generated/${project.name}-commands.json") - output.parentFile.mkdirs() - output.writeText(json) - destination.get().asFile.parentFile.mkdirs() - output.copyTo(destination.get().asFile, overwrite = true) + val json = GsonBuilder().create().toJson(extractedCommands) + val output = project.file("build/generated/${project.name}-commands.json") + output.parentFile.mkdirs() + output.writeText(json) + destination.get().asFile.parentFile.mkdirs() + output.copyTo(destination.get().asFile, overwrite = true) + } val sourceDir = project.file("src/main/java") if (!sourceDir.exists() || !sourceDir.isDirectory) { logger.warn("No Java source directory found at src/main/java; skipping isAuthorized scanning.") return } - val authCallRegex = Regex("""\.\s*isAuthorized\s*\(\s*"([^"]+)""") val permissionsFound = mutableSetOf() From a35d891b24f99ddc08644cc0b27f498d9ca51a3a Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 19 Apr 2025 19:26:35 -0400 Subject: [PATCH 09/18] chat permissions --- EssentialsChat/src/main/resources/plugin.yml | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/EssentialsChat/src/main/resources/plugin.yml b/EssentialsChat/src/main/resources/plugin.yml index ab1d85c5a36..3a0f038ca66 100644 --- a/EssentialsChat/src/main/resources/plugin.yml +++ b/EssentialsChat/src/main/resources/plugin.yml @@ -14,11 +14,33 @@ commands: usage: / [player] [on|off] aliases: [etoggleshout] permissions: + essentials.chat.color: + description: Allows access to sending color codes in chat + essentials.chat.format: + description: Allows access to sending format codes in chat + essentials.chat.magic: + description: Allows access to sending magic codes in chat + essentials.chat.rgb: + description: Allows access to sending RGB codes in chat + essentials.chat.url: + description: Allows access to sending URLs in chat + essentials.toggleshout: + description: Allows access to the /toggleshout command + essentials.toggleshout.others: + description: Allows access to the /toggleshout command for other players + essentials.chat.question: + description: Allows access to sending global questions in chat when chat radius is enabled + essentials.chat.shout: + description: Allows access to sending shout messages essentials.chat.local: default: true + description: Allows access to sending local chat messages essentials.chat.receive.local: default: true + description: Allows access to receiving local chat messages essentials.chat.receive.shout: default: true + description: Allows access to receiving shout chat messages essentials.chat.receive.question: default: true + description: Allows access to receiving global question chat messages From 8e0fb0585aa640dccaca58bcaf21f4e87700a363 Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 19 Apr 2025 19:30:40 -0400 Subject: [PATCH 10/18] discord permissions --- .../src/main/resources/plugin.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/EssentialsDiscord/src/main/resources/plugin.yml b/EssentialsDiscord/src/main/resources/plugin.yml index fad076db5fe..edfc0996970 100644 --- a/EssentialsDiscord/src/main/resources/plugin.yml +++ b/EssentialsDiscord/src/main/resources/plugin.yml @@ -16,4 +16,21 @@ commands: discord: description: Sends the discord invite link to the player. usage: / - aliases: [ediscord] \ No newline at end of file + aliases: [ediscord] +permissions: + essentials.discord.markdown: + description: Allows the bearer to bypass the Discord markdown filter + essentials.discord.ping: + description: Allows the bearer to ping users in Discord + essentials.discord.receive.: + description: Allows the bearer to receive messages from the specified channel + essentials.discord: + description: Allows access to the /discord command + essentials.discordbroadcast: + description: Allows access to the /discordbroadcast command + essentials.discordbroadcast.markdown: + description: Allows the bearer to bypass the Discord markdown filter for /discordbroadcast + essentials.discordbroadcast.ping: + description: Allows the bearer to ping users in Discord for /discordbroadcast + essentials.discordbroadcast.: + description: Allows access to the /discordbroadcast command for the specified channel \ No newline at end of file From 083961993a56455ebcbf6958981bf73323c2d42d Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 19 Apr 2025 19:32:01 -0400 Subject: [PATCH 11/18] discordlink permissions --- EssentialsDiscord/src/main/resources/plugin.yml | 2 +- EssentialsDiscordLink/src/main/resources/plugin.yml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/EssentialsDiscord/src/main/resources/plugin.yml b/EssentialsDiscord/src/main/resources/plugin.yml index edfc0996970..ed6cb51d716 100644 --- a/EssentialsDiscord/src/main/resources/plugin.yml +++ b/EssentialsDiscord/src/main/resources/plugin.yml @@ -33,4 +33,4 @@ permissions: essentials.discordbroadcast.ping: description: Allows the bearer to ping users in Discord for /discordbroadcast essentials.discordbroadcast.: - description: Allows access to the /discordbroadcast command for the specified channel \ No newline at end of file + description: Allows access to the /discordbroadcast command for the specified channel diff --git a/EssentialsDiscordLink/src/main/resources/plugin.yml b/EssentialsDiscordLink/src/main/resources/plugin.yml index 49df5f7f3d0..ff92febcbca 100644 --- a/EssentialsDiscordLink/src/main/resources/plugin.yml +++ b/EssentialsDiscordLink/src/main/resources/plugin.yml @@ -16,3 +16,8 @@ commands: description: Unlinks your Minecraft account from any associated Discord account. usage: / aliases: [eunlink, discordunlink, ediscordunlink] +permissions: + essentials.link: + description: Allows access to the /link command + essentials.unlink: + description: Allows access to the /unlink command From 305cf431706ec56f5baeae60a27084d600ecefda Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 19 Apr 2025 19:34:12 -0400 Subject: [PATCH 12/18] geoip permissions --- EssentialsGeoIP/src/main/resources/plugin.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/EssentialsGeoIP/src/main/resources/plugin.yml b/EssentialsGeoIP/src/main/resources/plugin.yml index 2ddee7b1201..e1d34b3fda8 100644 --- a/EssentialsGeoIP/src/main/resources/plugin.yml +++ b/EssentialsGeoIP/src/main/resources/plugin.yml @@ -8,3 +8,8 @@ description: Shows the country or city of a user on login and /whois. authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, kjiang, pop4959] depend: [Essentials] api-version: 1.13 +permissions: + essentials.geoip.show: + description: Shows the country or city of a user on login and /whois. + essentials.geoip.hide: + description: Hides the bearer of this permission from users with essentials.geoip.show From 8f4675262f154f675fd3a6ea24f9c9eb18fab70c Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 19 Apr 2025 19:41:12 -0400 Subject: [PATCH 13/18] protect permissions --- .../src/main/resources/plugin.yml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/EssentialsProtect/src/main/resources/plugin.yml b/EssentialsProtect/src/main/resources/plugin.yml index 65764be4a41..554b2bb118e 100644 --- a/EssentialsProtect/src/main/resources/plugin.yml +++ b/EssentialsProtect/src/main/resources/plugin.yml @@ -8,3 +8,38 @@ description: Provides protection for various parts of the world. authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits, drtshock] softdepend: [Essentials] api-version: 1.13 +permissions: + essentials.protect.entitytarget.bypass: + description: Allows the bearer to be targeted by entities + essentials.protect.pvp: + description: Allows the bearer to participate in PvP when prevent pvp is enabled + essentials.protect.damage.disable: + description: Allows the bearer to not take damage + essentials.protect.damage.contact: + description: Allows the bearer to take damage from cacti and other contact damage + essentials.protect.damage.lava: + description: Allows the bearer to take damage from lava + essentials.protect.damage.tnt: + description: Allows the bearer to take damage from TNT + essentials.protect.damage.creeper: + description: Allows the bearer to take damage from creepers + essentials.protect.damage.fireball: + description: Allows the bearer to take damage from fireballs + essentials.protect.damage.witherskull: + description: Allows the bearer to take damage from wither skulls + essentials.protect.damage.tnt-minecraft: + description: Allows the bearer to take damage from a tnt minecart + essentials.protect.damage.projectiles: + description: Allows the bearer to take damage from projectiles + essentials.protect.damage.fall: + description: Allows the bearer to take fall damage + essentials.protect.damage.suffocation: + description: Allows the bearer to take suffocation damage + essentials.protect.damage.fire: + description: Allows the bearer to take fire damage + essentials.protect.damage.drowning: + description: Allows the bearer to take drowning damage + essentials.protect.damage.lightning: + description: Allows the bearer to take lightning damage + essentials.protect.damage.wither: + description: Allows the bearer to take wither damage From e860c9c363e63ece9ecbaf4f18ccb5dd8a1c86a5 Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 19 Apr 2025 19:43:31 -0400 Subject: [PATCH 14/18] spawn permissions --- EssentialsSpawn/src/main/resources/plugin.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/EssentialsSpawn/src/main/resources/plugin.yml b/EssentialsSpawn/src/main/resources/plugin.yml index e0a7b770d05..651fdd15889 100644 --- a/EssentialsSpawn/src/main/resources/plugin.yml +++ b/EssentialsSpawn/src/main/resources/plugin.yml @@ -18,6 +18,12 @@ commands: usage: / [player] aliases: [espawn] permissions: + essentials.spawn: + description: Allows access to the /spawn command + essentials.spawn.others: + description: Allows access to the /spawn command for other players + essentials.setspawn: + description: Allows access to the /setspawn command essentials.spawn-on-join.exempt: default: false - description: "Bypass spawn teleportation on join when spawn-on-join is true." + description: Bypass spawn teleportation on join when spawn-on-join is true From 7e8641b8e342649e39568783ee5abdae2c6287c2 Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 19 Apr 2025 19:45:11 -0400 Subject: [PATCH 15/18] xmpp permissions --- EssentialsXMPP/src/main/resources/plugin.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/EssentialsXMPP/src/main/resources/plugin.yml b/EssentialsXMPP/src/main/resources/plugin.yml index 9b2d54c8c73..47ccd73cc11 100644 --- a/EssentialsXMPP/src/main/resources/plugin.yml +++ b/EssentialsXMPP/src/main/resources/plugin.yml @@ -18,3 +18,10 @@ commands: xmppspy: description: Toggles XMPP spy for all messages. usage: / +permissions: + essentials.xmpp: + description: Allows access to the /xmpp command + essentials.setxmpp: + description: Allows access to the /setxmpp command + essentials.xmppspy: + description: Allows access to the /xmppspy command From 9b3d4bad26e52f2adff185f78cdc05eaa93b119f Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 19 Apr 2025 19:45:53 -0400 Subject: [PATCH 16/18] remove --- EssentialsAntiBuild/src/main/resources/plugin.yml | 1 - EssentialsChat/src/main/resources/plugin.yml | 1 - EssentialsGeoIP/src/main/resources/plugin.yml | 1 - EssentialsProtect/src/main/resources/plugin.yml | 1 - EssentialsSpawn/src/main/resources/plugin.yml | 1 - EssentialsXMPP/src/main/resources/plugin.yml | 1 - 6 files changed, 6 deletions(-) diff --git a/EssentialsAntiBuild/src/main/resources/plugin.yml b/EssentialsAntiBuild/src/main/resources/plugin.yml index f0416a9a25c..bbfd21dd709 100644 --- a/EssentialsAntiBuild/src/main/resources/plugin.yml +++ b/EssentialsAntiBuild/src/main/resources/plugin.yml @@ -1,4 +1,3 @@ -# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.) name: EssentialsAntiBuild main: com.earth2me.essentials.antibuild.EssentialsAntiBuild # Note to developers: This next line cannot change, or the automatic versioning system will break. diff --git a/EssentialsChat/src/main/resources/plugin.yml b/EssentialsChat/src/main/resources/plugin.yml index 3a0f038ca66..a6b5103403a 100644 --- a/EssentialsChat/src/main/resources/plugin.yml +++ b/EssentialsChat/src/main/resources/plugin.yml @@ -1,4 +1,3 @@ -# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.) name: EssentialsChat main: com.earth2me.essentials.chat.EssentialsChat # Note to developers: This next line cannot change, or the automatic versioning system will break. diff --git a/EssentialsGeoIP/src/main/resources/plugin.yml b/EssentialsGeoIP/src/main/resources/plugin.yml index e1d34b3fda8..5a675bfc6ad 100644 --- a/EssentialsGeoIP/src/main/resources/plugin.yml +++ b/EssentialsGeoIP/src/main/resources/plugin.yml @@ -1,4 +1,3 @@ -# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.) name: EssentialsGeoIP main: com.earth2me.essentials.geoip.EssentialsGeoIP # Note to developers: This next line cannot change, or the automatic versioning system will break. diff --git a/EssentialsProtect/src/main/resources/plugin.yml b/EssentialsProtect/src/main/resources/plugin.yml index 554b2bb118e..027249cc9d1 100644 --- a/EssentialsProtect/src/main/resources/plugin.yml +++ b/EssentialsProtect/src/main/resources/plugin.yml @@ -1,4 +1,3 @@ -# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.) name: EssentialsProtect main: com.earth2me.essentials.protect.EssentialsProtect # Note to developers: This next line cannot change, or the automatic versioning system will break. diff --git a/EssentialsSpawn/src/main/resources/plugin.yml b/EssentialsSpawn/src/main/resources/plugin.yml index 651fdd15889..389ab58fdec 100644 --- a/EssentialsSpawn/src/main/resources/plugin.yml +++ b/EssentialsSpawn/src/main/resources/plugin.yml @@ -1,4 +1,3 @@ -# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.) name: EssentialsSpawn main: com.earth2me.essentials.spawn.EssentialsSpawn # Note to developers: This next line cannot change, or the automatic versioning system will break. diff --git a/EssentialsXMPP/src/main/resources/plugin.yml b/EssentialsXMPP/src/main/resources/plugin.yml index 47ccd73cc11..e267ef5e042 100644 --- a/EssentialsXMPP/src/main/resources/plugin.yml +++ b/EssentialsXMPP/src/main/resources/plugin.yml @@ -1,4 +1,3 @@ -# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.) name: EssentialsXMPP main: com.earth2me.essentials.xmpp.EssentialsXMPP # Note to developers: This next line cannot change, or the automatic versioning system will break. From 9ec62e4296f7afd4f3e6a3715484e682d694c32e Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 19 Apr 2025 20:07:38 -0400 Subject: [PATCH 17/18] finalize extract data task --- .../src/main/kotlin/CommandDataTask.kt | 53 +++++++++---------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/build-logic/src/main/kotlin/CommandDataTask.kt b/build-logic/src/main/kotlin/CommandDataTask.kt index 4ada5e73033..fa026958863 100644 --- a/build-logic/src/main/kotlin/CommandDataTask.kt +++ b/build-logic/src/main/kotlin/CommandDataTask.kt @@ -11,6 +11,8 @@ abstract class CommandDataTask : DefaultTask() { @OutputFile val permissionDestination = project.objects.fileProperty() + // i promise i will be safe + @Suppress("UNCHECKED_CAST") @TaskAction private fun harvest() { val pluginYml = project.file("src/main/resources/plugin.yml") @@ -27,9 +29,6 @@ abstract class CommandDataTask : DefaultTask() { val yaml = Yaml() val data: Map = yaml.load(pluginYml.inputStream()) - - // i promise i will be safe - @Suppress("UNCHECKED_CAST") val commands = data["commands"] as? Map> ?: emptyMap() val extractedCommands = commands.mapValues { (_, details) -> @@ -47,6 +46,20 @@ abstract class CommandDataTask : DefaultTask() { ) }.toMutableMap() + val permissions = data["permissions"] as? Map> ?: emptyMap() + + val extractedPermissions = permissions.mapValues { (_, value) -> + val default = value["default"] ?: "op" + val description = value["description"] as? String ?: "" + val children = value["children"] as? Map ?: emptyMap() + + mapOf( + "default" to default, + "description" to description, + "children" to children + ) + }.toMutableMap() + if (extractedCommands.isEmpty()) { logger.warn("No commands found in plugin.yml for ${project.name}") } else { @@ -71,7 +84,6 @@ abstract class CommandDataTask : DefaultTask() { "Usage" -> extractedCommands[command] = commandData + ("usage" to value.toString()) } } else { - @Suppress("UNCHECKED_CAST") val usagesList = commandData["usages"] as MutableList> // verbose command usages usagesList.add( @@ -93,30 +105,15 @@ abstract class CommandDataTask : DefaultTask() { output.copyTo(destination.get().asFile, overwrite = true) } - val sourceDir = project.file("src/main/java") - if (!sourceDir.exists() || !sourceDir.isDirectory) { - logger.warn("No Java source directory found at src/main/java; skipping isAuthorized scanning.") - return - } - val authCallRegex = Regex("""\.\s*isAuthorized\s*\(\s*"([^"]+)""") - val permissionsFound = mutableSetOf() - - sourceDir.walkTopDown().filter { it.isFile && it.extension == "java" }.forEach { file -> - file.forEachLine { line -> - authCallRegex.findAll(line).forEach { matchResult -> - val permission = matchResult.groupValues[1] - if (permission.isNotBlank()) { - permissionsFound.add(permission) - } - } - } + if (extractedPermissions.isEmpty()) { + logger.warn("No permissions found in plugin.yml for ${project.name}") + } else { + val json = GsonBuilder().create().toJson(extractedPermissions) + val output = project.file("build/generated/${project.name}-permissions.json") + output.parentFile.mkdirs() + output.writeText(json) + permissionDestination.get().asFile.parentFile.mkdirs() + output.copyTo(permissionDestination.get().asFile, overwrite = true) } - - val authJson = GsonBuilder().create().toJson(permissionsFound) - val authOutputFile = project.file("build/generated/${project.name}-permissions.json") - authOutputFile.parentFile.mkdirs() - authOutputFile.writeText(authJson) - permissionDestination.get().asFile.parentFile.mkdirs() - authOutputFile.copyTo(permissionDestination.get().asFile, overwrite = true) } } From e94ab585bd7d993f27354083c6be9394ae9b0fac Mon Sep 17 00:00:00 2001 From: JRoy <10731363+JRoy@users.noreply.github.com> Date: Sat, 19 Apr 2025 20:13:48 -0400 Subject: [PATCH 18/18] delete generated directory as part of clean --- .../src/main/kotlin/essentials.parent-build-logic.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/build-logic/src/main/kotlin/essentials.parent-build-logic.gradle.kts b/build-logic/src/main/kotlin/essentials.parent-build-logic.gradle.kts index 463d8bc2861..a78fa0aeede 100644 --- a/build-logic/src/main/kotlin/essentials.parent-build-logic.gradle.kts +++ b/build-logic/src/main/kotlin/essentials.parent-build-logic.gradle.kts @@ -26,6 +26,7 @@ tasks { } named("clean") { delete(file("jars")) + delete(file("generated")) } }