Updates version to 0.9.1.0, updates README and adds a permission for changing config values

Adds the stargate.admin.config permission, which is required to use /sg config
This commit is contained in:
Kristian Knarvik 2021-11-09 21:16:53 +01:00
parent b4d908eaa0
commit 1c2cad2ec1
5 changed files with 19 additions and 7 deletions

View File

@ -14,6 +14,7 @@ can share a network or be split into clusters; they can be hidden on a network o
- Underwater portals -- portals can be placed underwater as long as a waterproof button is used - Underwater portals -- portals can be placed underwater as long as a waterproof button is used
- API available -- using the API, a lot of behavior can be changed - API available -- using the API, a lot of behavior can be changed
- Button customization -- a large amount of materials usable as buttons (buttons, wall corals, shulkers, chests) - Button customization -- a large amount of materials usable as buttons (buttons, wall corals, shulkers, chests)
- Config commands -- All main config values can be changed from the commandline
## Background ## Background
@ -80,11 +81,12 @@ stargate.free -- Allow free use/creation/destruction of Stargates
stargate.free.create -- Allow free creation of Stargates stargate.free.create -- Allow free creation of Stargates
stargate.free.destroy -- Allow free destruction of Stargates stargate.free.destroy -- Allow free destruction of Stargates
stargate.admin -- Allow all admin features (Hidden/Private only so far) stargate.admin -- Allow all admin features (Hidden/Private bypass, BungeeCord, Reload, Config)
stargate.admin.private -- Allow use of Private gates not owned by user stargate.admin.private -- Allow use of Private gates not owned by user
stargate.admin.hidden -- Allow access to Hidden gates not ownerd by user stargate.admin.hidden -- Allow access to Hidden gates not ownerd by user
stargate.admin.bungee -- Allow the creation of BungeeCord stargates (U option) stargate.admin.bungee -- Allow the creation of BungeeCord stargates (U option)
stargate.admin.reload -- Allow use of the reload command stargate.admin.reload -- Allow use of the reload command
stargate.admin.config -- Allows the player to change config values from the chat
``` ```
## Default Permissions ## Default Permissions
@ -386,6 +388,12 @@ portalInfoServer=Server: %server%
# Changes # Changes
#### \[Version 0.9.1.0] EpicKnarvik97 fork
- Rewrites config loading as a part of the changes required to implement config commands
- This update adds commands to change all config values from the chat or the console, complete with tab completion
- Adds a new permission "stargate.admin.config" which is required to edit config values from the chat
#### \[Version 0.9.0.7] EpicKnarvik97 fork #### \[Version 0.9.0.7] EpicKnarvik97 fork
- Stops registering the sign as a lookup block for stargates without a sign - Stops registering the sign as a lookup block for stargates without a sign

View File

@ -4,7 +4,7 @@
<groupId>net.knarcraft</groupId> <groupId>net.knarcraft</groupId>
<artifactId>Stargate</artifactId> <artifactId>Stargate</artifactId>
<version>0.9.0.7</version> <version>0.9.1.0</version>
<licenses> <licenses>
<license> <license>

View File

@ -19,7 +19,7 @@ public class CommandConfig implements CommandExecutor {
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s, public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String s,
@NotNull String[] args) { @NotNull String[] args) {
if (commandSender instanceof Player player) { if (commandSender instanceof Player player) {
if (!player.hasPermission("stargate.admin")) { if (!player.hasPermission("stargate.admin.config")) {
Stargate.getMessageSender().sendErrorMessage(commandSender, "Permission Denied"); Stargate.getMessageSender().sendErrorMessage(commandSender, "Permission Denied");
return true; return true;
} }

View File

@ -48,7 +48,7 @@ public class StarGateTabCompleter implements TabCompleter {
if (!(commandSender instanceof Player player) || player.hasPermission("stargate.admin.reload")) { if (!(commandSender instanceof Player player) || player.hasPermission("stargate.admin.reload")) {
commands.add("reload"); commands.add("reload");
} }
if (!(commandSender instanceof Player player) || player.hasPermission("stargate.admin")) { if (!(commandSender instanceof Player player) || player.hasPermission("stargate.admin.config")) {
commands.add("config"); commands.add("config");
} }
return commands; return commands;

View File

@ -1,6 +1,6 @@
name: Stargate name: Stargate
main: net.knarcraft.stargate.Stargate main: net.knarcraft.stargate.Stargate
version: 0.9.0.7 version: 0.9.1.0
description: Stargate mod for Bukkit Revived description: Stargate mod for Bukkit Revived
author: EpicKnarvik97 author: EpicKnarvik97
authors: [ Drakia, PseudoKnight, EpicKnarvik97 ] authors: [ Drakia, PseudoKnight, EpicKnarvik97 ]
@ -138,14 +138,18 @@ permissions:
stargate.admin.bungee: stargate.admin.bungee:
description: Allows the creation and destruction of a stargate between BungeeCord servers description: Allows the creation and destruction of a stargate between BungeeCord servers
default: false default: false
stargate.admin.config:
description: Allows the player to change config values from the chat
default: false
stargate.server: stargate.server:
description: Allows the creation of a BungeeCord stargate going to any server description: Allows the creation of a BungeeCord stargate going to any server
default: false default: false
stargate.admin: stargate.admin:
description: Allow all admin features and commands (Hidden/Private bypass, BungeeCord, Reload) description: Allow all admin features and commands (Hidden/Private bypass, BungeeCord, Reload, Config)
default: op default: op
children: children:
stargate.admin.reload: true stargate.admin.reload: true
stargate.admin.hidden: true stargate.admin.hidden: true
stargate.admin.private: true stargate.admin.private: true
stargate.admin.bungee: true stargate.admin.bungee: true
stargate.admin.config: true