Adds better default permissions

- Adds three new permission groups for easier setup
- Sets better default permissions
- Updates and prettifies some documentation
- Renames the silent portal option to quiet
This commit is contained in:
2025-07-30 18:58:42 +02:00
parent e971bd2cf5
commit d80907b5fb
12 changed files with 253 additions and 199 deletions

319
README.md
View File

@@ -17,7 +17,7 @@ Highly capable, simple to use, with robust network capabilities and extensive cu
- **Ability to create custom gate configurations**. -- Four different default gate configurations are available. - **Ability to create custom gate configurations**. -- Four different default gate configurations are available.
- **Ability to include #Tags in gate designs**. (Ability to include material lists as valid options within a format) - **Ability to include #Tags in gate designs**. (Ability to include material lists as valid options within a format)
- **Message customization** - **Message customization**
- **Multiple built-in languages** (de, en, es, fr, hu, it, ja, nb-no, nl, nn-no, pt-br, ru, zh_cn) - **Multiple built-in languages** (cs, de, en, es, fr, hu, it, ja, nb, nl, nn, pt, ru, uk, zh)
- **Teleport across worlds or servers** (BungeeCord supported) - **Teleport across worlds or servers** (BungeeCord supported)
- **Vehicle teleportation** -- teleport minecarts, boats, horses, pigs and striders - **Vehicle teleportation** -- teleport minecarts, boats, horses, pigs and striders
- **Leashed teleportation** -- teleport any creature in a leash with the player - **Leashed teleportation** -- teleport any creature in a leash with the player
@@ -74,63 +74,74 @@ server.
# Permissions # Permissions
``` ## Easy setup permission groups
stargate.use -- Allow use of all Stargates linking to any world in any network (Override ALL network/world permissions. Set to false to use network/world specific permissions)
stargate.world -- Allow use of Stargates linking to any world
stargate.world.{world} -- Allow use of Stargates with a destination in {world}. Set to false to disallow use.
stargate.network -- Allow use of Stargates on all networks
stargate.network.{network} -- Allow use of all Stargates in {network}. Set to false to disallow use.
stargate.server -- Allow use of Stargates going to all servers
stargate.server.{server} -- Allow usee of all Stargates going to {server}. Set to false to disallow use.
stargate.option -- Allow use of all options Note: These permission groups inherit from each other (builder has player's permissions and admin has builder's
stargate.option.hidden -- Allow use of 'H'idden permissions), so you only need the most permissive one.
stargate.option.alwayson -- Allow use of 'A'lways-On
stargate.option.private -- Allow use of 'P'rivate
stargate.option.free -- Allow use of 'F'ree
stargate.option.backwards -- Allow use of 'B'ackwards
stargate.option.show -- Allow use of 'S'how
stargate.option.nonetwork -- Allow use of 'N'oNetwork
stargate.option.random -- Allow use of 'R'andom stargates
stargate.option.silent -- Allow use of S'i'lent stargates
stargate.option.nosign -- Allow use of 'E' (No sign)
stargate.create -- Allow creating Stargates on any network (Override all create permissions) | Node | Default | Description |
stargate.create.personal -- Allow creating Stargates on network {playername} |------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
stargate.create.network -- Allow creating Stargates on any network | stargate.group.player | True | Allows using all non-private/non-personal Stargates and creating personal Stargates using the default nethergate format. |
stargate.create.network.{networkname} -- Allow creating Stargates on network {networkname}. Set to false to disallow creation on {networkname} | stargate.group.builder | False | Allows creating and destroying all types of Stargates anywhere with any option (except BungeeCord). |
stargate.create.gate -- Allow creation using any gate layout | stargate.group.admin | Op | Allows admin stuff like creating BungeeCord gates, reloading, changing the configuration, dying any Stargate's sign and accessing private and hidden Stargates. |
stargate.create.gate.{gatefile} -- Allow creation using only {gatefile} gates | stargate.* | False | Gives all Stargate-related permissions |
stargate.destroy -- Allow destruction of Stargates on any network (Overrides all destroy permissions) ## Individual nodes
stargate.destroy.personal -- Allow destruction of Stargates owned by the player only
stargate.destroy.network -- Allow destruction of Stargates on any network
stargate.destroy.network.{networkname} -- Allow destruction of Stargates on network {networkname}. Set to false to disallow destruction of {networkname}
stargate.free -- Allow free use/creation/destruction of Stargates <details>
stargate.free.use -- Allow free use of Stargates <summary>The full list of permission nodes may be found below: (Click to expand)</summary>
stargate.free.create -- Allow free creation of Stargates
stargate.free.destroy -- Allow free destruction of Stargates
stargate.admin -- Allow all admin features (Hidden/Private bypass, BungeeCord, Reload, Config) Note: `-` is used to show inheritance, such as `stargate.use` being a parent of `stargate.world`, `stargate.network`, and
stargate.admin.private -- Allow use of Private gates not owned by user `stargate.server`, thus giving all permissions of the indented items following the unindented node.
stargate.admin.hidden -- Allow access to Hidden gates not owned by the user
stargate.admin.bungee -- Allow the creation of BungeeCord stargates (U option)
stargate.admin.reload -- Allow use of the reload command
stargate.admin.config -- Allows the player to change config values from the chat
stargate.admin.dye -- Allows this player to change the dye of any stargate's sign
```
## Default Permissions | Node | Description |
|-------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| stargate.use | Allow use of all Stargates linking to any world in any network (Override ALL network/world permissions. Set to false to use network/world specific permissions) |
| - stargate.world | Allow use of Stargates linking to any world |
| -- stargate.world.{world} | Allow use of Stargates with a destination in {world}. Set to false to disallow use. |
| - stargate.network | Allow use of Stargates on all networks |
| -- stargate.network.{network} | Allow use of all Stargates in {network}. Set to false to disallow use. |
| - stargate.server | Allow use of Stargates going to all servers |
| -- stargate.server.{server} | Allow usee of all Stargates going to {server}. Set to false to disallow use. |
| | |
| stargate.option | Allow use of all options |
| - stargate.option.hidden | Allow use of 'H'idden |
| - stargate.option.alwayson | Allow use of 'A'lways-On |
| - stargate.option.private | Allow use of 'P'rivate |
| - stargate.option.free | Allow use of 'F'ree |
| - stargate.option.backwards | Allow use of 'B'ackwards |
| - stargate.option.show | Allow use of 'S'how |
| - stargate.option.nonetwork | Allow use of 'N'oNetwork |
| - stargate.option.random | Allow use of 'R'andom stargates |
| - stargate.option.quiet | Allow use of 'Q'uiet stargates |
| - stargate.option.nosign | Allow use of 'V' (No sign) |
| | |
| stargate.create | Allow creating Stargates on any network (Override all create permissions) |
| - stargate.create.personal | Allow creating Stargates on network {playername} |
| - stargate.create.network | Allow creating Stargates on any network |
| -- stargate.create.network.{networkname} | Allow creating Stargates on network {networkname}. Set to false to disallow creation on {networkname} |
| - stargate.create.gate | Allow creation using any gate layout |
| -- stargate.create.gate.{gatefile} | Allow creation using only {gatefile} gates |
| | |
| stargate.destroy | Allow destruction of Stargates on any network (Overrides all destroy permissions) |
| - stargate.destroy.personal | Allow destruction of Stargates owned by the player only |
| - stargate.destroy.network | Allow destruction of Stargates on any network |
| -- stargate.destroy.network.{networkname} | Allow destruction of Stargates on network {networkname}. Set to false to disallow destruction of {networkname} |
| | |
| stargate.free | Allow free use/creation/destruction of Stargates |
| - stargate.free.use | Allow free use of Stargates |
| - stargate.free.create | Allow free creation of Stargates |
| - stargate.free.destroy | Allow free destruction of Stargates |
| | |
| 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.hidden | Allow access to Hidden gates not owned by the user |
| - stargate.admin.bungee | Allow the creation of BungeeCord stargates (U option) |
| - stargate.admin.reload | Allow use of the reload command |
| - stargate.admin.config | Allows the player to change config values from the chat |
| - stargate.admin.dye | Allows this player to change the dye of any stargate's sign |
``` </details>
stargate.use -- Everyone
stargate.create -- Op
stargate.destroy -- Op
stargate.option -- Op
stargate.free -- Op
stargate.admin -- Op
```
# Instructions # Instructions
@@ -252,23 +263,30 @@ X*.X
sign). sign).
- `button` is used to define what is used for the gate's *activator*. It may be any type of button, wall coral, or - `button` is used to define what is used for the gate's *activator*. It may be any type of button, wall coral, or
container. container.
- All materials can use a single tag or material, or a comma-separated list of tags, materials or both (#WOOL,Obsidian).
Upon generating a button, or opening/closing a Stargate, a random possible material is chosen. When validating, any
material/tag specified in the comma-separated list is considered valid.
<details> <details>
<summary>The full list of valid activator types may be found below: (Click to expand)</summary> <summary>The full list of valid activator types may be found below: (Click to expand)</summary>
``` ```
STONE_BUTTON Any kind of button (automatically updated):
OAK_BUTTON OAK_BUTTON
SPRUCE_BUTTON SPRUCE_BUTTON
BIRCH_BUTTON BIRCH_BUTTON
JUNGLE_BUTTON JUNGLE_BUTTON
ACACIA_BUTTON ACACIA_BUTTON
DARK_OAK_BUTTON DARK_OAK_BUTTON
MANGROVE_BUTTON
CHERRY_BUTTON
PALE_OAK_BUTTON
BAMBOO_BUTTON
CRIMSON_BUTTON CRIMSON_BUTTON
WARPED_BUTTON WARPED_BUTTON
STONE_BUTTON
POLISHED_BLACKSTONE_BUTTON POLISHED_BLACKSTONE_BUTTON
BAMBOO_BUTTON
CHERRY_BUTTON
CHEST CHEST
TRAPPED_CHEST TRAPPED_CHEST
@@ -378,7 +396,7 @@ In this case, a simple 5x5 square has been used as a gate.
Gates are also not limited to [materials](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html) (such Gates are also not limited to [materials](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html) (such
as `OBSIDIAN`); they may also use [tags](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Tag.html) (such as `OBSIDIAN`); they may also use [tags](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Tag.html) (such
as `#WOOL`).<br> as `#WOOL`), or a comma-separated list (such as `OBSIDIAN,#WOOL`).<br>
Note that all tags must be prefaced with a hashtag (`#`), as in `#WOOL`. Note that all tags must be prefaced with a hashtag (`#`), as in `#WOOL`.
``` ```
@@ -414,50 +432,54 @@ X.*.X
# Configuration # Configuration
``` | Node | Default | Description |
language - The language to use (Included languages: en, de, es, fr, hu, it, ja, nb-no, nl, nn-no, pt-br, ru, zh_cn) |----------------------------------|---------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
adminUpdateAlert - Whether to alert admins about an available update when joining the server | language | en | The language to use (Included languages: cs, de, en, es, fr, hu, it, ja, nb, nl, nn, pt, ru, uk, zh). |
folders: | adminUpdateAlert | true | Whether to alert admins about an available update when joining the server. |
portalFolder - The folder your portal databases are saved in | dynmap | | |
gateFolder - The folder containing your .gate files | .enableDynmap | true | Should StarGate enable integration with Dynmap? This will show StarGates on your map. |
gates: | .dynmapIconsHiddenByDefault | false | Should StarGate icons be hidden by default? (must users manually enable their checkbox?) |
maxGatesEachNetwork - If non-zero, will define the maximum amount of gates allowed on any network. | gates | | |
defaultGateNetwork - The default gate network | .maxGatesEachNetwork | 0 | If non-zero, will define the maximum amount of gates allowed on any network. |
exitVelocity - The velocity to give players exiting stargates, relative to the entry velocity (1 = same as entry velocity) | .defaultGateNetwork | central | The default network for any non-personal Stargate without an explicitly defined network. |
cosmetic: | .exitVelocity | 0.1 | The velocity to give players exiting stargates, relative to the entry velocity (1 = same as entry velocity) |
rememberDestination - Whether to set the first destination as the last used destination for all gates | gates.functionality | | |
sortNetworkDestinations - If true, network lists will be sorted alphabetically. | .enableCraftBookRemoveOnEjectFix | false | Should the plugin sacrifice vehicle integrity in order to fix a CraftBook destroy on exit incompatibility? |
mainSignColor - This allows you to specify the color of the gate signs. Use a color code such as WHITE,BLACK,YELLOW or a hex color code such as '#ed76d9'. You need quotes around hex color codes. | .enableBungee | false | Enable this for BungeeCord support. This allows portals across Bungee servers. |
highlightSignColor - This allows you to specify the color of the sign markings. Use a color code such as WHITE,BLACK,YELLOW or a hex color code such as '#ed76d9'. You need quotes around hex color codes. | .handleVehicles | true | Whether or not to handle vehicles going through gates. Set to false to disallow vehicles (Manned or not) going through gates. |
perSignColors: - A list of per-sign color specifications. Format: "SIGN_TYPE:mainColor,highlight_color". The SIGN_TYPE is OAK for an oak sign, DARK_OAK for a dark oak sign and so on. The colors can be "default" to use the color specified in "mainSignColor" or "highlightSignColor", "inverted" to use the inverse color of the default color, a normal color such as BLACK,WHITE,YELLOW or a hex color code such as #ed76d9. | .handleEmptyVehicles | true | Whether or not to handle empty vehicles going through gates (chest/hopper/tnt/furnace minecarts included). |
integrity: | .handleCreatureTransportation | true | Whether to handle players that transport creatures by sending vehicles (minecarts, boats) through gates. |
destroyedByExplosion - Whether to destroy a stargate with explosions, or stop an explosion if it contains a gates controls. | .handleNonPlayerVehicles | true | Whether or not to handle vehicles with a passenger which is not a player going through gates (pigs, horses, villagers, creepers, etc.). handleCreatureTransportation must be enabled. |
verifyPortals - Whether or not all the non-sign blocks are checked to match the gate layout when an old stargate is loaded at startup. | .handleLeashedCreatures | true | Whether or not to handle creatures leashed by a player going through gates. Set to false to disallow leashed creatures going through gates. |
protectEntrance - If true, will protect from users breaking gate entrance blocks (This is more resource intensive than the usual check, and should only be enabled for servers that use solid open/close blocks) | gates.integrity | | |
controlUpdateDelay - The amount of ticks to wait between each Stargate control block update after startup. Increase this if Stargate loads too many chunks during startup. | .destroyedByExplosion | false | Whether to destroy a stargate with explosions, or stop an explosion if it contains a gates controls. |
functionality: | .verifyPortals | false | Whether or not all the non-sign blocks are checked to match the gate layout when an old stargate is loaded at startup. |
enableBungee - Enable this for BungeeCord support. This allows portals across Bungee servers. | .protectEntrance | false | If true, will protect from users breaking gate entrance blocks (This is more resource intensive than the usual check, and should only be enabled for servers that use solid open/close blocks) |
handleVehicles - Whether or not to handle vehicles going through gates. Set to false to disallow vehicles (Manned or not) going through gates. | .controlUpdateDelay | 3 | The amount of ticks to wait between each Stargate control block update after startup. Increase this if Stargate loads too many chunks during startup. |
handleEmptyVehicles - Whether or not to handle empty vehicles going through gates (chest/hopper/tnt/furnace minecarts included). | gates.cosmetic | | |
handleCreatureTransportation - Whether or not to handle players that transport creatures by sending vehicles (minecarts, boats) through gates. | .rememberDestination | false | Whether the topmost name on a sign's destinations should be the most recently used destination. |
handleNonPlayerVehicles - Whether or not to handle vehicles with a passenger which is not a player going through gates (pigs, horses, villagers, creepers, etc.). handleCreatureTransportation must be enabled. | .sortNetworkDestinations | false | If true, network lists will be sorted alphabetically. |
handleLeashedCreatures - Whether or not to handle creatures leashed by a player going through gates. Set to false to disallow leashed creatures going through gates. | .mainSignColor | BLACK | This allows you to specify the color of the gate signs. Use a color code such as WHITE,BLACK,YELLOW or a hex color code such as '#ed76d9'. You need quotes around hex color codes. |
enableCraftBookRemoveOnEjectFix - Whether to enable a fix that causes loss of NBT data, but allows vehicle teleportation to work when CraftBook's remove minecart/boat on eject setting is enabled | .highlightSignColor | WHITE | This allows you to specify the color of the sign markings. Use a color code such as WHITE,BLACK,YELLOW or a hex color code such as '#ed76d9'. You need quotes around hex color codes. |
economy: | .perSignColors | \[List] | A list of per-sign color specifications. Format: "SIGN_TYPE:mainColor,highlight_color". The SIGN_TYPE is OAK for an oak sign, DARK_OAK for a dark oak sign and so on. The colors can be "default" to use the color specified in "mainSignColor" or "highlightSignColor", "inverted" to use the inverse color of the default color, a normal color such as BLACK,WHITE,YELLOW or a hex color code such as #ed76d9. |
useEconomy - Whether or not to enable Economy using Vault (must have the Vault plugin) | economy | | |
createCost - The cost to create a stargate | .freeGatesColored | false | Enable to make gates that won't cost the player money show up as green |
destroyCost - The cost to destroy a stargate (Can be negative for a "refund" | .freeGatesColor | DARK_GREEN | This allows you to specify the color of the markings and name of free stargates |
useCost - The cost to use a stargate | .useEconomy | false | Whether or not to enable Economy using Vault (must have the Vault plugin) |
toOwner - Whether the money from gate-use goes to the owner or nobody | .createCost | 0 | The cost to create a stargate |
chargeFreeDestination - Enable to make players pay for teleportation even if the destination is free | .destroyCost | 0 | The cost to destroy a stargate (Can be negative for a "refund") |
freeGatesColored - Enable to make gates that won't cost the player money show up as green | .useCost | 0 | The cost to use a stargate |
freeGatesColor - This allows you to specify the color of the markings and name of free stargates | .toOwner | false | Whether the money from gate-use goes to the owner or nobody |
debugging: | .chargeFreeDestination | true | Enable to make players pay for teleportation even if the destination is free |
debug - Whether to show massive debug output | .taxAccount | '' | The tax account to use if the server uses a closed economy. |
permissionDebug - Whether to show massive permission debug output | folders | | |
advanced: | .portalFolder | plugins/Stargate/portals/ | The folder your portal databases are saved in |
waitForPlayerAfterTeleportDelay - The amount of ticks to wait before adding a player as passenger of a vehicle. On slow servers, a value of 6 is required to avoid client glitches after teleporting on a vehicle. | .gateFolder | plugins/Stargate/gates/ | The folder containing your .gate files |
``` | debugging | | |
| .debug | false | Whether to show massive debug output |
| .permissionDebug | false | Whether to show massive permission debug output |
| advanced | | |
| .waitForPlayerAfterTeleportDelay | 6 | The amount of ticks to wait before adding a player as passenger of a vehicle. On slow servers, a value of 6 is required to avoid client glitches after teleporting on a vehicle. |
# Message Customization # Message Customization
@@ -470,51 +492,51 @@ Please note that %variableName% should be kept, as it will be replaced with a re
<details> <details>
<summary>The full list of strings may be found below: (Click to expand)</summary> <summary>The full list of strings may be found below: (Click to expand)</summary>
``` | Path | Text |
prefix=[Stargate] |-----------------------|--------------------------------------------------------------------|
teleportMsg=Teleported | prefix | \[Stargate] |
destroyMsg=Gate Destroyed | teleportMsg | Teleported |
invalidMsg=Invalid Destination | destroyMsg | Gate Destroyed |
blockMsg=Destination Blocked | invalidMsg | Invalid Destination |
destEmpty=Destination List Empty | blockMsg | Destination Blocked |
denyMsg=Access Denied | destEmpty | Destination List Empty |
reloaded=Stargate Reloaded | denyMsg | Access Denied |
| reloaded | Stargate Reloaded |
ecoDeduct=Deducted %cost% | | |
ecoRefund=Refunded %cost% | ecoDeduct | Deducted %cost% |
ecoObtain=Obtained %cost% from Stargate %portal% | ecoRefund | Refunded %cost% |
ecoInFunds=Insufficient Funds | ecoObtain | Obtained %cost% from Stargate %portal% |
ecoLoadError=Vault was loaded, but no economy plugin could be hooked into | ecoInFunds | Insufficient Funds |
vaultLoadError=Economy is enabled but Vault could not be loaded. Economy disabled | ecoLoadError | Vault was loaded, but no economy plugin could be hooked into |
vaultLoaded=Vault v%version% found | vaultLoadError | Economy is enabled but Vault could not be loaded. Economy disabled |
| vaultLoaded | Vault v%version% found |
createMsg=Gate Created | | |
createNetDeny=You do not have access to that network | createMsg | Gate Created |
createGateDeny=You do not have access to that gate layout | createNetDeny | You do not have access to that network |
createPersonal=Creating gate on personal network | createGateDeny | You do not have access to that gate layout |
createNameLength=Name too short or too long. | createPersonal | Creating gate on personal network |
createExists=A gate by that name already exists | createNameLength | Name too short or too long. |
createFull=This network is full | createExists | A gate by that name already exists |
createWorldDeny=You do not have access to that world | createFull | This network is full |
createConflict=Gate conflicts with existing gate | createWorldDeny | You do not have access to that world |
| createConflict | Gate conflicts with existing gate |
signRightClick=Right click | | |
signToUse=to use gate | signRightClick | Right click |
signRandom=Random | signToUse | to use gate |
signDisconnected=Disconnected | signRandom | Random |
signInvalidGate=Invalid gate | signDisconnected | Disconnected |
| signInvalidGate | Invalid gate |
bungeeDisabled=BungeeCord support is disabled. | | |
bungeeDeny=You do not have permission to create BungeeCord gates. | bungeeDisabled | BungeeCord support is disabled. |
bungeeEmpty=BungeeCord gates require both a destination and network. | bungeeDeny | You do not have permission to create BungeeCord gates. |
bungeeSign=Teleport to | bungeeEmpty | BungeeCord gates require both a destination and network. |
| bungeeSign | Teleport to |
portalInfoTitle=[STARGATE INFO] | | |
portalInfoName=Name: %name% | portalInfoTitle | \[STARGATE INFO] |
portalInfoDestination=Destination: %destination% | portalInfoName | Name: %name% |
portalInfoNetwork=Network: %network% | portalInfoDestination | Destination: %destination% |
portalInfoServer=Server: %server% | portalInfoNetwork | Network: %network% |
``` | portalInfoServer | Server: %server% |
</details> </details>
@@ -523,7 +545,14 @@ portalInfoServer=Server: %server%
# Changes # Changes
#### \[Version 0.11.5.9] Unified Legacy Fork #### \[Version 0.11.5.11] Unified Legacy Fork
- Removes legacy sign drawing code, as the check for whether a server supported the sign sides kept failing for some
users.
- Fixes some problems regarding the startup validation of Stargates, which caused valid Stargates to be disabled when
the verification option was enabled.
#### \[Version 0.11.5.10] Unified Legacy Fork
- Fixed a problem with material tag support - Fixed a problem with material tag support
- Made serveral optimisations to significantly improve performance on servers with high playercounts. - Made serveral optimisations to significantly improve performance on servers with high playercounts.

View File

@@ -161,7 +161,7 @@ public class PlayerEventListener implements Listener {
//Just teleport the player like normal //Just teleport the player like normal
new PlayerTeleporter(destination, player).teleportPlayer(entrancePortal, event); new PlayerTeleporter(destination, player).teleportPlayer(entrancePortal, event);
} }
if (!entrancePortal.getOptions().isSilent()) { if (!entrancePortal.getOptions().isQuiet()) {
Stargate.getMessageSender().sendSuccessMessage(player, Stargate.getString(Message.TELEPORTED)); Stargate.getMessageSender().sendSuccessMessage(player, Stargate.getString(Message.TELEPORTED));
} }
entrancePortal.getPortalOpener().closePortal(false); entrancePortal.getPortalOpener().closePortal(false);
@@ -203,7 +203,7 @@ public class PlayerEventListener implements Listener {
//Decide if the user should be teleported to another bungee server //Decide if the user should be teleported to another bungee server
if (entrancePortal.getOptions().isBungee()) { if (entrancePortal.getOptions().isBungee()) {
if (BungeeHelper.bungeeTeleport(player, entrancePortal, event) && !entrancePortal.getOptions().isSilent()) { if (BungeeHelper.bungeeTeleport(player, entrancePortal, event) && !entrancePortal.getOptions().isQuiet()) {
Stargate.getMessageSender().sendSuccessMessage(player, Stargate.getString(Message.TELEPORTED)); Stargate.getMessageSender().sendSuccessMessage(player, Stargate.getString(Message.TELEPORTED));
} }
return false; return false;
@@ -404,7 +404,7 @@ public class PlayerEventListener implements Listener {
boolean deny = PermissionHelper.cannotAccessNetwork(player, portal.getCleanNetwork()); boolean deny = PermissionHelper.cannotAccessNetwork(player, portal.getCleanNetwork());
if (PermissionHelper.portalAccessDenied(player, portal, deny)) { if (PermissionHelper.portalAccessDenied(player, portal, deny)) {
if (!portal.getOptions().isSilent()) { if (!portal.getOptions().isQuiet()) {
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.ACCESS_DENIED)); Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.ACCESS_DENIED));
} }
return true; return true;
@@ -463,7 +463,7 @@ public class PlayerEventListener implements Listener {
/** /**
* Displays information about a clicked portal * Displays information about a clicked portal
* *
* <p>This will only display portal info if the portal has no sign and is not silent.</p> * <p>This will only display portal info if the portal has no sign and is not quiet.</p>
* *
* @param block <p>The clicked block</p> * @param block <p>The clicked block</p>
* @param player <p>The player that clicked the block</p> * @param player <p>The player that clicked the block</p>
@@ -475,7 +475,7 @@ public class PlayerEventListener implements Listener {
} }
//Display portal information as a portal without a sign does not display any //Display portal information as a portal without a sign does not display any
if (portal.getOptions().hasNoSign() && (!portal.getOptions().isSilent() || player.isSneaking())) { if (portal.getOptions().hasNoSign() && (!portal.getOptions().isQuiet() || player.isSneaking())) {
MessageSender sender = Stargate.getMessageSender(); MessageSender sender = Stargate.getMessageSender();
sender.sendSuccessMessage(player, ChatColor.GOLD + Stargate.getString(Message.PORTAL_INFO_TITLE)); sender.sendSuccessMessage(player, ChatColor.GOLD + Stargate.getString(Message.PORTAL_INFO_TITLE));
sender.sendSuccessMessage(player, Stargate.replacePlaceholders(Stargate.getString(Message.PORTAL_INFO_NAME), sender.sendSuccessMessage(player, Stargate.replacePlaceholders(Stargate.getString(Message.PORTAL_INFO_NAME),

View File

@@ -100,7 +100,7 @@ public class VehicleEventListener implements Listener {
for (Player player : players) { for (Player player : players) {
if (destinationPortal == null) { if (destinationPortal == null) {
cancelTeleportation = true; cancelTeleportation = true;
if (!entrancePortal.getOptions().isSilent()) { if (!entrancePortal.getOptions().isQuiet()) {
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.INVALID_DESTINATION)); Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.INVALID_DESTINATION));
} }
} else if (!TeleportHelper.playerCanTeleport(player, entrancePortal, destinationPortal)) { } else if (!TeleportHelper.playerCanTeleport(player, entrancePortal, destinationPortal)) {
@@ -136,7 +136,7 @@ public class VehicleEventListener implements Listener {
return; return;
} }
if (!entrancePortal.getOptions().isSilent()) { if (!entrancePortal.getOptions().isQuiet()) {
for (Player player : players) { for (Player player : players) {
Stargate.getMessageSender().sendSuccessMessage(player, Stargate.getString(Message.TELEPORTED)); Stargate.getMessageSender().sendSuccessMessage(player, Stargate.getString(Message.TELEPORTED));
} }

View File

@@ -258,7 +258,7 @@ public class PortalActivator {
//If no destinations are available, just tell the player and quit //If no destinations are available, just tell the player and quit
if (destinations.isEmpty()) { if (destinations.isEmpty()) {
if (!portal.getOptions().isSilent()) { if (!portal.getOptions().isQuiet()) {
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.NO_DESTINATION)); Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.NO_DESTINATION));
} }
return; return;

View File

@@ -55,7 +55,7 @@ public enum PortalOption {
/** /**
* This option allows a portal which does not display a teleportation message, for better immersion * This option allows a portal which does not display a teleportation message, for better immersion
*/ */
SILENT('q', "silent", 21), QUIET('q', "quiet", 21),
/** /**
* This option causes a fixed portal's sign to be removed after creation * This option causes a fixed portal's sign to be removed after creation

View File

@@ -172,15 +172,15 @@ public class PortalOptions {
} }
/** /**
* Gets whether this portal is silent * Gets whether this portal is QUIET
* *
* <p>A silent portal does not output anything to the chat when teleporting. This option is mainly useful to keep * <p>A quiet portal does not output anything to the chat when teleporting. This option is mainly useful to keep
* the immersion during teleportation (for role-playing servers or similar).</p> * the immersion during teleportation (for role-playing servers or similar).</p>
* *
* @return <p>Whether this portal is silent</p> * @return <p>Whether this portal is quiet</p>
*/ */
public boolean isSilent() { public boolean isQuiet() {
return this.options.get(PortalOption.SILENT); return this.options.get(PortalOption.QUIET);
} }
/** /**

View File

@@ -185,7 +185,7 @@ public final class BungeeHelper {
@NotNull PlayerMoveEvent event) { @NotNull PlayerMoveEvent event) {
//Check if bungee is actually enabled //Check if bungee is actually enabled
if (!Stargate.getGateConfig().enableBungee()) { if (!Stargate.getGateConfig().enableBungee()) {
if (!entrancePortal.getOptions().isSilent()) { if (!entrancePortal.getOptions().isQuiet()) {
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.BUNGEE_DISABLED)); Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.BUNGEE_DISABLED));
} }
entrancePortal.getPortalOpener().closePortal(false); entrancePortal.getPortalOpener().closePortal(false);

View File

@@ -38,7 +38,7 @@ public final class PermissionHelper {
//Destination is invalid or the same portal. Send an error message //Destination is invalid or the same portal. Send an error message
if (destination == null || destination == portal) { if (destination == null || destination == portal) {
if (!portal.getOptions().isSilent()) { if (!portal.getOptions().isQuiet()) {
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.INVALID_DESTINATION)); Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.INVALID_DESTINATION));
} }
return; return;
@@ -74,7 +74,7 @@ public final class PermissionHelper {
//Deny access if another player has activated the portal, and it's still in use //Deny access if another player has activated the portal, and it's still in use
if (!portal.getOptions().isFixed() && portal.getPortalActivator().isActive() && if (!portal.getOptions().isFixed() && portal.getPortalActivator().isActive() &&
portal.getActivePlayer() != player) { portal.getActivePlayer() != player) {
if (!portal.getOptions().isSilent()) { if (!portal.getOptions().isQuiet()) {
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.ACCESS_DENIED)); Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.ACCESS_DENIED));
} }
return true; return true;
@@ -82,7 +82,7 @@ public final class PermissionHelper {
//Check if the player can use the private gate //Check if the player can use the private gate
if (portal.getOptions().isPrivate() && !PermissionHelper.canUsePrivatePortal(player, portal)) { if (portal.getOptions().isPrivate() && !PermissionHelper.canUsePrivatePortal(player, portal)) {
if (!portal.getOptions().isSilent()) { if (!portal.getOptions().isQuiet()) {
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.ACCESS_DENIED)); Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.ACCESS_DENIED));
} }
return true; return true;
@@ -90,7 +90,7 @@ public final class PermissionHelper {
//Destination is currently in use by another player, blocking teleportation //Destination is currently in use by another player, blocking teleportation
if (destination.isOpen() && !destination.getOptions().isAlwaysOn()) { if (destination.isOpen() && !destination.getOptions().isAlwaysOn()) {
if (!portal.getOptions().isSilent()) { if (!portal.getOptions().isQuiet()) {
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.DESTINATION_BLOCKED)); Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.DESTINATION_BLOCKED));
} }
return true; return true;
@@ -414,7 +414,7 @@ public final class PermissionHelper {
//Not open for this player //Not open for this player
if (!entrancePortal.getPortalOpener().isOpenFor(player)) { if (!entrancePortal.getPortalOpener().isOpenFor(player)) {
if (!entrancePortal.getOptions().isSilent()) { if (!entrancePortal.getOptions().isQuiet()) {
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.ACCESS_DENIED)); Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.ACCESS_DENIED));
} }
new PlayerTeleporter(entrancePortal, player).teleportPlayer(entrancePortal, event); new PlayerTeleporter(entrancePortal, player).teleportPlayer(entrancePortal, event);
@@ -429,7 +429,7 @@ public final class PermissionHelper {
//Player cannot access portal //Player cannot access portal
if (PermissionHelper.cannotAccessPortal(player, entrancePortal, destination)) { if (PermissionHelper.cannotAccessPortal(player, entrancePortal, destination)) {
if (!entrancePortal.getOptions().isSilent()) { if (!entrancePortal.getOptions().isQuiet()) {
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.ACCESS_DENIED)); Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.ACCESS_DENIED));
} }
new PlayerTeleporter(entrancePortal, player).teleportPlayer(entrancePortal, event); new PlayerTeleporter(entrancePortal, player).teleportPlayer(entrancePortal, event);

View File

@@ -138,7 +138,7 @@ public final class PortalFileHelper {
builder.append(options.isNoNetwork()).append(':'); builder.append(options.isNoNetwork()).append(':');
builder.append(options.isRandom()).append(':'); builder.append(options.isRandom()).append(':');
builder.append(options.isBungee()).append(':'); builder.append(options.isBungee()).append(':');
builder.append(options.isSilent()).append(':'); builder.append(options.isQuiet()).append(':');
builder.append(options.hasNoSign()); builder.append(options.hasNoSign());
} }

View File

@@ -229,7 +229,7 @@ public final class TeleportHelper {
@NotNull Portal destinationPortal) { @NotNull Portal destinationPortal) {
//Make sure the user can access the portal //Make sure the user can access the portal
if (PermissionHelper.cannotAccessPortal(player, entrancePortal, destinationPortal)) { if (PermissionHelper.cannotAccessPortal(player, entrancePortal, destinationPortal)) {
if (!entrancePortal.getOptions().isSilent()) { if (!entrancePortal.getOptions().isQuiet()) {
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.ACCESS_DENIED)); Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.ACCESS_DENIED));
} }
entrancePortal.getPortalOpener().closePortal(false); entrancePortal.getPortalOpener().closePortal(false);
@@ -240,7 +240,7 @@ public final class TeleportHelper {
int cost = EconomyHelper.getUseCost(player, entrancePortal, destinationPortal); int cost = EconomyHelper.getUseCost(player, entrancePortal, destinationPortal);
boolean canAffordFee = cost <= 0 || Stargate.getEconomyConfig().canAffordFee(player, cost); boolean canAffordFee = cost <= 0 || Stargate.getEconomyConfig().canAffordFee(player, cost);
if (!canAffordFee) { if (!canAffordFee) {
if (!entrancePortal.getOptions().isSilent()) { if (!entrancePortal.getOptions().isQuiet()) {
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.ECONOMY_INSUFFICIENT)); Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString(Message.ECONOMY_INSUFFICIENT));
} }
return false; return false;

View File

@@ -40,16 +40,28 @@ dynmap:
# Should StarGate icons be hidden by default? (must users manually enable their checkbox?) # Should StarGate icons be hidden by default? (must users manually enable their checkbox?)
dynmapIconsHiddenByDefault: true dynmapIconsHiddenByDefault: true
# +----------------------------------------------------------------------------------------------+ #
# | Gate Behaviour | #
# +----------------------------------------------------------------------------------------------+ #
gates: gates:
# What is the maximum number of gates a single network may contain? (0 for unlimited)
maxGatesEachNetwork: 0
# What network will be used when none has been specified? (Max length 12 characters)
#
# Note that this primarily applies to users with the stargate.create.network node.
# Generally, that node is given to staff (we recommend stargate.create.personal for users).
defaultGateNetwork: central
# At what speed should players be sent out of portals?
# When exiting a gate, players retain their original movement velocity, multiplied by this value.
exitVelocity: 0.1
functionality: functionality:
# Should an alternative (and less effective) teleportation script be used to teleport vehicles? # Should an alternative (and less effective) teleportation script be used to teleport vehicles?
# This will fix an incompatibility with CraftBook, but will cause vehicles' data to be wiped on teleportation. # This will fix an incompatibility with CraftBook, but will cause vehicles' data to be wiped on teleportation.
enableCraftBookRemoveOnEjectFix: false enableCraftBookRemoveOnEjectFix: false
# +----------------------------------------------------------------------------------------------+ #
# | Gate Behaviour | #
# +----------------------------------------------------------------------------------------------+ #
# Are you connected to a BungeeCord-compatible proxy? # Are you connected to a BungeeCord-compatible proxy?
# Set this value to true if you intend on building gates with the bUngee flag. # Set this value to true if you intend on building gates with the bUngee flag.
enableBungee: false enableBungee: false
@@ -72,19 +84,6 @@ gates:
# Should StarGate also handle creatures attached to a player via a lead? # Should StarGate also handle creatures attached to a player via a lead?
handleLeashedCreatures: true handleLeashedCreatures: true
# What is the maximum number of gates a single network may contain? (0 for unlimited)
maxGatesEachNetwork: 0
# What network will be used when none has been specified? (Max length 12 characters)
#
# Note that this primarily applies to users with the stargate.create.network node.
# Generally, that node is given to staff (we recommend stargate.create.personal for users).
defaultGateNetwork: central
# At what speed should players be sent out of portals?
# When exiting a gate, players retain their original movement velocity, multiplied by this value.
exitVelocity: 0.1
integrity: integrity:
# Can StarGates be broken via an explosion? # Can StarGates be broken via an explosion?
@@ -144,6 +143,8 @@ gates:
- 'WARPED:inverted,inverted' - 'WARPED:inverted,inverted'
- 'BAMBOO:default,default' - 'BAMBOO:default,default'
- 'CHERRY:default,default' - 'CHERRY:default,default'
- 'PALE_OAK:default,default'
- 'MANGROVE:default,default'
economy: economy:
# When scrolling through a networked portal's destination list, should SG color free gates? # When scrolling through a networked portal's destination list, should SG color free gates?
@@ -151,7 +152,7 @@ economy:
# If freeGatesColored is true, which color should SG use? # If freeGatesColored is true, which color should SG use?
# #
# All color names should follow this format: # All color names should be a hex RGB color (#ffffff) or follow this format:
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/ChatColor.html # https://hub.spigotmc.org/javadocs/spigot/org/bukkit/ChatColor.html
freeGatesColor: DARK_GREEN freeGatesColor: DARK_GREEN

View File

@@ -30,7 +30,7 @@ permissions:
default: false default: false
stargate.use: stargate.use:
description: Allow use of all stargates linking to any world in any network description: Allow use of all stargates linking to any world in any network
default: true default: false
children: children:
stargate.world: true stargate.world: true
stargate.network: true stargate.network: true
@@ -43,7 +43,7 @@ permissions:
default: false default: false
stargate.create: stargate.create:
description: Allow creating stargates on any network using any gate type description: Allow creating stargates on any network using any gate type
default: op default: false
children: children:
stargate.create.personal: true stargate.create.personal: true
stargate.create.network: true stargate.create.network: true
@@ -59,7 +59,7 @@ permissions:
default: false default: false
stargate.destroy: stargate.destroy:
description: Allows the destruction of all stargates description: Allows the destruction of all stargates
default: op default: false
children: children:
stargate.destroy.network: true stargate.destroy.network: true
stargate.destroy.personal: true stargate.destroy.personal: true
@@ -71,7 +71,7 @@ permissions:
default: false default: false
stargate.free: stargate.free:
description: Allow free use/creation/destruction of stargates description: Allow free use/creation/destruction of stargates
default: op default: false
children: children:
stargate.free.use: true stargate.free.use: true
stargate.free.create: true stargate.free.create: true
@@ -87,7 +87,7 @@ permissions:
default: false default: false
stargate.option: stargate.option:
description: Allows use of all options description: Allows use of all options
default: op default: false
children: children:
stargate.option.hidden: true stargate.option.hidden: true
stargate.option.alwayson: true stargate.option.alwayson: true
@@ -97,7 +97,7 @@ permissions:
stargate.option.show: true stargate.option.show: true
stargate.option.nonetwork: true stargate.option.nonetwork: true
stargate.option.random: true stargate.option.random: true
stargate.option.silent: true stargate.option.quiet: true
stargate.option.nosign: true stargate.option.nosign: true
stargate.option.hidden: stargate.option.hidden:
description: Allows the creation of a hidden stargate description: Allows the creation of a hidden stargate
@@ -123,7 +123,7 @@ permissions:
stargate.option.random: stargate.option.random:
description: Allows the creation of a stargate with a random destination description: Allows the creation of a stargate with a random destination
default: false default: false
stargate.option.silent: stargate.option.quiet:
description: Allows the creation of a stargate which does not output anything to the chat description: Allows the creation of a stargate which does not output anything to the chat
default: false default: false
stargate.option.nosign: stargate.option.nosign:
@@ -149,7 +149,7 @@ permissions:
default: false default: false
stargate.admin: stargate.admin:
description: Allow all admin features and commands (Hidden/Private bypass, BungeeCord, Reload, Config) description: Allow all admin features and commands (Hidden/Private bypass, BungeeCord, Reload, Config)
default: op default: false
children: children:
stargate.admin.reload: true stargate.admin.reload: true
stargate.admin.hidden: true stargate.admin.hidden: true
@@ -157,3 +157,27 @@ permissions:
stargate.admin.bungee: true stargate.admin.bungee: true
stargate.admin.config: true stargate.admin.config: true
stargate.admin.dye: true stargate.admin.dye: true
stargate.group.admin:
description: Allow everything except stargate.free
default: op
children:
stargate.admin: true
stargate.server: true
stargate.group.builder: true
stargate.group.builder:
description: Allows unrestricted building and destruction of Stargates with any option
default: false
children:
stargate.group.player: true
stargate.option: true
stargate.network: true
stargate.create: true
stargate.destroy: true
stargate.group.player:
description: Gives normal players limited use of Stargates
default: true
children:
stargate.use: true
stargate.create.gate.nethergate: true
stargate.create.personal: true
stargate.destroy.personal: true