Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c524b227a | ||
|
|
35deabf5a3 | ||
|
|
694cbb729f | ||
|
|
57047c519e | ||
|
|
fc8018c530 | ||
|
|
73707e2c3a | ||
|
|
ac92851e3d | ||
|
|
4e29a98a32 | ||
|
|
54d1c90795 | ||
|
|
6780914550 | ||
|
|
5ab5d11aed | ||
|
|
94378ca1fa | ||
|
|
4c0c425ba0 | ||
|
|
efea58e665 | ||
|
|
e15a7dd0ed | ||
|
|
2f327b9ce9 | ||
|
|
38d0f9de6d | ||
|
|
75f7330cc3 | ||
|
|
25bf7a3747 | ||
|
|
f8f0a23ede | ||
|
|
b4d7ed59de | ||
|
|
f64d07c1e8 | ||
|
|
4dc31a4635 | ||
|
|
cb243e1c04 | ||
|
|
bb5bdfe0c7 | ||
|
|
be144df5de | ||
|
|
a6f68810fc | ||
|
|
3ac01c9f1b | ||
|
|
c9d496e251 | ||
|
|
be31fdeb0a | ||
|
|
1ced445742 | ||
|
|
e52fffbe75 | ||
|
|
25b4cfe3f2 | ||
|
|
bc8453a96e | ||
|
|
0379b0c62c | ||
|
|
cdf34b76b8 | ||
|
|
d3cc9eb989 | ||
|
|
3048483b0c | ||
|
|
f16a5800e5 | ||
|
|
672f1f0ff3 | ||
|
|
a3ddfbefe3 | ||
|
|
e548a9a94b | ||
|
|
80d3069ffb | ||
|
|
fad9824e4d | ||
|
|
2bb7e3023d | ||
|
|
105f76d8f4 | ||
|
|
8e7874b691 | ||
|
|
710a69543a | ||
|
|
8b180342d0 | ||
|
|
1a62c596cb | ||
|
|
2b8e2c90c3 | ||
|
|
dcb9c97d0a | ||
|
|
74ed8783a8 | ||
|
|
0d07e6aed3 | ||
|
|
49fa7a6ff7 | ||
|
|
f40df14d03 | ||
|
|
6bc63e3fde | ||
|
|
c0b6e8ff40 | ||
|
|
0a4a1ce0cf | ||
|
|
35fd75aebb | ||
|
|
59e8dc057a | ||
|
|
91cd767dd7 | ||
|
|
57ca1ff88c | ||
|
|
15dd00fdcc | ||
|
|
10b14de218 | ||
|
|
66899564e8 | ||
|
|
6e8d8319f7 | ||
|
|
3ad8be9d3e | ||
|
|
b7c175060d | ||
|
|
ba6043e654 | ||
|
|
4bfd3339a2 | ||
|
|
c03d8d45e0 | ||
|
|
b150db8047 | ||
|
|
197ff4f813 | ||
|
|
fc6a5f8747 | ||
|
|
a4a37b39e5 | ||
|
|
b057b88e26 | ||
|
|
2dd383a640 | ||
|
|
d6526ae64e | ||
|
|
8be8b831ba | ||
|
|
ff1ded1fda | ||
|
|
bcc77cf3e0 | ||
|
|
4213d0824f | ||
|
|
729722259a | ||
|
|
6c408d823a | ||
|
|
9b7ec9d8bf | ||
|
|
3cce54a62d | ||
|
|
40119254a7 | ||
|
|
4b33e69d11 | ||
|
|
90d08d651e | ||
|
|
11b73a05c8 | ||
|
|
b68c8dd0d8 | ||
|
|
8933caa51f | ||
|
|
e82b1f760a | ||
|
|
dc97079967 | ||
|
|
2e44decaa9 | ||
|
|
244f7efe21 | ||
|
|
d299db678d | ||
|
|
0e558af1f1 | ||
|
|
a6cd5978e3 | ||
|
|
24c893bb1d | ||
|
|
8a80446c8c | ||
|
|
a88cc02f9a | ||
|
|
df442063ea | ||
|
|
40c49ba3ee | ||
|
|
9135f817d1 | ||
|
|
07fc9894b1 | ||
|
|
930612b5bb | ||
|
|
29a87c831a | ||
|
|
722340140a | ||
|
|
96d4834f83 | ||
|
|
308b42948a | ||
|
|
8e304bb09d | ||
|
|
7f2c23e69e | ||
|
|
1d68c4fee0 | ||
|
|
3d808ea718 | ||
|
|
79f1933b9a | ||
|
|
4089e75f2d | ||
|
|
a2d4e12ca6 | ||
|
|
72e5d596fc | ||
|
|
4f2dea5036 | ||
|
|
915dc25284 | ||
|
|
13e4468e93 | ||
|
|
ca23f0d546 | ||
|
|
53c450170a | ||
|
|
348521cc3e | ||
|
|
f4ce887d24 | ||
|
|
5e176dc10e | ||
|
|
00cd9a8bb1 | ||
|
|
0166aeadb2 | ||
|
|
864c22c3ed | ||
|
|
910b88d663 | ||
|
|
4a56c28a0d | ||
|
|
1c13465bf4 | ||
|
|
f4d46f03aa | ||
|
|
5b3e3ef179 | ||
|
|
392b12e592 | ||
|
|
e99f7772e6 | ||
|
|
54d20e9e50 | ||
|
|
fd0e361474 | ||
|
|
551e38f882 | ||
|
|
d18f04c010 | ||
|
|
3b7f3043f1 | ||
|
|
faf2a8d083 | ||
|
|
42071e3bad | ||
|
|
978d32e947 | ||
|
|
fe670cb3e2 | ||
|
|
d2f4a7d9a5 | ||
|
|
b162ce1825 | ||
|
|
fbdcce3c3b | ||
|
|
2d939f095c | ||
|
|
034e2f2b98 | ||
|
|
f429ab0a60 | ||
|
|
5578d0879b | ||
|
|
8b1e6244ea | ||
|
|
49c7b9c775 | ||
|
|
da1c724464 | ||
|
|
de15150a04 | ||
|
|
0d1fb2b260 | ||
|
|
55d0779a33 | ||
|
|
8f41d464e1 | ||
|
|
1db2b6c934 | ||
|
|
aa58f76057 | ||
|
|
1def0a1061 | ||
|
|
3b4a66b04e | ||
|
|
7384b2e55c | ||
|
|
f8eaed445a | ||
|
|
dfef9190ca | ||
|
|
7ce61834c2 | ||
|
|
240a7ab242 | ||
|
|
b3de59bfba | ||
|
|
5d5de39845 | ||
|
|
59af774d09 | ||
|
|
18828207c0 | ||
|
|
5c67922996 | ||
|
|
af50a45e65 | ||
|
|
7ccd265a30 | ||
|
|
e76f22f071 | ||
|
|
3c03b719d2 | ||
|
|
cd71531766 | ||
|
|
282c116d02 | ||
|
|
820171916b | ||
|
|
136fbb0ba8 | ||
|
|
4f0c05c357 | ||
|
|
0377838a26 | ||
|
|
b72ff1b772 | ||
|
|
287488f1b6 | ||
|
|
9ffb67db1f | ||
|
|
a563c0a8a8 | ||
|
|
234086444f | ||
|
|
a93b0834a2 | ||
|
|
b5550dfe82 | ||
|
|
d99300ecac | ||
|
|
1c0688a172 | ||
|
|
ff3b117189 | ||
|
|
aaed1b32cd | ||
|
|
38c8e1d2c3 | ||
|
|
1e1792d132 | ||
|
|
b29462a5cb | ||
|
|
c9161ebe24 | ||
|
|
8441c6a8bf | ||
|
|
72c2ba77ee | ||
|
|
a097790b76 | ||
|
|
b7129e8aa8 | ||
|
|
ab9c2b8be1 | ||
|
|
a9a37b8fc8 | ||
|
|
d50cb67a26 | ||
|
|
5e42500308 | ||
|
|
50997a847f | ||
|
|
2305d85c01 | ||
|
|
33bbc35d88 | ||
|
|
28b3e100fb | ||
|
|
edae2d699b | ||
|
|
0cc477a769 | ||
|
|
53b84a999f | ||
|
|
49487c11ff | ||
|
|
0c4070b7a7 | ||
|
|
67909a4862 | ||
|
|
28ee563083 | ||
|
|
28b2b528c1 | ||
|
|
a53d9d0850 | ||
|
|
873a8812aa | ||
|
|
19ebc90963 | ||
|
|
dfbd1381de | ||
|
|
c9fe48a067 | ||
|
|
49b022b665 | ||
|
|
86be23ae5f | ||
|
|
420412978e | ||
|
|
25e2f4dae2 | ||
|
|
d767be96b5 | ||
|
|
6d73acca9b | ||
|
|
1f116374ad | ||
|
|
d0b7d96208 | ||
|
|
16285d7064 | ||
|
|
1f27084fe1 | ||
|
|
261aace0db | ||
|
|
344b910214 | ||
|
|
fbaa4896e1 | ||
|
|
2f93064f60 | ||
|
|
65b47c5e07 | ||
|
|
d70d01f2d3 | ||
|
|
769d7d3bcd | ||
|
|
a5f47688e0 | ||
|
|
7d2e6a25a4 | ||
|
|
69999b3b7a | ||
|
|
94d1bd4eb9 | ||
|
|
c18e8b7ab7 | ||
|
|
9f45187300 | ||
|
|
0c6ba8a9b7 | ||
|
|
1af69f2e8b | ||
|
|
a3b836b1c5 | ||
|
|
1eca6c81ad | ||
|
|
b9b4a78b5c | ||
|
|
fda23c5539 | ||
|
|
8297321971 | ||
|
|
cfeaf00f26 | ||
|
|
5ee1b32249 | ||
|
|
b69f0dc90e | ||
|
|
fe6cae4e47 | ||
|
|
b494b5c23c | ||
|
|
3bd3395128 | ||
|
|
3e3f63220d | ||
|
|
ccba0f042f | ||
|
|
abdd89259d | ||
|
|
256f203c48 | ||
|
|
205412b02c | ||
|
|
990289feb2 | ||
|
|
44b1ff1a1f | ||
|
|
f9e11bb9e5 | ||
|
|
eef1584b1c | ||
|
|
937dd84d1c | ||
|
|
80b9fe280b | ||
|
|
3892892792 | ||
|
|
519551e76c | ||
|
|
b30476ae3f | ||
|
|
9d417a12f1 | ||
|
|
fd5406b95d | ||
|
|
0ef59e557d | ||
|
|
15ed1db347 | ||
|
|
429d5b90d4 | ||
|
|
b3ab931aca | ||
|
|
21b42d0c72 | ||
|
|
7b1e1a27ba | ||
|
|
fb7b1e791f | ||
|
|
eecd59b387 | ||
|
|
ff7d8e0293 | ||
|
|
19c6d77a2c | ||
|
|
e002aa34e9 | ||
|
|
865e53a4a8 | ||
|
|
b8c652b7fb | ||
|
|
c4080f82dc | ||
|
|
1a33497e8f | ||
|
|
f8353b8eda | ||
|
|
4980ad54ec | ||
|
|
5363305411 | ||
|
|
6ff47619ad | ||
|
|
69315a3f74 | ||
|
|
8b1ddba672 | ||
|
|
bf63f0e209 | ||
|
|
450c923d24 | ||
|
|
9a922a6df5 | ||
|
|
08a5a9a021 | ||
|
|
61ad7d8533 | ||
|
|
52d2b3c096 | ||
|
|
b0a69cc048 | ||
|
|
74e445a62e | ||
|
|
91219202b2 | ||
|
|
a3545c83a0 | ||
|
|
31baf91e8f | ||
|
|
214cd53751 | ||
|
|
2be16882c7 | ||
|
|
75e2264b44 | ||
|
|
fd7a0eb6a5 | ||
|
|
177115f144 | ||
|
|
edbe31dc9c | ||
|
|
21a2f9ef2f |
No files matched your search
@@ -1 +0,0 @@
|
||||
.gitea/CODEOWNERS linguist-detectable=false
|
||||
@@ -1,3 +0,0 @@
|
||||
# Pull requests request review from the eligible staff team(s).
|
||||
# One approval from either an Admin or Developer satisfies branch protection.
|
||||
* @trueog/Admins @trueog/Developers
|
||||
@@ -1,187 +1,6 @@
|
||||
# Maintenance Changelog
|
||||
This file contains update logs for this project. The top may contain a `Unreleased` section, gathering update logs for a future update during development.
|
||||
|
||||
---
|
||||
## 4.3.0 - September 17th 2024
|
||||
### Changed
|
||||
* Added alternative player count and player list hover message for when endtimers are running, similar to the existing ping messages setting. They are disabled by default and can be found in their `player-count-message` and `player-list-hover-message` config sections
|
||||
* All timer commands now accept durations like `2h30m`, `1h30m5s`, or `90s`. The default behavior without units will still be in minutes
|
||||
* The language defaults will *not* automatically update the command help messages
|
||||
* Slightly reorganized the configuration file (it will be automatically migrated on startup, but new sections will be slapped at the bottom of the file)
|
||||
* The `fallback` field now also accepts null values next to an empty array for disabling the feature
|
||||
* Updated language files from [Crowdin](https://crowdin.com/translate/maintenance)
|
||||
|
||||
### Fixed
|
||||
* Fixed the `/maintenance dump` command
|
||||
* Fixed the original player sample not being cleared in Velocity
|
||||
* Velocity: Fixed the console getting broadcasts twice
|
||||
* Velocity: Don't log legacy color codes to the console
|
||||
* Paper: Fixed the player count messages on Paper 1.21
|
||||
---
|
||||
## 4.2.1 - May 17th 2024
|
||||
### Changed
|
||||
* The proxied maintenance status is now also shown for forced hosts (thanks to alec-jensen)
|
||||
* Offline player fetching improvements (thanks to EpicPlayerA10)
|
||||
* Added the setting `fallback-to-offline-uuid` to use offline player uuids in maintenance whitelist commands (defaults to false)
|
||||
* Maintenance now skips the plugin remapping process on 1.20.5+ Paper servers
|
||||
* Small optimizations
|
||||
* Updated language files from [Crowdin](https://crowdin.com/translate/maintenance)
|
||||
* Massive thank you to all the contributors! These include: vortix22, xdalul, CodeZhangBorui, jesusskye, Doc94,
|
||||
Texider_, marvin2k0, leonard.bausenwein, pro.timeo.kerjean, meviper, troev5, Murka124, jhqwqmc, Pryzinho,
|
||||
raysetratyboy, Kolja07, and rikunightcore
|
||||
---
|
||||
## 4.2.0 - September 17th 2023
|
||||
### Changed
|
||||
* Velocity/Bungee: Added `commands-on-single-maintenance-enable` and `commands-on-single-maintenance-disable` config options to define commands to be executed after maintenance has been toggled on a proxied server
|
||||
* Commands inside the `all` list will be executed for any proxied server, but you can also define commands for specific servers by adding arrays with the server names as keys
|
||||
* You can use the placeholder `%SERVER%` in commands to be replaced with the server name
|
||||
* Start-, end-, and schedule timers for proxied servers now also include the server in the feedback message
|
||||
* Updated language files from [Crowdin](https://crowdin.com/translate/maintenance) (including new language files for Danish, Japanese, Korean, and Hungarian)
|
||||
---
|
||||
## 4.1.0 - April 17th 2023
|
||||
### Changed
|
||||
* Added config option `enable-playercounthovermessage` to be able to toggle the player count hover message
|
||||
* Removed platform specific command aliases (e.g. `maintenancevelocity`)
|
||||
* Translations
|
||||
* Moved translation editing to [Crowdin](https://crowdin.com/translate/maintenance)
|
||||
* Added Turkish translation file (thanks to Proomp)
|
||||
* Added Swedish translation file (thanks to Sup33r)
|
||||
* Added Ukrainian translation file (thanks to Mrlucke)
|
||||
* Added Japanese translation file (thanks to yu-solt)
|
||||
* Added bStats metrics to Velocity and Sponge modules
|
||||
|
||||
### Fixed
|
||||
* Fixed disabling the `enable-pingmessages` setting not working on Paper servers
|
||||
* Fixed variable replacement in messages with gradients
|
||||
* Fixed the message for cancelling proxied server timers not replacing the server argument
|
||||
* Setting `enable-pingmessages` to `false` no longer disables custom player and player hover messages
|
||||
---
|
||||
## 4.0.1 - April 17th 2022
|
||||
### Fixed
|
||||
* Fixed the config header sometimes breaking the config on upgrading/saving
|
||||
---
|
||||
## 4.0.0 - March 17th 2022
|
||||
### Changed
|
||||
* Added support for hex colors in messages and replaced the component parsing with adventure-minimessage
|
||||
* This means that section symbols (`§`) are no longer the intended/supported format
|
||||
* You can use the following page to edit and preview formatted text: https://webui.adventure.kyori.net/
|
||||
* You can find full documentation on the format (including normal colors and formatting, rgb, click/hover events, and more) here: https://docs.adventure.kyori.net/minimessage/format
|
||||
* Your config and language file will be updated to the new format automatically, you won't have to change anything manually!
|
||||
* Note that the player count and player count hover messages do not support rgb colors
|
||||
* Updated Sponge module to SpongeAPI v8 (Minecraft 1.15+)
|
||||
* Changed `%NEWLINE%` replacement to `<br>`
|
||||
* Changed `enable-timerspecific-messages` to default to `true` in newly generated config files
|
||||
* Added `prefix` entry in language file to use the placeholder `<prefix>` instead of copy-pasting the actual prefix every time
|
||||
* Added `singleServerMaintenanceListEntry` language string
|
||||
* Added Polish translations (thanks to Slasherss1)
|
||||
* Updated French translations (thanks to Aurelien30000)
|
||||
* Updated Spanish translations (thanks to Jaximo)
|
||||
* If you were using the MaintenanceAddon, you need to update it to [version 1.2.0](https://github.com/kennytv/MaintenanceAddon/releases/tag/1.2.0)
|
||||
### Fixed
|
||||
* Fixed missing language key warning for the scheduletimer command
|
||||
* Fixed typo in `singleServerMaintenanceListEmpty` default language string
|
||||
* Fixed typo in language key `whitelistEmpty` in the German language file (by Ceddix)
|
||||
---
|
||||
## 3.0.7 - August 17th 2021
|
||||
### Changed
|
||||
* Bungee/Velocity: `/maintenance add <name>` now works for offline players as well
|
||||
* Added config options `commands-on-maintenance-enable` and `commands-on-maintenance-disable` to define commands to be executed after maintenance has been toggled
|
||||
* Added config option `enable-pingmessages` to can change whether a custom maintenance motd should be displayed during maintenance
|
||||
* Added language fields `scheduletimerBroadcast` and `singleScheduletimerBroadcast` with the variables `%SERVER%`, `%TIME%`, and `%DURATION%` instead of using the normal starttimer broadcasts
|
||||
### Fixed
|
||||
* Fixed SQL loading issues on some platforms
|
||||
* Fixed missing language key warning for the debug command
|
||||
* Velocity: Fixed the update message
|
||||
---
|
||||
## 3.0.6 - February 17th 2021
|
||||
### Changed
|
||||
* Updated the Velocity version to be compatible with Velocity 1.1.0 (use Maintenance 3.0.5 if you use an older version of Velocity)
|
||||
* Added `maintenance schedule <minutes> <duration> command`
|
||||
* This starts a timer for maintenance to be enabled, after which another timer will be started to disable it again (in contrast to `starttimer` and `endtimer`, which each only do one of)
|
||||
* On proxies, you can use `maintenance schedule [server] <minutes> <duration> command` to schedule maintenance on a proxied server
|
||||
* Added command alias `mt` for the Maintenance command
|
||||
* Added secret argument to the whitelist add command: You can use `maintenance add <uuid> <name>` to add offline entries per command
|
||||
* The maintenance's base command is now properly registered with a permission on each platform, so that it is excluded from tabcomplection to unauthorized players
|
||||
* Some improvements to the French language file (thanks to @Aurelien30000)
|
||||
* API addition: Added MaintenanceReloadedEvent
|
||||
* If you are using the MaintenancePlaceholderAddon, you need to [update it to 1.1.0](https://github.com/KennyTV/MaintenanceAddon/releases)
|
||||
### Fixed
|
||||
* Fixed not setting custom singleserver kickmessages throwing warnings
|
||||
* Bungee: Fixed linebreaks in the playercount hovermessage for 1.16+ clients
|
||||
---
|
||||
## 3.0.5 - June 17th 2020
|
||||
### Changed
|
||||
* The plugin identifiers are now `Maintenance` instead of the previous `MaintenanceSpigot` and `MaintenanceBungee`,
|
||||
and `maintenance` instead of `maintenancesponge` and `maintenancevelocity`
|
||||
* The plugin directory will automatically be renamed accordingly when starting the server
|
||||
* If you are using the MaintenancePlaceholderAddon, you need to [update it to 1.0.3](https://github.com/KennyTV/MaintenanceAddon/releases)
|
||||
* Bungee/Velocity: The `fallback` field can now also be set as a list to define multiple fallback servers
|
||||
* Bungee/Velocity: Added language fields to choose custom kickmessages for individual proxied servers
|
||||
* See [**HERE**](https://github.com/KennyTV/Maintenance/wiki/Configuration#language-file) for an example setting
|
||||
* Added Chinese language file (thanks to Spigot user yeban)
|
||||
* Added Italian language file
|
||||
* Updated Russian language file (thanks to Spigot user En_0t_S)
|
||||
* Removed automated config migration from 2.x->3.0
|
||||
* See [**HERE**](https://github.com/KennyTV/Maintenance/wiki/Updates#updating-from-2x) on how to do that manually - virtually noone should be using such old versions anymore
|
||||
### Fixed
|
||||
* Fixed the `use-ssl` option being inverted
|
||||
* Fixed disabling the playercount-message still hiding online/max players
|
||||
* Fixed config parsing with multi line strings
|
||||
* Bungee: Fixed compatibility with other motd changing plugins using the 'HIGHEST' ping listener priority
|
||||
---
|
||||
## 3.0.4 - March 17th 2020
|
||||
### Changed
|
||||
* Bungee/Velocity: Added config option `waiting-server` to send players to a waiting server when global maintenance is enabled (instead of kicking them)
|
||||
* Bungee/Velocity: Added config option `use-ssl` in the `mysql` section to disable SSL connections
|
||||
* Added Russian language file (thanks to Spigot user En_0t_S)
|
||||
* Updated missing translations in Portuguese language file (thanks to Spigot user JoaoPinto)
|
||||
* Updated bStats metrics
|
||||
### Fixed
|
||||
* Fixed singleserver timers using input as seconds instead of minutes (by mxs42)
|
||||
* Fixed singleserver timers broadcasting globally
|
||||
* Fixed language updating with an unknown/self-translated language file
|
||||
* Fixed Velocity server autocompletion in the maintenance command
|
||||
---
|
||||
## 3.0.3 - September 17th 2019
|
||||
### Changed
|
||||
* Bungee/Velocity: Added `maintenance.singleserver.bypass.<server>` permission to give individual bypasses for proxied servers (`maintenance.bypass` will still bypass everything as the super-perm)
|
||||
* Added the messages of the help command into the language files
|
||||
* Added config option `kick-online-players` to disable the kicks when maintenance is enabled (new connections will still be blocked)... not sure why you'd want that, but you can :p
|
||||
* The language file will now be automatically updated as well, so no need to delete and recreate it anymore, yay!
|
||||
* Updated missing and new translations in French language file (thanks to Spigot user Zendrique)
|
||||
* Updated missing and new translations in Spanish language file (thanks to Spigot user Vixo_Ulises)
|
||||
### Fixed
|
||||
* Bungee/Velocity: Fixed the join-notifications being sent twice if both global and server maintenance are enabled, as well as when just a server has maintenance in some cases
|
||||
* Bungee: Fixed players being kicked *after* the initial connection and thus triggering a join and leave message before being kicked
|
||||
* Bungee: Fixed the kickmessage not being displayed in some cases
|
||||
* Paper: Fixed the playercount message not being displayed on Paper servers with ViaVersion
|
||||
* Paper: Fixed the motd not being changed at all on Paper servers with ProtocolSupport (-> ProtocolLib listener used, since ProtocolSupport does not fire Paper's ping event)
|
||||
* Fixed the config autoupdater when the config contained strings broken over multiple lines
|
||||
---
|
||||
## 3.0.2 - May 17th 2019
|
||||
### Changed
|
||||
* Added config option `timerspecific-pingmessages` to have specific pingmessages shown when endtimers are run
|
||||
* You can also set them ingame by using `/maintenance setmotd timer <index> ...` instead of `/maintenance setmotd <index> ...`, along with `/maintenance removemotd timer <index>` and `/maintenance motd timer`
|
||||
* Made dumps a little prettier
|
||||
* Support Sponge 8.0.0-SNAPSHOT
|
||||
* Support latest text/Velocity (now only supports Velocity builds from May 7th upwards)
|
||||
---
|
||||
## 3.0.1 - April 17th 2019
|
||||
### Changed
|
||||
* Created an addon to have PlaceholderAPI placeholders on Spigot when running the Maintenance plugin on Bungee (see [**here**](https://github.com/KennyTV/Maintenance/wiki/MaintenanceAddon))
|
||||
* Spigot version: If running on Paper 1.12.2 or higher, ProtocolLib will not be needed anymore
|
||||
* The universal jar now only includes Bungee and Spigot (whereas before Sponge and Velocity as well) and has been further minimized in size
|
||||
* To use the plugin on the other platforms, use the `MaintenanceSponge.jar` or `MaintenanceVelocity.jar` respectively
|
||||
* Added config option `continue-endtimer-after-restart` to have endtimers continued, even if the server restarts during its runtime
|
||||
* Added custom eventsystem to the API
|
||||
* Removed bStats metrics from Sponge module
|
||||
### Fixed
|
||||
* Actually fixed compatibility to other plugins using the same MySQL library (such as LuckPerms) in the Bungee version
|
||||
* Fixed an issue with executing the maintenance change with MySQL enabled on connected proxies
|
||||
* Fixed an occasional error on pings of non clients in the Spigot version
|
||||
* Fixed 1.13 clients on sub 1.13 servers not showing the playercountmessage in the Spigot version
|
||||
* Minor fixes/changes to Spanish and Portuguese language files
|
||||
---
|
||||
## 3.0 - February 17th 2019
|
||||
### Changed
|
||||
* This plugin now also supports the platforms Sponge and Velocity!
|
||||
|
||||
@@ -8,7 +8,7 @@ about: Report a bug to have it fixed
|
||||
**How does the problem occur/what are the steps to reproduce it?**
|
||||
|
||||
## Error
|
||||
**Is there an error? Save it via https://mclo.gs/ and link paste the link.**
|
||||
**Is there an error? Save it via https://pastebin.com/ and link paste the link.**
|
||||
|
||||
## Server information
|
||||
**Type '/maintenance dump' and paste the given link here**
|
||||
@@ -1,26 +0,0 @@
|
||||
name: Build
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: gradle/actions/wrapper-validation@v3
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Maintenance Files
|
||||
path: build/libs
|
||||
+3
-6
@@ -1,8 +1,6 @@
|
||||
.metadata
|
||||
build/
|
||||
.gradle
|
||||
dependencies/
|
||||
bin/
|
||||
run/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
@@ -16,6 +14,7 @@ local.properties
|
||||
.externalToolBuilders/
|
||||
*.launch
|
||||
*.pydevproject
|
||||
*.jar
|
||||
.cproject
|
||||
.classpath
|
||||
.factorypath
|
||||
@@ -93,6 +92,4 @@ $RECYCLE.BIN/
|
||||
*.msm
|
||||
*.msp
|
||||
*.lnk
|
||||
!MaintenanceAPI.jar
|
||||
**/src/test/resources/
|
||||
!core/src/test/resources/dirty-config.yml
|
||||
!MaintenanceAPI.jar
|
||||
@@ -0,0 +1,7 @@
|
||||
language: java
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- '$HOME/.m2'
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
Binary file not shown.
@@ -1,10 +1,9 @@
|
||||
# Maintenance
|
||||
[](https://github.com/kennytv/Maintenance/releases)
|
||||

|
||||
[](https://crowdin.com/project/maintenance)
|
||||
[](https://discord.gg/vGCUzHq)
|
||||
[](https://github.com/KennyTV/Maintenance/releases)
|
||||
[](https://travis-ci.org/KennyTV/Maintenance)
|
||||
[](https://discord.gg/vGCUzHq)
|
||||
|
||||
Maintenance is the most customizable free maintenance plugin for your Minecraft server you can find. It runs on Paper (also Spigot, but with limited functionality), BungeeCord, Sponge, as well as Velocity.
|
||||
Maintenance is probably the most customizable free maintenance plugin for your Minecraft server you can find. It runs on Bukkit/Spigot, BungeeCord, Sponge as well as Velocity.
|
||||
|
||||
Its features include:
|
||||
* A custom motd as well as server icon, that will be shown during maintenance
|
||||
@@ -15,25 +14,22 @@ Its features include:
|
||||
* Features specifically for Bungee/Velocity
|
||||
* Only want to enable maintenance on a single server? You can also do so by using the `/maintenance <on/off> <servername>` command
|
||||
* Link multiple proxy instances through a MySQL database connection, so you don't have to change maintenance on each proxy by hand
|
||||
* Use PlaceholderAPI placeholders with the [**MaintenanceAddon**](https://hangar.papermc.io/kennytv/MaintenanceAddon) (for Velocity and Bungee)
|
||||
|
||||
A full list of commands, permissions and configuration options can be found in the wiki listed below.
|
||||
* [Hangar Downloads](https://hangar.papermc.io/kennytv/Maintenance)
|
||||
* [Wiki](https://github.com/kennytv/Maintenance/wiki) (configuration, permissions, API usage)
|
||||
* [Changelogs](https://github.com/kennytv/Maintenance/blob/master/.github/CHANGELOG.md)
|
||||
* [Issue tracker/bug reports](https://github.com/kennytv/Maintenance/issues)
|
||||
* [Wiki](https://github.com/KennyTV/Maintenance/wiki)
|
||||
* [Downloads](https://github.com/KennyTV/Maintenance/releases) (GitHub)
|
||||
* [Development builds](https://kennytv.eu/maintenance/snapshot/) (might be unstable)
|
||||
* [Changelogs](https://github.com/KennyTV/Maintenance/blob/master/.github/CHANGELOG.md)
|
||||
* [Issue tracker/bug reports](https://github.com/KennyTV/Maintenance/issues)
|
||||
* [Discord](https://discord.gg/vGCUzHq)
|
||||
* [PlaceholderAPI addon](https://hangar.papermc.io/kennytv/MaintenanceAddon)
|
||||
|
||||
|
||||
## Localization
|
||||
The English base language file is localized using Crodwin. You can see and update translations here: https://crowdin.com/project/maintenance
|
||||
|
||||
Join [our Discord](https://discord.gg/vGCUzHq) if you want to get the proofreader or translator role on the project.
|
||||
Adding translations for languages not yet listed is always appreciated as well!
|
||||
Other forums
|
||||
* [Spigot forums](https://www.spigotmc.org/resources/maintenance.40699/)
|
||||
* [Sponge forums](https://forums.spongepowered.org/t/maintenance/27421)
|
||||
* [Velocity forums](https://forums.velocitypowered.com/t/maintenance/129)
|
||||
|
||||
## Compiling
|
||||
To create a working jar yourself, simply clone the project and compile it with Gradle (`gradlew build`).
|
||||
To create a working jar yourself, simply clone the project and compile it with maven (by using `mvn clean package` in your IDE console).
|
||||
|
||||
## License
|
||||
This project is licensed under the [GNU General Public License v3](LICENSE.txt).
|
||||
## Licence
|
||||
You may only copy the code on a public repository while also keeping it under the same license (see [GNU General Public License](http://www.gnu.org/licenses/gpl-3.0)).
|
||||
@@ -1,24 +0,0 @@
|
||||
plugins {
|
||||
id("com.gradleup.shadow")
|
||||
}
|
||||
|
||||
// Shade and relocate adventure in an extra module, so that common/the rest can directly depend on a
|
||||
// relocated adventure without breaking native platform's adventure usage with project wide relocation
|
||||
tasks {
|
||||
shadowJar {
|
||||
relocate("net.kyori", "eu.kennytv.maintenance.lib.kyori")
|
||||
}
|
||||
build {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(libs.bundles.adventure) {
|
||||
exclude("net.kyori", "adventure-api")
|
||||
exclude("net.kyori", "adventure-bom")
|
||||
exclude("com.google.code.gson", "gson")
|
||||
}
|
||||
}
|
||||
|
||||
publishShadowJar()
|
||||
@@ -1,20 +0,0 @@
|
||||
plugins {
|
||||
id("com.gradleup.shadow")
|
||||
}
|
||||
|
||||
tasks {
|
||||
shadowJar {
|
||||
relocate("net.kyori", "eu.kennytv.maintenance.lib.kyori")
|
||||
}
|
||||
build {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(libs.adventurePlatformBukkit) {
|
||||
exclude("net.kyori", "adventure-api")
|
||||
}
|
||||
}
|
||||
|
||||
publishShadowJar()
|
||||
@@ -1,20 +0,0 @@
|
||||
plugins {
|
||||
id("com.gradleup.shadow")
|
||||
}
|
||||
|
||||
tasks {
|
||||
shadowJar {
|
||||
relocate("net.kyori", "eu.kennytv.maintenance.lib.kyori")
|
||||
}
|
||||
build {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(libs.adventurePlatformBungee) {
|
||||
exclude("net.kyori", "adventure-api")
|
||||
}
|
||||
}
|
||||
|
||||
publishShadowJar()
|
||||
@@ -1,14 +0,0 @@
|
||||
plugins {
|
||||
id("maintenance.shadow-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(projects.maintenanceApi)
|
||||
compileOnly(projects.adventure.adventureApi) {
|
||||
targetConfiguration = "shadow"
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
withJavadocJar()
|
||||
}
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.api.event.proxy;
|
||||
|
||||
import eu.kennytv.maintenance.api.event.manager.MaintenanceEvent;
|
||||
import eu.kennytv.maintenance.api.proxy.Server;
|
||||
|
||||
/**
|
||||
* Notification event fired when maintenance mode has been changed on a proxied server.
|
||||
*/
|
||||
public final class ServerMaintenanceChangedEvent implements MaintenanceEvent {
|
||||
private final Server server;
|
||||
private final boolean maintenance;
|
||||
|
||||
public ServerMaintenanceChangedEvent(final Server server, final boolean maintenance) {
|
||||
this.server = server;
|
||||
this.maintenance = maintenance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns wrapped server object for the server.
|
||||
* <br>
|
||||
* This does not necessarily have to be an existing server:
|
||||
* If maintenance is disabled on a *previously* registered server, see {@link Server#isRegisteredServer()}.
|
||||
*
|
||||
* @return wrapped server object for the server
|
||||
*/
|
||||
public Server getServer() {
|
||||
return server;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if maintenance has been enabled on the server, false otherwise
|
||||
*/
|
||||
public boolean isMaintenance() {
|
||||
return maintenance;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
plugins {
|
||||
id("maintenance.shadow-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnlyApi(libs.jetbrainsAnnotations)
|
||||
}
|
||||
|
||||
java {
|
||||
withJavadocJar()
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.api;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Provider to get the maintenance api instance.
|
||||
*/
|
||||
public final class MaintenanceProvider {
|
||||
private static Maintenance maintenance;
|
||||
|
||||
private MaintenanceProvider() {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public static void setMaintenance(final Maintenance maintenance) {
|
||||
if (MaintenanceProvider.maintenance != null) {
|
||||
throw new IllegalArgumentException("MaintenanceProvider is already set!");
|
||||
}
|
||||
MaintenanceProvider.maintenance = maintenance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the maintenance api instance, or null if not loaded yet.
|
||||
*
|
||||
* @return maintenance api instance
|
||||
*/
|
||||
public static @Nullable Maintenance get() {
|
||||
return maintenance;
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.api.event;
|
||||
|
||||
import eu.kennytv.maintenance.api.Maintenance;
|
||||
import eu.kennytv.maintenance.api.event.manager.MaintenanceEvent;
|
||||
|
||||
/**
|
||||
* Notification event fired when Maintenance configuration is reloaded.
|
||||
*
|
||||
* @author kennytv
|
||||
* @see Maintenance#isMaintenance() for the new maintenance status
|
||||
* //@see MaintenanceProxy#getMaintenanceServers() for the new list of servers under maintenance
|
||||
*/
|
||||
public final class MaintenanceReloadedEvent implements MaintenanceEvent {
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.api.event.manager;
|
||||
|
||||
/**
|
||||
* Abstract class representing a maintenance eventlistener.
|
||||
*
|
||||
* @param <T> event to be listened to
|
||||
*/
|
||||
public abstract class EventListener<T extends MaintenanceEvent> {
|
||||
|
||||
/**
|
||||
* This method is to be overwritten and is called on the given event.
|
||||
*
|
||||
* @param event fired event
|
||||
*/
|
||||
public abstract void onEvent(final T event);
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.api.event.manager;
|
||||
|
||||
public interface EventManager {
|
||||
|
||||
/**
|
||||
* Registers an eventlistener for the given maintenance event.
|
||||
*
|
||||
* @param listener listener to register
|
||||
* @param eventClass class of the event that should be registered
|
||||
*/
|
||||
void registerListener(EventListener listener, Class<? extends MaintenanceEvent> eventClass);
|
||||
|
||||
/**
|
||||
* Fires a maintenance event.
|
||||
*
|
||||
* @param event event to fire
|
||||
*/
|
||||
void callEvent(MaintenanceEvent event);
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.api.event.manager;
|
||||
|
||||
/**
|
||||
* Dummy interface representing a maintenance event.
|
||||
*/
|
||||
public interface MaintenanceEvent {
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// version must be manually kept in sync with the one in root project settings.gradle.kts
|
||||
implementation("com.gradleup.shadow", "shadow-gradle-plugin", "8.3.9")
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.JavaPluginExtension
|
||||
import org.gradle.api.publish.PublishingExtension
|
||||
import org.gradle.api.publish.maven.MavenPublication
|
||||
import org.gradle.jvm.toolchain.JavaLanguageVersion
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.gradle.kotlin.dsl.get
|
||||
import org.gradle.kotlin.dsl.named
|
||||
import java.io.ByteArrayOutputStream
|
||||
|
||||
fun Project.publishShadowJar() {
|
||||
configurePublication {
|
||||
artifact(tasks["shadowJar"])
|
||||
artifact(tasks["sourcesJar"])
|
||||
}
|
||||
}
|
||||
|
||||
fun Project.publishJavaComponents() {
|
||||
configurePublication {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
|
||||
private fun Project.configurePublication(configurer: MavenPublication.() -> Unit) {
|
||||
extensions.configure<PublishingExtension> {
|
||||
publications.named<MavenPublication>("mavenJava") {
|
||||
apply(configurer)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun Project.latestCommitHash(): String {
|
||||
return providers.exec {
|
||||
commandLine = listOf("git", "rev-parse", "--short", "HEAD")
|
||||
}.standardOutput.asBytes.get().toString(Charsets.UTF_8).trim()
|
||||
}
|
||||
|
||||
fun JavaPluginExtension.javaTarget(version: Int) {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
signing
|
||||
}
|
||||
|
||||
tasks {
|
||||
// Variable replacements
|
||||
processResources {
|
||||
val ver = project.version.toString()
|
||||
val desc = project.description
|
||||
filesMatching(listOf("plugin.yml", "bungee.yml", "META-INF/sponge_plugins.json")) {
|
||||
expand("version" to ver, "description" to desc)
|
||||
}
|
||||
}
|
||||
javadoc {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
(options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet")
|
||||
}
|
||||
compileJava {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
options.compilerArgs.addAll(listOf("-nowarn", "-Xlint:-unchecked", "-Xlint:-deprecation"))
|
||||
}
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
javaTarget(8)
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
signing {
|
||||
useGpgCmd()
|
||||
sign(publishing.publications)
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications.create<MavenPublication>("mavenJava") {
|
||||
groupId = rootProject.group as String
|
||||
artifactId = project.name
|
||||
version = rootProject.version as String
|
||||
pom {
|
||||
name.set("Maintenance")
|
||||
description.set("Paper plugin to enable maintenance mode on your Minecraft server.")
|
||||
url.set("https://github.com/kennytv/Maintenance")
|
||||
licenses {
|
||||
license {
|
||||
name.set("GNU GPLv3")
|
||||
url.set("https://www.gnu.org/licenses/gpl-3.0.html")
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id.set("kennytv")
|
||||
name.set("Nassim Jahnke")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!name.startsWith("adventure")) {
|
||||
repositories.maven {
|
||||
name = "OSSRH"
|
||||
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
|
||||
credentials {
|
||||
username = System.getenv("OSSRH_USERNAME")
|
||||
password = System.getenv("OSSRH_PASSWORD")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,12 +0,0 @@
|
||||
import java.util.*
|
||||
|
||||
plugins {
|
||||
id("maintenance.shadow-conventions")
|
||||
}
|
||||
|
||||
tasks {
|
||||
shadowJar {
|
||||
archiveFileName.set("Maintenance-${project.name.substringAfter("maintenance-").replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }}-${project.version}.jar")
|
||||
destinationDirectory.set(rootProject.layout.buildDirectory.dir("libs"))
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import org.gradle.jvm.tasks.Jar
|
||||
import org.gradle.kotlin.dsl.named
|
||||
|
||||
plugins {
|
||||
id("maintenance.base-conventions")
|
||||
id("com.gradleup.shadow")
|
||||
}
|
||||
|
||||
tasks {
|
||||
named<Jar>("jar") {
|
||||
archiveClassifier.set("unshaded")
|
||||
from(project.rootProject.file("LICENSE.txt"))
|
||||
}
|
||||
val shadowJar = named<ShadowJar>("shadowJar") {
|
||||
archiveClassifier.set("")
|
||||
configureRelocations()
|
||||
}
|
||||
named("build") {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
}
|
||||
|
||||
publishShadowJar()
|
||||
|
||||
fun ShadowJar.configureRelocations() {
|
||||
relocate("com.zaxxer.hikari", "eu.kennytv.maintenance.lib.hikari")
|
||||
relocate("org.bstats", "eu.kennytv.maintenance.lib.bstats")
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
plugins {
|
||||
id("maintenance.base-conventions")
|
||||
}
|
||||
|
||||
publishJavaComponents()
|
||||
@@ -1,41 +0,0 @@
|
||||
import org.gradle.api.plugins.JavaPlugin.TEST_IMPLEMENTATION_CONFIGURATION_NAME
|
||||
|
||||
plugins {
|
||||
base
|
||||
id("eclipse")
|
||||
id("maintenance.build-logic")
|
||||
}
|
||||
|
||||
allprojects {
|
||||
group = "eu.kennytv.maintenance"
|
||||
version = property("projectVersion") as String // from gradle.properties
|
||||
description = "Enable maintenance mode with a custom maintenance motd and icon."
|
||||
}
|
||||
|
||||
val platforms = setOf(
|
||||
projects.maintenancePaper,
|
||||
projects.maintenanceSponge,
|
||||
projects.maintenanceVelocity
|
||||
).map { it.path }
|
||||
|
||||
val special = setOf(
|
||||
projects.maintenance,
|
||||
projects.maintenanceApi,
|
||||
projects.maintenanceApiProxy,
|
||||
projects.adventure,
|
||||
projects.adventure.adventureApi,
|
||||
projects.adventure.adventurePlatformBukkit,
|
||||
).map { it.path }
|
||||
|
||||
subprojects {
|
||||
when (path) {
|
||||
in platforms -> plugins.apply("maintenance.platform-conventions")
|
||||
in special -> plugins.apply("maintenance.base-conventions")
|
||||
else -> plugins.apply("maintenance.standard-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
TEST_IMPLEMENTATION_CONFIGURATION_NAME(rootProject.libs.bundles.junit)
|
||||
TEST_IMPLEMENTATION_CONFIGURATION_NAME(rootProject.libs.snakeyaml)
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
dependencies {
|
||||
api(projects.maintenanceApiProxy)
|
||||
api(projects.maintenanceCore)
|
||||
implementation(libs.hikariCP)
|
||||
compileOnly(libs.luckperms)
|
||||
compileOnly(libs.guava)
|
||||
compileOnly(libs.gson)
|
||||
}
|
||||
|
||||
java {
|
||||
withJavadocJar()
|
||||
}
|
||||
-282
@@ -1,282 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.proxy;
|
||||
|
||||
import com.google.common.io.CharStreams;
|
||||
import com.google.gson.JsonObject;
|
||||
import eu.kennytv.maintenance.api.event.proxy.ServerMaintenanceChangedEvent;
|
||||
import eu.kennytv.maintenance.api.proxy.MaintenanceProxy;
|
||||
import eu.kennytv.maintenance.api.proxy.Server;
|
||||
import eu.kennytv.maintenance.core.MaintenancePlugin;
|
||||
import eu.kennytv.maintenance.core.proxy.command.MaintenanceProxyCommand;
|
||||
import eu.kennytv.maintenance.core.proxy.runnable.SingleMaintenanceRunnable;
|
||||
import eu.kennytv.maintenance.core.proxy.runnable.SingleMaintenanceScheduleRunnable;
|
||||
import eu.kennytv.maintenance.core.proxy.util.ProfileLookup;
|
||||
import eu.kennytv.maintenance.core.runnable.MaintenanceRunnableBase;
|
||||
import eu.kennytv.maintenance.core.util.RateLimitedException;
|
||||
import eu.kennytv.maintenance.core.util.SenderInfo;
|
||||
import eu.kennytv.maintenance.core.util.ServerType;
|
||||
import eu.kennytv.maintenance.core.util.Task;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.Blocking;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @author kennytv
|
||||
* @since 3.0
|
||||
*/
|
||||
public abstract class MaintenanceProxyPlugin extends MaintenancePlugin implements MaintenanceProxy {
|
||||
private final Map<String, Task> serverTasks = new HashMap<>();
|
||||
protected SettingsProxy settingsProxy;
|
||||
|
||||
protected MaintenanceProxyPlugin(final String version, final ServerType serverType) {
|
||||
super(version, serverType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
super.disable();
|
||||
if (settingsProxy.getMySQL() != null) {
|
||||
settingsProxy.getMySQL().close();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMaintenance(final boolean maintenance) {
|
||||
if (settingsProxy.hasMySQL()) {
|
||||
settingsProxy.setMaintenanceToSQL(maintenance);
|
||||
}
|
||||
super.setMaintenance(maintenance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMaintenance(final Server server) {
|
||||
return settingsProxy.isMaintenance(server.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setMaintenanceToServer(final Server server, final boolean maintenance) {
|
||||
if (maintenance) {
|
||||
if (!settingsProxy.addMaintenanceServer(server.getName())) {
|
||||
return false;
|
||||
}
|
||||
} else if (!settingsProxy.removeMaintenanceServer(server.getName())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
serverActions(server, maintenance);
|
||||
|
||||
for (final String command : (maintenance ? settingsProxy.getCommandsOnMaintenanceEnable(server) : settingsProxy.getCommandsOnMaintenanceDisable(server))) {
|
||||
try {
|
||||
executeConsoleCommand(command.replace("%SERVER%", server.getName()));
|
||||
} catch (final Exception e) {
|
||||
getLogger().severe("Error while executing extra maintenance " + (maintenance ? "enable" : "disable") + " command: " + command);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void serverActions(final Server server, final boolean maintenance) {
|
||||
if (server == null) return;
|
||||
|
||||
// Skip to the even fire for dummy servers
|
||||
if (server.isRegisteredServer()) {
|
||||
if (maintenance) {
|
||||
final Server fallback = settingsProxy.getFallbackServer();
|
||||
if (fallback == null) {
|
||||
if (server.hasPlayers()) {
|
||||
getLogger().warning("The set fallback could not be found! Instead kicking players from that server off the network!");
|
||||
}
|
||||
}
|
||||
kickPlayers(server, fallback);
|
||||
} else {
|
||||
server.broadcast(settingsProxy.getMessage("singleMaintenanceDeactivated", "%SERVER%", server.getName()));
|
||||
}
|
||||
|
||||
cancelSingleTask(server);
|
||||
}
|
||||
|
||||
eventManager.callEvent(new ServerMaintenanceChangedEvent(server, maintenance));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isServerTaskRunning(final Server server) {
|
||||
return serverTasks.containsKey(server.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getMaintenanceServers() {
|
||||
return Collections.unmodifiableSet(settingsProxy.getMaintenanceServers());
|
||||
}
|
||||
|
||||
public void cancelSingleTask(final Server server) {
|
||||
final Task task = serverTasks.remove(server.getName());
|
||||
if (task != null) {
|
||||
task.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
public MaintenanceRunnableBase startSingleMaintenanceRunnable(final Server server, final Duration duration, final boolean enable) {
|
||||
final MaintenanceRunnableBase runnable = new SingleMaintenanceRunnable(this, settingsProxy, (int) duration.getSeconds(), enable, server);
|
||||
serverTasks.put(server.getName(), runnable.getTask());
|
||||
return runnable;
|
||||
}
|
||||
|
||||
public MaintenanceRunnableBase scheduleSingleMaintenanceRunnable(final Server server, final Duration enableIn, final Duration maintenanceDuration) {
|
||||
final MaintenanceRunnableBase runnable = new SingleMaintenanceScheduleRunnable(this, settingsProxy,
|
||||
(int) enableIn.getSeconds(), (int) maintenanceDuration.getSeconds(), server);
|
||||
serverTasks.put(server.getName(), runnable.getTask());
|
||||
return runnable;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public List<String> getMaintenanceServersDump() {
|
||||
final List<String> list = new ArrayList<>();
|
||||
if (isMaintenance()) {
|
||||
list.add("global");
|
||||
}
|
||||
list.addAll(settingsProxy.getMaintenanceServers());
|
||||
return list.isEmpty() ? null : list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaintenanceProxyCommand getCommandManager() {
|
||||
return (MaintenanceProxyCommand) commandManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void kickPlayers() {
|
||||
// Send players to waiting server is set
|
||||
if (settingsProxy.getWaitingServer() != null) {
|
||||
final Server waitingServer = getServer(settingsProxy.getWaitingServer());
|
||||
if (waitingServer != null) {
|
||||
kickPlayersTo(waitingServer);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If not set, kick players from proxy
|
||||
kickPlayersFromProxy();
|
||||
}
|
||||
|
||||
@Blocking
|
||||
@Nullable
|
||||
protected ProfileLookup doUUIDLookup(final String name) throws IOException {
|
||||
ProfileLookup profileLookup;
|
||||
try {
|
||||
profileLookup = doUUIDLookupMojangAPI(name);
|
||||
} catch (RateLimitedException e) {
|
||||
// Use fallback API if rate limit is reached
|
||||
profileLookup = doUUIDLookupAshconAPI(name);
|
||||
}
|
||||
|
||||
if (settingsProxy.isFallbackToOfflineUUID() && profileLookup == null) {
|
||||
// Use offline uuid
|
||||
return new ProfileLookup(UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(StandardCharsets.UTF_8)), name);
|
||||
}
|
||||
|
||||
return profileLookup;
|
||||
}
|
||||
|
||||
/**
|
||||
* Official Mojang API
|
||||
*/
|
||||
@Nullable
|
||||
private ProfileLookup doUUIDLookupMojangAPI(final String name) throws IOException {
|
||||
final URL url = new URL("https://api.mojang.com/users/profiles/minecraft/" + name);
|
||||
final HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||
connection.setRequestMethod("GET");
|
||||
|
||||
int status = connection.getResponseCode();
|
||||
if (status == 429) {
|
||||
throw new RateLimitedException();
|
||||
}
|
||||
if (status == 404) {
|
||||
// Return null if profile not found
|
||||
return null;
|
||||
}
|
||||
|
||||
try (final InputStream in = connection.getInputStream()) {
|
||||
final String output = CharStreams.toString(new InputStreamReader(in));
|
||||
final JsonObject json = GSON.fromJson(output, JsonObject.class);
|
||||
|
||||
final UUID uuid = fromStringUUIDWithoutDashes(json.getAsJsonPrimitive("id").getAsString());
|
||||
final String username = json.getAsJsonPrimitive("name").getAsString();
|
||||
return new ProfileLookup(uuid, username);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fallback API (Ashcon API)
|
||||
*/
|
||||
@Nullable
|
||||
private ProfileLookup doUUIDLookupAshconAPI(final String name) throws IOException {
|
||||
final URL url = new URL("https://api.ashcon.app/mojang/v2/user/" + name);
|
||||
final HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||
|
||||
if (connection.getResponseCode() == 403) {
|
||||
// Return null if profile not found
|
||||
return null;
|
||||
}
|
||||
|
||||
try (final InputStream in = connection.getInputStream()) {
|
||||
final String output = CharStreams.toString(new InputStreamReader(in));
|
||||
final JsonObject json = GSON.fromJson(output, JsonObject.class);
|
||||
|
||||
final UUID uuid = UUID.fromString(json.getAsJsonPrimitive("uuid").getAsString());
|
||||
final String username = json.getAsJsonPrimitive("username").getAsString();
|
||||
return new ProfileLookup(uuid, username);
|
||||
}
|
||||
}
|
||||
|
||||
private UUID fromStringUUIDWithoutDashes(String undashedUUID) {
|
||||
return UUID.fromString(
|
||||
undashedUUID.substring(0, 8) + "-" + undashedUUID.substring(8, 12) + "-" +
|
||||
undashedUUID.substring(12, 16) + "-" + undashedUUID.substring(16, 20) + "-" +
|
||||
undashedUUID.substring(20, 32)
|
||||
);
|
||||
}
|
||||
|
||||
public SettingsProxy getSettingsProxy() {
|
||||
return settingsProxy;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public abstract String getServerNameOf(SenderInfo sender);
|
||||
|
||||
protected abstract void kickPlayers(Server server, Server fallback);
|
||||
|
||||
protected abstract void kickPlayersTo(Server server);
|
||||
|
||||
protected abstract void kickPlayersFromProxy();
|
||||
}
|
||||
-95
@@ -1,95 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.proxy.command.subcommand;
|
||||
|
||||
import eu.kennytv.maintenance.api.proxy.Server;
|
||||
import eu.kennytv.maintenance.core.proxy.MaintenanceProxyPlugin;
|
||||
import eu.kennytv.maintenance.core.proxy.command.ProxyCommandInfo;
|
||||
import eu.kennytv.maintenance.core.runnable.MaintenanceRunnableBase;
|
||||
import eu.kennytv.maintenance.core.util.SenderInfo;
|
||||
import java.time.Duration;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public final class SingleScheduleTimerCommand extends ProxyCommandInfo {
|
||||
|
||||
public SingleScheduleTimerCommand(final MaintenanceProxyPlugin plugin) {
|
||||
super(plugin, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(final SenderInfo sender) {
|
||||
return sender.hasMaintenancePermission("timer") || sender.hasPermission("maintenance.singleserver.timer");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(final SenderInfo sender, final String[] args) {
|
||||
if (args.length == 3) {
|
||||
if (checkPermission(sender, "timer")) return;
|
||||
|
||||
final Duration enableIn = plugin.getCommandManager().parseDurationAndCheckTask(sender, args[1]);
|
||||
final Duration duration = plugin.getCommandManager().parseDurationAndCheckTask(sender, args[2], false);
|
||||
if (enableIn == null || duration == null) {
|
||||
sender.send(getHelpMessage());
|
||||
return;
|
||||
}
|
||||
if (plugin.isMaintenance()) {
|
||||
sender.send(getMessage("alreadyEnabled"));
|
||||
return;
|
||||
}
|
||||
|
||||
plugin.scheduleMaintenanceRunnable(duration, enableIn);
|
||||
sender.send(getMessage(
|
||||
"scheduletimerStarted",
|
||||
"%TIME%", plugin.getRunnable().getTime(),
|
||||
"%DURATION%", plugin.getFormattedTime((int) duration.getSeconds())
|
||||
));
|
||||
} else if (args.length == 4) {
|
||||
if (checkPermission(sender, "singleserver.timer")) return;
|
||||
|
||||
final Duration enableIn = plugin.getCommandManager().parseDurationAndCheckTask(sender, args[2], false);
|
||||
final Duration duration = plugin.getCommandManager().parseDurationAndCheckTask(sender, args[3], false);
|
||||
if (enableIn == null || duration == null) {
|
||||
sender.send(getHelpMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
final Server server = plugin.getCommandManager().checkSingleTimerServerArg(sender, args[1]);
|
||||
if (server == null) return;
|
||||
if (plugin.isMaintenance(server)) {
|
||||
sender.send(getMessage("singleServerAlreadyEnabled", "%SERVER%", server.getName()));
|
||||
return;
|
||||
}
|
||||
|
||||
final MaintenanceRunnableBase runnable = plugin.scheduleSingleMaintenanceRunnable(server, enableIn, duration);
|
||||
sender.send(getMessage(
|
||||
"singleScheduletimerStarted",
|
||||
"%TIME%", runnable.getTime(),
|
||||
"%DURATION%", plugin.getFormattedTime((int) duration.getSeconds()),
|
||||
"%SERVER%", server.getName()
|
||||
));
|
||||
} else {
|
||||
sender.send(getHelpMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompletion(final SenderInfo sender, final String[] args) {
|
||||
return args.length == 2 && sender.hasMaintenancePermission("singleserver.timer") ? plugin.getCommandManager().getServersCompletion(args[1].toLowerCase()) : Collections.emptyList();
|
||||
}
|
||||
}
|
||||
-78
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.proxy.hook;
|
||||
|
||||
import eu.kennytv.maintenance.core.hook.LuckPermsHook;
|
||||
import eu.kennytv.maintenance.core.proxy.MaintenanceProxyPlugin;
|
||||
import net.luckperms.api.LuckPermsProvider;
|
||||
import net.luckperms.api.context.ContextCalculator;
|
||||
import net.luckperms.api.context.ContextConsumer;
|
||||
import net.luckperms.api.context.ContextSet;
|
||||
import net.luckperms.api.context.ImmutableContextSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
public final class LuckPermsProxyHook {
|
||||
|
||||
public static <T> void register(final MaintenanceProxyPlugin plugin, final Function<T, String> function) {
|
||||
LuckPermsProvider.get().getContextManager().registerCalculator(new MaintenanceProxyCalculator<>(plugin, function));
|
||||
}
|
||||
|
||||
public static final class MaintenanceProxyCalculator<T> implements ContextCalculator<T> {
|
||||
|
||||
private static final String MAINTENANCE_ON_KEY = "is-maintenance-on-";
|
||||
private static final String ON_MAINTENANCE_SERVER_KEY = "on-maintenance-server";
|
||||
private final MaintenanceProxyPlugin maintenance;
|
||||
private final Function<T, String> playerServerFunction;
|
||||
|
||||
private MaintenanceProxyCalculator(final MaintenanceProxyPlugin plugin, final Function<T, String> playerServerFunction) {
|
||||
this.maintenance = plugin;
|
||||
this.playerServerFunction = playerServerFunction;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void calculate(@NotNull final T target, @NotNull final ContextConsumer consumer) {
|
||||
consumer.accept(LuckPermsHook.MaintenanceCalculator.MAINTENANCE_KEY, Boolean.toString(maintenance.isMaintenance()));
|
||||
/*for (final String serverName : maintenance.getServers()) {
|
||||
final Server server = maintenance.getServer(serverName);
|
||||
if (server != null) {
|
||||
consumer.accept(MAINTENANCE_ON_KEY + server, Boolean.toString(maintenance.isMaintenance(server)));
|
||||
}
|
||||
}*/
|
||||
final String server = playerServerFunction.apply(target);
|
||||
if (server != null) {
|
||||
final String value = Boolean.toString(maintenance.getSettingsProxy().isMaintenance(server));
|
||||
consumer.accept(MAINTENANCE_ON_KEY + server, value);
|
||||
consumer.accept(ON_MAINTENANCE_SERVER_KEY, value);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContextSet estimatePotentialContexts() {
|
||||
final ImmutableContextSet.Builder builder = ImmutableContextSet.builder();
|
||||
for (final String serverName : maintenance.getServers()) {
|
||||
final String key = MAINTENANCE_ON_KEY + serverName;
|
||||
builder.add(key, "true").add(key, "false");
|
||||
}
|
||||
return builder.add(ON_MAINTENANCE_SERVER_KEY, "true").add(ON_MAINTENANCE_SERVER_KEY, "false")
|
||||
.add(LuckPermsHook.MaintenanceCalculator.MAINTENANCE_KEY, "true")
|
||||
.add(LuckPermsHook.MaintenanceCalculator.MAINTENANCE_KEY, "false").build();
|
||||
}
|
||||
}
|
||||
}
|
||||
-121
@@ -1,121 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.proxy.listener;
|
||||
|
||||
import eu.kennytv.maintenance.api.proxy.Server;
|
||||
import eu.kennytv.maintenance.core.listener.JoinListenerBase;
|
||||
import eu.kennytv.maintenance.core.proxy.MaintenanceProxyPlugin;
|
||||
import eu.kennytv.maintenance.core.proxy.SettingsProxy;
|
||||
import eu.kennytv.maintenance.core.proxy.util.ProxySenderInfo;
|
||||
import eu.kennytv.maintenance.core.proxy.util.ServerConnectResult;
|
||||
import eu.kennytv.maintenance.core.util.SenderInfo;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public abstract class ProxyJoinListenerBase extends JoinListenerBase {
|
||||
private static final ServerConnectResult ALLOWED = new ServerConnectResult(false);
|
||||
private static final ServerConnectResult DENIED = new ServerConnectResult(true);
|
||||
protected final MaintenanceProxyPlugin plugin;
|
||||
protected final SettingsProxy settings;
|
||||
private boolean warned;
|
||||
|
||||
protected ProxyJoinListenerBase(final MaintenanceProxyPlugin plugin, final SettingsProxy settings) {
|
||||
super(plugin, settings);
|
||||
this.plugin = plugin;
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sender joined player
|
||||
* @param target target server
|
||||
* @param normalServerConnect true if normal server connect, false if initial proxy join or kick
|
||||
* @return connect result with data for further handling
|
||||
*/
|
||||
protected ServerConnectResult serverConnect(final ProxySenderInfo sender, final Server target, final boolean normalServerConnect) {
|
||||
// Check waiting server for global maintenance
|
||||
if (settings.isMaintenance()) {
|
||||
if (sender.hasMaintenancePermission("bypass") || settings.isWhitelisted(sender.getUuid())) return ALLOWED;
|
||||
|
||||
final Server waitingServer = shouldConnectToWaitingServer(sender);
|
||||
// Should never be null, but just in case
|
||||
if (waitingServer == null) return DENIED;
|
||||
|
||||
// Player is connecting to the waiting server
|
||||
if (target.getName().equals(waitingServer.getName())) return ALLOWED;
|
||||
|
||||
// Player already is on the waiting server
|
||||
final String currentServer = plugin.getServerNameOf(sender);
|
||||
if (waitingServer.getName().equals(currentServer)) {
|
||||
sender.send(settings.getMessage("forceWaitingServer"));
|
||||
return DENIED;
|
||||
}
|
||||
|
||||
sender.send(settings.getMessage("sentToWaitingServer"));
|
||||
return new ServerConnectResult(waitingServer);
|
||||
}
|
||||
|
||||
// Single server maintenance
|
||||
if (!settings.isMaintenance(target.getName())) return ALLOWED;
|
||||
if (sender.hasMaintenancePermission("bypass") || settings.isWhitelisted(sender.getUuid())
|
||||
|| sender.hasMaintenancePermission("singleserver.bypass." + target.getName().toLowerCase())) {
|
||||
return ALLOWED;
|
||||
}
|
||||
|
||||
if (settings.isJoinNotifications()) {
|
||||
broadcastJoinNotification(sender.getName(), target);
|
||||
}
|
||||
|
||||
if (normalServerConnect) {
|
||||
sender.send(settings.getServerKickMessage(target.getName()));
|
||||
return DENIED;
|
||||
}
|
||||
|
||||
// If it's the initial proxy join or a kick from another server, go back to fallback server
|
||||
final Server fallback = settings.getFallbackServer();
|
||||
if (fallback == null || !sender.canAccess(fallback)) {
|
||||
// Nothing to redirect to, player has to be kicked from the proxy
|
||||
sender.disconnect(settings.getFullServerKickMessage(target.getName()));
|
||||
if (!warned) {
|
||||
plugin.getLogger().warning("Could not send player to the set fallback server; instead kicking player off the network!");
|
||||
warned = true;
|
||||
}
|
||||
return DENIED;
|
||||
} else {
|
||||
return new ServerConnectResult(fallback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* To be called after {@link #shouldKick(SenderInfo, boolean)} to get the waiting server if present.
|
||||
* Does not do any permission checks, they should be done separately!
|
||||
*
|
||||
* @param sender sender
|
||||
* @return waiting server, null if player should be kicked
|
||||
*/
|
||||
@Nullable
|
||||
protected Server shouldConnectToWaitingServer(final ProxySenderInfo sender) {
|
||||
if (settings.getWaitingServer() == null) return null;
|
||||
|
||||
final Server waitingServer = plugin.getServer(settings.getWaitingServer());
|
||||
if (waitingServer == null) return null;
|
||||
if (!sender.canAccess(waitingServer) || settings.isMaintenance(waitingServer.getName())) return null;
|
||||
|
||||
return waitingServer;
|
||||
}
|
||||
|
||||
protected abstract void broadcastJoinNotification(String name, Server server);
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.proxy.mysql;
|
||||
|
||||
import com.zaxxer.hikari.HikariConfig;
|
||||
import com.zaxxer.hikari.HikariDataSource;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public final class MySQL {
|
||||
private final Logger logger;
|
||||
private final HikariDataSource hikariDataSource;
|
||||
|
||||
public MySQL(final Logger logger, final String hostname, final int port, final String username, final String password, final String database, final boolean useSSL) {
|
||||
this.logger = logger;
|
||||
|
||||
final HikariConfig hikariConfig = new HikariConfig();
|
||||
hikariConfig.setMaximumPoolSize(10);
|
||||
hikariConfig.addDataSourceProperty("serverName", hostname);
|
||||
hikariConfig.addDataSourceProperty("user", username);
|
||||
hikariConfig.addDataSourceProperty("password", password);
|
||||
|
||||
String urlProperty = "jdbc:mysql://" + hostname + ":" + port + "/" + database;
|
||||
if (!useSSL) {
|
||||
urlProperty += "?useSSL=false";
|
||||
}
|
||||
hikariConfig.addDataSourceProperty("url", urlProperty);
|
||||
|
||||
hikariConfig.setJdbcUrl(urlProperty);
|
||||
hikariConfig.setDataSourceClassName(findDriver("com.mysql.jdbc.jdbc2.optional.MysqlDataSource", "com.mysql.cj.jdbc.MysqlDataSource", "org.mariadb.jdbc.MariaDbDataSource"));
|
||||
hikariDataSource = new HikariDataSource(hikariConfig);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private String findDriver(final String... classNames) {
|
||||
for (final String name : classNames) {
|
||||
try {
|
||||
Class.forName(name);
|
||||
return name;
|
||||
} catch (final ClassNotFoundException ignored) {
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("No sql driver class found");
|
||||
}
|
||||
|
||||
public void executeUpdate(final String query, final Consumer<Integer> callback, final Object... objects) {
|
||||
try (final Connection connection = hikariDataSource.getConnection()) {
|
||||
try (final PreparedStatement preparedStatement = connection.prepareStatement(query)) {
|
||||
int current = 1;
|
||||
for (final Object object : objects) {
|
||||
preparedStatement.setObject(current, object);
|
||||
current++;
|
||||
}
|
||||
|
||||
callback.accept(preparedStatement.executeUpdate());
|
||||
}
|
||||
} catch (final SQLException e) {
|
||||
logger.log(Level.SEVERE, "Error while executing update method: " + query);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void executeQuery(final String query, final Consumer<ResultSet> callback, final Object... objects) {
|
||||
try (final Connection connection = hikariDataSource.getConnection()) {
|
||||
try (final PreparedStatement preparedStatement = connection.prepareStatement(query)) {
|
||||
int current = 1;
|
||||
for (final Object object : objects) {
|
||||
preparedStatement.setObject(current, object);
|
||||
current++;
|
||||
}
|
||||
|
||||
try (final ResultSet resultSet = preparedStatement.executeQuery()) {
|
||||
callback.accept(resultSet);
|
||||
}
|
||||
}
|
||||
} catch (final SQLException e) {
|
||||
logger.log(Level.SEVERE, "Error while executing query method: " + query);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void executeUpdate(final String query, final Object... objects) {
|
||||
executeUpdate(query, res -> {
|
||||
}, objects);
|
||||
}
|
||||
|
||||
public void close() {
|
||||
hikariDataSource.close();
|
||||
}
|
||||
}
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.proxy.runnable;
|
||||
|
||||
import eu.kennytv.maintenance.api.proxy.Server;
|
||||
import eu.kennytv.maintenance.core.MaintenancePlugin;
|
||||
import eu.kennytv.maintenance.core.Settings;
|
||||
import eu.kennytv.maintenance.core.proxy.MaintenanceProxyPlugin;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
|
||||
import java.time.Duration;
|
||||
|
||||
public final class SingleMaintenanceScheduleRunnable extends SingleMaintenanceRunnable {
|
||||
private final int maintenanceDurationSeconds;
|
||||
|
||||
public SingleMaintenanceScheduleRunnable(final MaintenancePlugin plugin, final Settings settings, final int seconds, final int maintenanceDuration, final Server server) {
|
||||
super(plugin, settings, seconds, true, server);
|
||||
this.maintenanceDurationSeconds = maintenanceDuration;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void finish() {
|
||||
super.finish();
|
||||
((MaintenanceProxyPlugin) plugin).startSingleMaintenanceRunnable(server, Duration.ofSeconds(maintenanceDurationSeconds), false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Component getStartMessage() {
|
||||
return settings.getMessage("singleScheduletimerBroadcast",
|
||||
"%SERVER%", server.getName(),
|
||||
"%TIME%", getTime(), "%DURATION%", plugin.getFormattedTime(maintenanceDurationSeconds));
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.proxy.util;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public final class ProfileLookup {
|
||||
private final UUID uuid;
|
||||
private final String name;
|
||||
|
||||
public ProfileLookup(final UUID uuid, final String name) {
|
||||
this.uuid = uuid;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public UUID getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
-66
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.proxy.util;
|
||||
|
||||
import eu.kennytv.maintenance.api.proxy.Server;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public final class ProxyOfflineSenderInfo implements ProxySenderInfo {
|
||||
private final UUID uuid;
|
||||
private final String name;
|
||||
|
||||
public ProxyOfflineSenderInfo(final UUID uuid, final String name) {
|
||||
this.uuid = uuid;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAccess(final Server server) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disconnect(final Component component) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(final String permission) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(final Component component) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPlayer() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.proxy.util;
|
||||
|
||||
import eu.kennytv.maintenance.api.proxy.Server;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public final class ServerConnectResult {
|
||||
private final boolean cancel;
|
||||
private final Server target;
|
||||
|
||||
public ServerConnectResult(final boolean cancel) {
|
||||
this.cancel = cancel;
|
||||
this.target = null;
|
||||
}
|
||||
|
||||
public ServerConnectResult(final Server target) {
|
||||
this.cancel = false;
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
public boolean isCancelled() {
|
||||
return cancel;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Server getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ServerConnectResult{" +
|
||||
"cancel=" + cancel +
|
||||
", target=" + target +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
plugins {
|
||||
id("net.kyori.blossom")
|
||||
id("org.jetbrains.gradle.plugin.idea-ext")
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
blossom {
|
||||
javaSources {
|
||||
property("version", project.version.toString())
|
||||
property("impl_version", "git-Maintenance-${project.version}:${rootProject.latestCommitHash()}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(projects.maintenanceApi)
|
||||
api(projects.adventure.adventureApi) {
|
||||
targetConfiguration = "shadow"
|
||||
}
|
||||
compileOnly(libs.luckperms)
|
||||
compileOnly(libs.serverlistplus)
|
||||
compileOnly(libs.guava)
|
||||
compileOnly(libs.gson)
|
||||
compileOnly(libs.snakeyaml)
|
||||
}
|
||||
|
||||
java {
|
||||
withJavadocJar()
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2023 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.util;
|
||||
|
||||
public final class MaintenanceVersion {
|
||||
|
||||
public static final String VERSION = "{{ version }}";
|
||||
private static final String IMPLEMENTATION_VERSION = "{{ impl_version }}";
|
||||
|
||||
public static String getVersion() {
|
||||
return VERSION;
|
||||
}
|
||||
|
||||
public static String getImplementationVersion() {
|
||||
return IMPLEMENTATION_VERSION;
|
||||
}
|
||||
}
|
||||
@@ -1,479 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.io.CharStreams;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonObject;
|
||||
import eu.kennytv.maintenance.api.Maintenance;
|
||||
import eu.kennytv.maintenance.api.MaintenanceProvider;
|
||||
import eu.kennytv.maintenance.api.event.MaintenanceChangedEvent;
|
||||
import eu.kennytv.maintenance.api.event.manager.EventManager;
|
||||
import eu.kennytv.maintenance.core.command.MaintenanceCommand;
|
||||
import eu.kennytv.maintenance.core.dump.MaintenanceDump;
|
||||
import eu.kennytv.maintenance.core.dump.PluginDump;
|
||||
import eu.kennytv.maintenance.core.hook.ServerListPlusHook;
|
||||
import eu.kennytv.maintenance.core.runnable.MaintenanceRunnable;
|
||||
import eu.kennytv.maintenance.core.runnable.MaintenanceScheduleRunnable;
|
||||
import eu.kennytv.maintenance.core.util.SenderInfo;
|
||||
import eu.kennytv.maintenance.core.util.ServerType;
|
||||
import eu.kennytv.maintenance.core.util.Task;
|
||||
import eu.kennytv.maintenance.core.util.Version;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.format.NamedTextColor;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.time.Duration;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Pattern;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public abstract class MaintenancePlugin implements Maintenance {
|
||||
public static final Gson GSON = new GsonBuilder().create();
|
||||
public static final String HANGAR_URL = "https://hangar.papermc.io/kennytv/Maintenance";
|
||||
private static final Pattern INT_PATTERN = Pattern.compile("[0-9]+");
|
||||
protected final EventManager eventManager;
|
||||
protected final Version version;
|
||||
protected Settings settings;
|
||||
protected ServerListPlusHook serverListPlusHook;
|
||||
protected MaintenanceRunnable runnable;
|
||||
protected MaintenanceCommand commandManager;
|
||||
private final Component prefix;
|
||||
private final ServerType serverType;
|
||||
private Version newestVersion;
|
||||
private boolean debug;
|
||||
|
||||
protected MaintenancePlugin(final String version, final ServerType serverType) {
|
||||
this.version = new Version(version);
|
||||
this.serverType = serverType;
|
||||
this.prefix = Component.text()
|
||||
.append(Component.text().content("[").color(NamedTextColor.DARK_GRAY))
|
||||
.append(Component.text().content("Maintenance").color(NamedTextColor.YELLOW))
|
||||
.append(Component.text().content("]").color(NamedTextColor.DARK_GRAY))
|
||||
.append(Component.text(" "))
|
||||
.build();
|
||||
this.eventManager = new eu.kennytv.maintenance.core.event.EventManager();
|
||||
MaintenanceProvider.setMaintenance(this);
|
||||
}
|
||||
|
||||
public void disable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMaintenance(final boolean maintenance) {
|
||||
settings.setMaintenance(maintenance);
|
||||
settings.getConfig().set("maintenance-enabled", maintenance);
|
||||
settings.saveConfig();
|
||||
serverActions(maintenance);
|
||||
|
||||
for (final String command : (maintenance ? settings.getCommandsOnMaintenanceEnable() : settings.getCommandsOnMaintenanceDisable())) {
|
||||
try {
|
||||
executeConsoleCommand(command);
|
||||
} catch (final Exception e) {
|
||||
getLogger().log(Level.SEVERE, "Error while executing extra maintenance " + (maintenance ? "enable" : "disable") + " command: " + command, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void serverActions(final boolean maintenance) {
|
||||
if (isTaskRunning()) {
|
||||
cancelTask();
|
||||
}
|
||||
if (serverListPlusHook != null && settings.isEnablePingMessages()) {
|
||||
serverListPlusHook.setEnabled(!maintenance);
|
||||
}
|
||||
|
||||
if (maintenance) {
|
||||
broadcast(settings.getMessage("maintenanceActivated"));
|
||||
if (settings.isKickOnlinePlayers()) {
|
||||
kickPlayers();
|
||||
}
|
||||
} else {
|
||||
broadcast(settings.getMessage("maintenanceDeactivated"));
|
||||
}
|
||||
|
||||
eventManager.callEvent(new MaintenanceChangedEvent(maintenance));
|
||||
}
|
||||
|
||||
public String replacePingVariables(String component) {
|
||||
if (component.contains("%TIMER%")) {
|
||||
component = component.replace("%TIMER%", getTimerMessage());
|
||||
}
|
||||
component = component.replace("%ONLINE%", String.valueOf(getOnlinePlayers()));
|
||||
component = component.replace("%MAX%", String.valueOf(getMaxPlayers()));
|
||||
return component;
|
||||
}
|
||||
|
||||
public String getTimerMessage() {
|
||||
if (!isTaskRunning()) {
|
||||
return settings.getLanguageString("motdTimerNotRunning");
|
||||
}
|
||||
|
||||
final int preHours = runnable.getSecondsLeft() / 60;
|
||||
final int minutes = preHours % 60;
|
||||
final int seconds = runnable.getSecondsLeft() % 60;
|
||||
return settings.getLanguageString("motdTimer",
|
||||
"%HOURS%", String.format("%02d", preHours / 60),
|
||||
"%MINUTES%", String.format("%02d", minutes),
|
||||
"%SECONDS%", String.format("%02d", seconds));
|
||||
}
|
||||
|
||||
public String getFormattedTime(final int timeSeconds) {
|
||||
final int preHours = timeSeconds / 60;
|
||||
final int minutes = preHours % 60;
|
||||
final int seconds = timeSeconds % 60;
|
||||
|
||||
final StringBuilder buider = new StringBuilder();
|
||||
append(buider, "hour", preHours / 60);
|
||||
append(buider, "minute", minutes);
|
||||
append(buider, "second", seconds);
|
||||
return buider.toString();
|
||||
}
|
||||
|
||||
private void append(final StringBuilder builder, final String timeUnit, final int time) {
|
||||
if (time == 0) return;
|
||||
if (builder.length() != 0) {
|
||||
builder.append(' ');
|
||||
}
|
||||
builder.append(time).append(' ').append(settings.language.getString(time == 1 ? timeUnit : timeUnit + "s"));
|
||||
}
|
||||
|
||||
public void startMaintenanceRunnable(final Duration duration, final boolean enable) {
|
||||
runnable = new MaintenanceRunnable(this, settings, (int) duration.getSeconds(), enable);
|
||||
// Save the endtimer to be able to continue it after a server stop
|
||||
if (settings.isSaveEndtimerOnStop() && !runnable.shouldEnable()) {
|
||||
settings.setSavedEndtimer(System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(runnable.getSecondsLeft()));
|
||||
}
|
||||
}
|
||||
|
||||
public void scheduleMaintenanceRunnable(final Duration enableIn, final Duration maintenanceDuration) {
|
||||
runnable = new MaintenanceScheduleRunnable(this, settings, (int) enableIn.getSeconds(), (int) maintenanceDuration.getSeconds());
|
||||
}
|
||||
|
||||
public boolean updateAvailable() {
|
||||
try {
|
||||
checkNewestVersion();
|
||||
return version.compareTo(newestVersion) < 0;
|
||||
} catch (final Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected void continueLastEndtimer() {
|
||||
if (!settings.isSaveEndtimerOnStop()) return;
|
||||
if (settings.getSavedEndtimer() == 0) return;
|
||||
|
||||
final long current = System.currentTimeMillis();
|
||||
getLogger().info("Found interrupted endtimer from last uptime...");
|
||||
if (!isMaintenance()) {
|
||||
getLogger().info("Maintenance has already been disabled, thus the timer has been cancelled.");
|
||||
settings.setSavedEndtimer(0);
|
||||
} else if (settings.getSavedEndtimer() < current) {
|
||||
getLogger().info("The endtimer has already expired, maintenance has been disabled.");
|
||||
setMaintenance(false);
|
||||
settings.setSavedEndtimer(0);
|
||||
} else {
|
||||
startMaintenanceRunnable(Duration.ofMillis(settings.getSavedEndtimer() - current), false);
|
||||
getLogger().info("The timer has been continued - maintenance will be disabled in: " + getTimerMessage());
|
||||
}
|
||||
}
|
||||
|
||||
protected void sendEnableMessage() {
|
||||
if (!settings.hasUpdateChecks()) return;
|
||||
async(() -> {
|
||||
try {
|
||||
checkNewestVersion();
|
||||
} catch (final Exception e) {
|
||||
return;
|
||||
}
|
||||
|
||||
final int compare = version.compareTo(newestVersion);
|
||||
if (compare < 0) {
|
||||
getLogger().warning("Newest version available: Version " + newestVersion + ", you're on " + version);
|
||||
} else if (compare > 0) {
|
||||
if (version.getTag().equalsIgnoreCase("snapshot")) {
|
||||
getLogger().info("You're running a development version, please report bugs on the Discord server (https://discord.gg/vGCUzHq) or the GitHub issue tracker (https://github.com/kennytv/Maintenance/issues)");
|
||||
} else {
|
||||
getLogger().info("You're running a version, that doesn't exist!");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public boolean installUpdate() throws Exception {
|
||||
// Sponge and Velocity need their own jar
|
||||
final String platformInfix = serverType == ServerType.VELOCITY ? "Velocity-" : serverType == ServerType.SPONGE ? "Sponge-" : "";
|
||||
final String fileName = "Maintenance-" + platformInfix + newestVersion + ".jar";
|
||||
final Path tempFilePath = Paths.get(getPluginFolder() + "Maintenance.tmp");
|
||||
final URLConnection connection = new URL("https://github.com/kennytv/Maintenance/releases/download/" + newestVersion + "/" + fileName).openConnection();
|
||||
try (final BufferedInputStream is = new BufferedInputStream(connection.getInputStream());
|
||||
final BufferedOutputStream os = new BufferedOutputStream(Files.newOutputStream(tempFilePath))) {
|
||||
writeFile(is, os);
|
||||
}
|
||||
|
||||
final File file = tempFilePath.toFile();
|
||||
final long newlength = file.length();
|
||||
if (newlength < 10_000) {
|
||||
// Sanity check the file length
|
||||
file.delete();
|
||||
return false;
|
||||
}
|
||||
|
||||
try (final InputStream is = Files.newInputStream(file.toPath());
|
||||
final BufferedOutputStream os = new BufferedOutputStream(Files.newOutputStream(getPluginFile().toPath()))) {
|
||||
writeFile(is, os);
|
||||
}
|
||||
|
||||
file.delete();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void writeFile(final InputStream is, final OutputStream os) throws IOException {
|
||||
final byte[] chunk = new byte[1024];
|
||||
int chunkSize;
|
||||
while ((chunkSize = is.read(chunk)) != -1) {
|
||||
os.write(chunk, 0, chunkSize);
|
||||
}
|
||||
}
|
||||
|
||||
private void checkNewestVersion() throws Exception {
|
||||
final URLConnection connection = new URL("https://hangar.papermc.io/api/v1/projects/Maintenance/latestrelease").openConnection();
|
||||
connection.setRequestProperty("User-Agent", "Maintenance/" + getVersion());
|
||||
try (final BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
|
||||
final String newVersionString = reader.readLine();
|
||||
final Version newVersion = new Version(newVersionString);
|
||||
if (!newVersion.equals(version)) {
|
||||
newestVersion = newVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String pasteDump() {
|
||||
final MaintenanceDump dump = new MaintenanceDump(this, settings);
|
||||
try {
|
||||
final HttpURLConnection connection = (HttpURLConnection) new URL("https://api.pastes.dev/post").openConnection();
|
||||
connection.setDoOutput(true);
|
||||
connection.setRequestMethod("POST");
|
||||
connection.setRequestProperty("User-Agent", "Maintenance/" + getVersion());
|
||||
connection.setRequestProperty("Content-Type", "text/plain");
|
||||
|
||||
try (final OutputStream out = connection.getOutputStream()) {
|
||||
out.write(new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create().toJson(dump).getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
|
||||
if (connection.getResponseCode() == 503) {
|
||||
getLogger().warning("Could not paste dump, pastes.dev down?");
|
||||
return null;
|
||||
}
|
||||
|
||||
try (final InputStream in = connection.getInputStream()) {
|
||||
final String output = CharStreams.toString(new InputStreamReader(in));
|
||||
final JsonObject jsonOutput = GSON.fromJson(output, JsonObject.class);
|
||||
if (!jsonOutput.has("key")) {
|
||||
getLogger().log(Level.WARNING, "Could not paste dump, there was no key returned :(");
|
||||
return null;
|
||||
}
|
||||
|
||||
return jsonOutput.get("key").getAsString();
|
||||
}
|
||||
} catch (final IOException e) {
|
||||
getLogger().log(Level.WARNING, "Could not paste dump :(", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void loadMaintenanceIcon() {
|
||||
final File file = new File(getDataFolder(), "maintenance-icon.png");
|
||||
if (!file.exists()) {
|
||||
getLogger().warning("Could not find a 'maintenance-icon.png' file - did you create one in the plugin's folder?");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
loadIcon(file);
|
||||
} catch (final Exception e) {
|
||||
getLogger().log(Level.WARNING, "Could not load the 'maintenance-icon.png' file!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void cancelTask() {
|
||||
if (settings.isSaveEndtimerOnStop() && !runnable.shouldEnable()) {
|
||||
settings.setSavedEndtimer(0);
|
||||
}
|
||||
|
||||
runnable.getTask().cancel();
|
||||
runnable = null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public UUID checkUUID(final SenderInfo sender, final String s) {
|
||||
final UUID uuid;
|
||||
try {
|
||||
uuid = UUID.fromString(s);
|
||||
} catch (final Exception e) {
|
||||
sender.send(settings.getMessage("invalidUuid"));
|
||||
return null;
|
||||
}
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public String[] removeArrayIndex(final String[] args, final int index) {
|
||||
final List<String> argsList = Lists.newArrayList(args);
|
||||
argsList.remove(index);
|
||||
return argsList.toArray(new String[0]);
|
||||
}
|
||||
|
||||
public boolean isNumeric(final String string) {
|
||||
return INT_PATTERN.matcher(string).matches();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMaintenance() {
|
||||
return settings.isMaintenance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTaskRunning() {
|
||||
return runnable != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Settings getSettings() {
|
||||
return settings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventManager getEventManager() {
|
||||
return eventManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return version.toString();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public List<String> getMaintenanceServersDump() {
|
||||
return isMaintenance() ? Arrays.asList("global") : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDebug() {
|
||||
return debug;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDebug(final boolean debug) {
|
||||
this.debug = debug;
|
||||
}
|
||||
|
||||
public int getSaltLevel() {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
public Version getNewestVersion() {
|
||||
return newestVersion;
|
||||
}
|
||||
|
||||
public Component prefix() {
|
||||
return prefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see #isTaskRunning()
|
||||
*/
|
||||
@Nullable
|
||||
public MaintenanceRunnable getRunnable() {
|
||||
return runnable;
|
||||
}
|
||||
|
||||
public MaintenanceCommand getCommandManager() {
|
||||
return commandManager;
|
||||
}
|
||||
|
||||
public ServerType getServerType() {
|
||||
return serverType;
|
||||
}
|
||||
|
||||
protected String getPluginFolder() {
|
||||
return "plugins/";
|
||||
}
|
||||
|
||||
public abstract void async(Runnable runnable);
|
||||
|
||||
protected abstract void executeConsoleCommand(String command);
|
||||
|
||||
public abstract void broadcast(Component component);
|
||||
|
||||
public abstract Task startMaintenanceRunnable(Runnable runnable);
|
||||
|
||||
/**
|
||||
* Gets the offline sender info of a player.
|
||||
* This method may do a web lookup.
|
||||
*
|
||||
* @param name name of the player
|
||||
*/
|
||||
public abstract CompletableFuture<@Nullable SenderInfo> getOfflinePlayer(String name);
|
||||
|
||||
public abstract CompletableFuture<@Nullable SenderInfo> getOfflinePlayer(UUID uuid);
|
||||
|
||||
public abstract File getDataFolder();
|
||||
|
||||
@Nullable
|
||||
public InputStream getResource(final String name) {
|
||||
return this.getClass().getClassLoader().getResourceAsStream(name);
|
||||
}
|
||||
|
||||
public abstract Logger getLogger();
|
||||
|
||||
public abstract String getServerVersion();
|
||||
|
||||
public abstract List<PluginDump> getPlugins();
|
||||
|
||||
protected abstract void loadIcon(File file) throws Exception;
|
||||
|
||||
protected abstract void kickPlayers();
|
||||
|
||||
protected abstract File getPluginFile();
|
||||
|
||||
protected abstract int getOnlinePlayers();
|
||||
|
||||
protected abstract int getMaxPlayers();
|
||||
}
|
||||
@@ -1,616 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core;
|
||||
|
||||
import eu.kennytv.maintenance.api.event.MaintenanceReloadedEvent;
|
||||
import eu.kennytv.maintenance.core.config.Config;
|
||||
import eu.kennytv.maintenance.core.config.ConfigSection;
|
||||
import eu.kennytv.maintenance.core.util.ServerType;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.TextComponent;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.minimessage.MiniMessage;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.logging.Level;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class Settings implements eu.kennytv.maintenance.api.Settings {
|
||||
public static final String NEW_LINE_REPLACEMENT = "<br>";
|
||||
private static final int CONFIG_VERSION = 9;
|
||||
private static final int LANGUAGE_VERSION = 2;
|
||||
private static final Random RANDOM = new Random();
|
||||
protected final MaintenancePlugin plugin;
|
||||
private final Map<UUID, String> whitelistedPlayers = new HashMap<>();
|
||||
private final String[] unsupportedFields;
|
||||
protected boolean maintenance;
|
||||
private Set<Integer> broadcastIntervals;
|
||||
private List<String> pingMessages;
|
||||
private List<String> timerSpecificPingMessages;
|
||||
private List<String> commandsOnMaintenanceEnable;
|
||||
private List<String> commandsOnMaintenanceDisable;
|
||||
private String legacyParsedPlayerCountMessage;
|
||||
private String legacyParsedTimerPlayerCountMessage;
|
||||
private List<String> legacyParsedPlayerCountHoverLines;
|
||||
private List<String> legacyParsedTimerPlayerCountHoverLines;
|
||||
private String prefixString;
|
||||
private String languageName;
|
||||
private boolean enablePingMessages;
|
||||
private boolean customPlayerCountMessage;
|
||||
private boolean customPlayerCountHoverMessage;
|
||||
private boolean customMaintenanceIcon;
|
||||
private boolean joinNotifications;
|
||||
private boolean updateChecks;
|
||||
private boolean saveEndtimerOnStop;
|
||||
private boolean kickOnlinePlayers;
|
||||
private boolean debug;
|
||||
private long savedEndtimer;
|
||||
|
||||
protected Config config;
|
||||
protected Config language;
|
||||
protected Config whitelist;
|
||||
|
||||
public Settings(final MaintenancePlugin plugin, final String... unsupportedFields) {
|
||||
this.plugin = plugin;
|
||||
this.unsupportedFields = unsupportedFields;
|
||||
if (!plugin.getDataFolder().exists()) {
|
||||
updatePluginDirectory();
|
||||
plugin.getDataFolder().mkdirs();
|
||||
}
|
||||
|
||||
createFile("config.yml");
|
||||
createFile("WhitelistedPlayers.yml");
|
||||
|
||||
reloadConfigs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reloadConfigs() {
|
||||
try {
|
||||
config = new Config(new File(plugin.getDataFolder(), "config.yml"), unsupportedFields);
|
||||
config.load();
|
||||
config.resetAwesomeHeader();
|
||||
whitelist = new Config(new File(plugin.getDataFolder(), "WhitelistedPlayers.yml"));
|
||||
whitelist.load();
|
||||
} catch (final Exception e) {
|
||||
throw new RuntimeException("Unable to load Maintenance files - probably a malformed config file", e);
|
||||
}
|
||||
|
||||
loadSettings();
|
||||
createLanguageFile();
|
||||
|
||||
try {
|
||||
language = new Config(new File(plugin.getDataFolder(), "language-" + languageName + ".yml"));
|
||||
language.load();
|
||||
} catch (final IOException e) {
|
||||
throw new RuntimeException("Unable to load Maintenance language file - probably a malformed file", e);
|
||||
}
|
||||
|
||||
try {
|
||||
updateLanguageFile();
|
||||
} catch (final IOException e) {
|
||||
plugin.getLogger().log(Level.SEVERE, "Couldn't update language file", e);
|
||||
}
|
||||
|
||||
prefixString = language.getString("prefix");
|
||||
|
||||
plugin.getEventManager().callEvent(new MaintenanceReloadedEvent());
|
||||
}
|
||||
|
||||
public void saveConfig() {
|
||||
try {
|
||||
config.save();
|
||||
} catch (final IOException e) {
|
||||
plugin.getLogger().log(Level.SEVERE, "Couldn't save the config file!", e);
|
||||
}
|
||||
}
|
||||
|
||||
// Public, as it is used in the MaintenanceAddon
|
||||
public void createFile(final String name) {
|
||||
createFile(name, name);
|
||||
}
|
||||
|
||||
private void createFile(final String name, final String from) {
|
||||
final File file = new File(plugin.getDataFolder(), name);
|
||||
if (!file.exists()) {
|
||||
try (final InputStream in = plugin.getResource(from)) {
|
||||
Files.copy(in, file.toPath());
|
||||
} catch (final IOException e) {
|
||||
throw new RuntimeException("Unable to create " + name + " file for Maintenance!", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void saveWhitelistedPlayers() {
|
||||
try {
|
||||
whitelist.save();
|
||||
} catch (final IOException e) {
|
||||
plugin.getLogger().log(Level.SEVERE, "Couldn't save the whitelisted players file!", e);
|
||||
}
|
||||
}
|
||||
|
||||
private void createLanguageFile() {
|
||||
final String fileName = "language-" + languageName + ".yml";
|
||||
final File file = new File(plugin.getDataFolder(), fileName);
|
||||
if (file.exists()) return;
|
||||
|
||||
try (final InputStream in = plugin.getResource(fileName)) {
|
||||
Files.copy(in, file.toPath());
|
||||
} catch (final IOException e) {
|
||||
plugin.getLogger().warning("Unable to provide language " + languageName);
|
||||
// Fall back to English language (if not already selected)
|
||||
if (!languageName.equals("en")) {
|
||||
plugin.getLogger().warning("Falling back to default language: en");
|
||||
languageName = "en";
|
||||
createLanguageFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void loadSettings() {
|
||||
updateConfig();
|
||||
|
||||
final ConfigSection pingMessageSection = config.getSection("ping-message");
|
||||
enablePingMessages = pingMessageSection.getBoolean("enabled", true);
|
||||
// Can't store this pre-parsed as components because gradients will break replacements
|
||||
pingMessages = loadPingMessages(pingMessageSection.getStringList("messages"));
|
||||
if (pingMessageSection.getBoolean("enable-timer-specific-messages")) {
|
||||
timerSpecificPingMessages = loadPingMessages(pingMessageSection.getStringList("timer-messages"));
|
||||
} else {
|
||||
timerSpecificPingMessages = null;
|
||||
}
|
||||
|
||||
maintenance = config.getBoolean("maintenance-enabled");
|
||||
commandsOnMaintenanceEnable = config.getStringList("commands-on-maintenance-enable");
|
||||
commandsOnMaintenanceDisable = config.getStringList("commands-on-maintenance-disable");
|
||||
customMaintenanceIcon = config.getBoolean("custom-maintenance-icon");
|
||||
joinNotifications = config.getBoolean("send-join-notification");
|
||||
broadcastIntervals = new HashSet<>(config.getIntList("timer-broadcast-for-seconds"));
|
||||
|
||||
// Player count and player list hover messages are only accepted and rendered as legacy chat
|
||||
if (plugin.getServerType() != ServerType.SPONGE) {
|
||||
final ConfigSection playerCountMessageSection = config.getSection("player-count-message");
|
||||
customPlayerCountMessage = playerCountMessageSection.getBoolean("enabled");
|
||||
legacyParsedPlayerCountMessage = toLegacy(parse(getConfigMessage(playerCountMessageSection, "message")));
|
||||
if (playerCountMessageSection.getBoolean("enable-timer-specific-message")) {
|
||||
legacyParsedTimerPlayerCountMessage = toLegacy(parse(getConfigMessage(playerCountMessageSection, "timer-message")));
|
||||
} else {
|
||||
legacyParsedTimerPlayerCountMessage = null;
|
||||
}
|
||||
}
|
||||
|
||||
final ConfigSection listHoverMessageSection = config.getSection("player-list-hover-message");
|
||||
customPlayerCountHoverMessage = listHoverMessageSection.getBoolean("enabled");
|
||||
legacyParsedPlayerCountHoverLines = new ArrayList<>();
|
||||
for (final String line : listHoverMessageSection.getString("message").split("<br>")) {
|
||||
legacyParsedPlayerCountHoverLines.add(toLegacy(parse(line)));
|
||||
}
|
||||
if (listHoverMessageSection.getBoolean("enable-timer-specific-message")) {
|
||||
legacyParsedTimerPlayerCountHoverLines = new ArrayList<>();
|
||||
for (final String line : listHoverMessageSection.getString("timer-message").split("<br>")) {
|
||||
legacyParsedTimerPlayerCountHoverLines.add(toLegacy(parse(line)));
|
||||
}
|
||||
} else {
|
||||
legacyParsedTimerPlayerCountHoverLines = null;
|
||||
}
|
||||
|
||||
languageName = config.getString("language").toLowerCase();
|
||||
kickOnlinePlayers = config.getBoolean("kick-online-players", true);
|
||||
updateChecks = config.getBoolean("update-checks", true);
|
||||
debug = config.getBoolean("debug");
|
||||
|
||||
final ConfigSection section = config.getSection("continue-endtimer-after-restart");
|
||||
saveEndtimerOnStop = section.getBoolean("enabled");
|
||||
savedEndtimer = section.getLong("end");
|
||||
|
||||
if (customMaintenanceIcon) {
|
||||
plugin.loadMaintenanceIcon();
|
||||
}
|
||||
|
||||
whitelistedPlayers.clear();
|
||||
for (final Map.Entry<String, Object> entry : whitelist.getValues().entrySet()) {
|
||||
try {
|
||||
whitelistedPlayers.put(UUID.fromString(entry.getKey()), String.valueOf(entry.getValue()));
|
||||
} catch (final IllegalArgumentException e) {
|
||||
plugin.getLogger().warning("Invalid WhitelistedPlayers entry: " + entry.getKey());
|
||||
}
|
||||
}
|
||||
|
||||
loadExtraSettings();
|
||||
}
|
||||
|
||||
private void updatePluginDirectory() {
|
||||
// All plugin identifiers were changed to 'Maintenance' ('maintenance' for Sponge and Velocity) in 3.0.5
|
||||
String oldDirName = "Maintenance" + plugin.getServerType();
|
||||
if (plugin.getServerType() == ServerType.SPONGE || plugin.getServerType() == ServerType.VELOCITY) {
|
||||
oldDirName = oldDirName.toLowerCase(Locale.ROOT);
|
||||
} else if (plugin.getServerType() == ServerType.SPIGOT) {
|
||||
oldDirName = "MaintenanceSpigot";
|
||||
}
|
||||
|
||||
final File oldDir = new File(plugin.getDataFolder().getParentFile(), oldDirName);
|
||||
if (!oldDir.exists()) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
Files.move(oldDir.toPath(), plugin.getDataFolder().toPath());
|
||||
plugin.getLogger().info("Moved old " + oldDirName + " to new " + plugin.getDataFolder().getName() + " directory!");
|
||||
} catch (final IOException e) {
|
||||
plugin.getLogger().log(Level.SEVERE, "Error while copying " + oldDirName + " to new " + plugin.getDataFolder().getName() + " directory!", e);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateConfig() {
|
||||
final int version = config.getInt("config-version");
|
||||
if (version != CONFIG_VERSION) {
|
||||
plugin.getLogger().info("Updating config to the latest version...");
|
||||
if (version < 6) {
|
||||
// Legacy text to MiniMessage
|
||||
config.getStringList("pingmessages").replaceAll(this::legacyToMinimessage);
|
||||
config.getStringList("timerspecific-pingmessages").replaceAll(this::legacyToMinimessage);
|
||||
config.set("playercounthovermessage", legacyToMinimessage(config.getString("playercounthovermessage")));
|
||||
config.set("playercountmessage", legacyToMinimessage(config.getString("playercountmessage")));
|
||||
}
|
||||
if (version < 9) {
|
||||
config.move("enable-pingmessages", "ping-message.enabled");
|
||||
config.move("pingmessages", "ping-message.messages");
|
||||
config.move("enable-timerspecific-messages", "ping-message.enable-timer-specific-messages");
|
||||
config.move("timerspecific-pingmessages", "ping-message.timer-messages");
|
||||
|
||||
config.move("enable-playercountmessage", "player-count-message.enabled");
|
||||
config.move("playercountmessage", "player-count-message.message");
|
||||
|
||||
config.move("enable-playercounthovermessage", "player-list-hover-message.enabled");
|
||||
config.move("playercounthovermessage", "player-list-hover-message.message");
|
||||
}
|
||||
|
||||
createFile("config-new.yml", "config.yml");
|
||||
final File file = new File(plugin.getDataFolder(), "config-new.yml");
|
||||
final Config tempConfig = new Config(file, unsupportedFields);
|
||||
try {
|
||||
tempConfig.load();
|
||||
} catch (final IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
config.addMissingFields(tempConfig);
|
||||
config.replaceComments(tempConfig);
|
||||
config.set("config-version", CONFIG_VERSION);
|
||||
|
||||
file.delete();
|
||||
tempConfig.clear();
|
||||
|
||||
saveConfig();
|
||||
plugin.getLogger().info("Done! Updated config!");
|
||||
}
|
||||
}
|
||||
|
||||
private void updateLanguageFile() throws IOException {
|
||||
final int version = language.getInt("language-version");
|
||||
if (version == LANGUAGE_VERSION) {
|
||||
return;
|
||||
}
|
||||
|
||||
plugin.getLogger().info("Updating language file to the latest version...");
|
||||
if (version < 1) {
|
||||
for (final Map.Entry<String, Object> entry : language.getValues().entrySet()) {
|
||||
if (!(entry.getValue() instanceof String)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
String value = (String) entry.getValue();
|
||||
value = value.replace("&8[&eMaintenance&8] ", "<prefix>");
|
||||
value = legacyToMinimessage(value);
|
||||
value = value.replace("%NEWLINE%", NEW_LINE_REPLACEMENT);
|
||||
language.set(entry.getKey(), value);
|
||||
}
|
||||
}
|
||||
|
||||
final String filePrefix = "language-" + languageName;
|
||||
createFile(filePrefix + "-new.yml", filePrefix + ".yml");
|
||||
|
||||
final File file = new File(plugin.getDataFolder(), filePrefix + "-new.yml");
|
||||
final Config tempConfig = new Config(file);
|
||||
try {
|
||||
tempConfig.load();
|
||||
} finally {
|
||||
file.delete();
|
||||
}
|
||||
|
||||
language.addMissingFields(tempConfig);
|
||||
language.replaceComments(tempConfig);
|
||||
tempConfig.clear();
|
||||
|
||||
language.set("language-version", LANGUAGE_VERSION);
|
||||
|
||||
language.save();
|
||||
plugin.getLogger().info("Updated language file!");
|
||||
}
|
||||
|
||||
private String legacyToMinimessage(final String s) {
|
||||
final TextComponent component = LegacyComponentSerializer.legacyAmpersand().deserialize(s);
|
||||
final String serialized = MiniMessage.miniMessage().serialize(component);
|
||||
//TODO hack to remove explicit closing until fixed in MM
|
||||
return serialized.replaceAll("</[a-z_]+>", "");
|
||||
}
|
||||
|
||||
private String getConfigMessage(final ConfigSection section, final String path) {
|
||||
final String s = section.getString(path);
|
||||
if (s == null) {
|
||||
plugin.getLogger().warning("The config file is missing the following string: " + path);
|
||||
return path;
|
||||
}
|
||||
return replaceNewlineVar(s);
|
||||
}
|
||||
|
||||
public String getConfigMessage(final String path) {
|
||||
return getConfigMessage(config, path);
|
||||
}
|
||||
|
||||
public String getLanguageString(final String path, final String... replacements) {
|
||||
String s = language.getString(path);
|
||||
if (s == null) {
|
||||
plugin.getLogger().warning("The language file is missing the following string: " + path);
|
||||
return path;
|
||||
}
|
||||
if (replacements.length != 0) {
|
||||
if (replacements.length % 2 != 0) {
|
||||
throw new IllegalArgumentException("Invalid replacement count: " + replacements.length);
|
||||
}
|
||||
|
||||
for (int i = 0; i < replacements.length; i += 2) {
|
||||
final String key = replacements[i];
|
||||
s = s.replace(key, replacements[i + 1]);
|
||||
}
|
||||
}
|
||||
return replaceNewlineVar(s).replace("<prefix>", prefixString);
|
||||
}
|
||||
|
||||
public @Nullable String getLanguageStringOrNull(final String path, final String... replacements) {
|
||||
return language.contains(path) ? getLanguageString(path, replacements) : null;
|
||||
}
|
||||
|
||||
public Component getMessage(final String path, final String... replacements) {
|
||||
return parse(getLanguageString(path, replacements));
|
||||
}
|
||||
|
||||
// TODO Cache platform components if there are no replacements
|
||||
public Component getRandomPingMessage() {
|
||||
if (plugin.isTaskRunning() && !plugin.getRunnable().shouldEnable()
|
||||
&& hasTimerSpecificPingMessages() && !timerSpecificPingMessages.isEmpty()) {
|
||||
return getPingMessage(timerSpecificPingMessages);
|
||||
}
|
||||
return pingMessages.isEmpty() ? Component.empty() : getPingMessage(pingMessages);
|
||||
}
|
||||
|
||||
private Component getPingMessage(final List<String> list) {
|
||||
final String component = list.size() == 1 ? list.get(0) : list.get(RANDOM.nextInt(list.size()));
|
||||
return parse(plugin.replacePingVariables(component));
|
||||
}
|
||||
|
||||
private List<String> loadPingMessages(final List<String> list) {
|
||||
final List<String> components = new ArrayList<>(list.size());
|
||||
for (final String s : list) {
|
||||
components.add(replaceNewlineVar(s));
|
||||
}
|
||||
return components;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeWhitelistedPlayer(final UUID uuid) {
|
||||
if (whitelistedPlayers.remove(uuid) == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
whitelist.remove(uuid.toString());
|
||||
saveWhitelistedPlayers();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeWhitelistedPlayer(final String name) {
|
||||
UUID uuid = null;
|
||||
for (final Map.Entry<UUID, String> e : whitelistedPlayers.entrySet()) {
|
||||
if (e.getValue().equalsIgnoreCase(name)) {
|
||||
uuid = e.getKey();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (uuid == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
whitelistedPlayers.remove(uuid);
|
||||
whitelist.remove(uuid.toString());
|
||||
saveWhitelistedPlayers();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addWhitelistedPlayer(final UUID uuid, final String name) {
|
||||
final boolean added = whitelistedPlayers.put(uuid, name) == null;
|
||||
whitelist.set(uuid.toString(), name);
|
||||
saveWhitelistedPlayers();
|
||||
return added;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<UUID, String> getWhitelistedPlayers() {
|
||||
return whitelistedPlayers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWhitelisted(final UUID uuid) {
|
||||
return whitelistedPlayers.containsKey(uuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMaintenance() {
|
||||
return maintenance;
|
||||
}
|
||||
|
||||
public void setMaintenance(final boolean maintenance) {
|
||||
this.maintenance = maintenance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnablePingMessages() {
|
||||
return enablePingMessages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isJoinNotifications() {
|
||||
return joinNotifications;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomIcon() {
|
||||
return customMaintenanceIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean debugEnabled() {
|
||||
return debug;
|
||||
}
|
||||
|
||||
public boolean hasUpdateChecks() {
|
||||
return updateChecks;
|
||||
}
|
||||
|
||||
public boolean isSaveEndtimerOnStop() {
|
||||
return saveEndtimerOnStop;
|
||||
}
|
||||
|
||||
public boolean hasTimerSpecificPingMessages() {
|
||||
return timerSpecificPingMessages != null;
|
||||
}
|
||||
|
||||
public boolean isKickOnlinePlayers() {
|
||||
return kickOnlinePlayers;
|
||||
}
|
||||
|
||||
public long getSavedEndtimer() {
|
||||
return savedEndtimer;
|
||||
}
|
||||
|
||||
public void setSavedEndtimer(final long millis) {
|
||||
if (savedEndtimer == millis) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.savedEndtimer = millis;
|
||||
config.getSection("continue-endtimer-after-restart").set("end", millis);
|
||||
saveConfig();
|
||||
}
|
||||
|
||||
public Config getConfig() {
|
||||
return config;
|
||||
}
|
||||
|
||||
public List<String> getPingMessages() {
|
||||
return pingMessages;
|
||||
}
|
||||
|
||||
public List<String> getCommandsOnMaintenanceEnable() {
|
||||
return commandsOnMaintenanceEnable;
|
||||
}
|
||||
|
||||
public List<String> getCommandsOnMaintenanceDisable() {
|
||||
return commandsOnMaintenanceDisable;
|
||||
}
|
||||
|
||||
public @Nullable List<String> getTimerSpecificPingMessages() {
|
||||
return timerSpecificPingMessages;
|
||||
}
|
||||
|
||||
public Set<Integer> getBroadcastIntervals() {
|
||||
return broadcastIntervals;
|
||||
}
|
||||
|
||||
public String getLegacyParsedPlayerCountMessage() {
|
||||
final String message = timerDependent(legacyParsedPlayerCountMessage, legacyParsedTimerPlayerCountMessage);
|
||||
return plugin.replacePingVariables(message);
|
||||
}
|
||||
|
||||
public String[] getLegacyParsedPlayerCountHoverLines() {
|
||||
final List<String> lines = timerDependent(legacyParsedPlayerCountHoverLines, legacyParsedTimerPlayerCountHoverLines);
|
||||
final String[] parsedLines = new String[lines.size()];
|
||||
for (int i = 0; i < lines.size(); i++) {
|
||||
parsedLines[i] = plugin.replacePingVariables(lines.get(i));
|
||||
}
|
||||
return parsedLines;
|
||||
}
|
||||
|
||||
private <T> T timerDependent(final T normal, final @Nullable T timerSpecific) {
|
||||
return timerSpecific != null && plugin.isTaskRunning() && !plugin.getRunnable().shouldEnable() ? timerSpecific : normal;
|
||||
}
|
||||
|
||||
public Component getKickMessage() {
|
||||
return parse(plugin.replacePingVariables(getLanguageString("kickmessage")));
|
||||
}
|
||||
|
||||
public String getLanguage() {
|
||||
return languageName;
|
||||
}
|
||||
|
||||
public boolean hasCustomPlayerCountMessage() {
|
||||
return customPlayerCountMessage;
|
||||
}
|
||||
|
||||
public boolean hasCustomPlayerCountHoverMessage() {
|
||||
return customPlayerCountHoverMessage;
|
||||
}
|
||||
|
||||
protected Component parse(final String s) {
|
||||
return MiniMessage.miniMessage().deserialize(s);
|
||||
}
|
||||
|
||||
protected String toLegacy(final Component component) {
|
||||
return LegacyComponentSerializer.legacySection().serialize(component);
|
||||
}
|
||||
|
||||
/*
|
||||
* Note on why this even exists: Yaml will force save all strings containing line breaks '\n' in this rather chunky format:
|
||||
* key: |-
|
||||
* First line text
|
||||
* Second line text.
|
||||
* ...
|
||||
*
|
||||
* This also happens to string lists, making those practically unreadable (in particular the motd list), as well as confusing for most users in general.
|
||||
* Because of this, I replace <br> manually, to spare users from these ugly breaks (before I inevitably switch to a different configuration library).
|
||||
*/
|
||||
protected String replaceNewlineVar(final String s) {
|
||||
return s.replace(NEW_LINE_REPLACEMENT, "\n");
|
||||
}
|
||||
|
||||
protected void loadExtraSettings() {
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.command.subcommand;
|
||||
|
||||
import eu.kennytv.maintenance.core.MaintenancePlugin;
|
||||
import eu.kennytv.maintenance.core.command.CommandInfo;
|
||||
import eu.kennytv.maintenance.core.util.SenderInfo;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.TextComponent;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.event.ClickEvent;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.event.HoverEvent;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.format.NamedTextColor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public final class DumpCommand extends CommandInfo {
|
||||
private long lastDump;
|
||||
|
||||
public DumpCommand(final MaintenancePlugin plugin) {
|
||||
super(plugin, "dump");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(final SenderInfo sender, final String[] args) {
|
||||
if (checkArgs(sender, args, 1)) return;
|
||||
if (System.currentTimeMillis() - lastDump < TimeUnit.MINUTES.toMillis(5)) {
|
||||
sender.sendPrefixedRich("<red>You can only create a dump every 5 minutes!");
|
||||
return;
|
||||
}
|
||||
|
||||
lastDump = System.currentTimeMillis();
|
||||
sender.sendPrefixedRich("<gray>The dump is being created, this might take a moment.");
|
||||
plugin.async(() -> {
|
||||
final String key = plugin.pasteDump();
|
||||
if (key == null) {
|
||||
if (sender.isPlayer()) {
|
||||
sender.sendPrefixedRich("<red>Could not paste dump (see the console for details)");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
final String url = "https://pastes.dev/" + key;
|
||||
sender.sendPrefixedRich("<red><click:open_url:'" + url + "'>" + url + "</click>");
|
||||
if (sender.isPlayer()) {
|
||||
final TextComponent text = Component.text().content("Click here to copy the link").color(NamedTextColor.GRAY)
|
||||
.clickEvent(ClickEvent.clickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, url))
|
||||
.hoverEvent(HoverEvent.showText(Component.text("Click here to copy the link to your clipboard").color(NamedTextColor.GREEN)))
|
||||
.build();
|
||||
sender.send(plugin.prefix().append(text));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.command.subcommand;
|
||||
|
||||
import eu.kennytv.maintenance.core.MaintenancePlugin;
|
||||
import eu.kennytv.maintenance.core.command.CommandInfo;
|
||||
import eu.kennytv.maintenance.core.util.SenderInfo;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public final class MotdCommand extends CommandInfo {
|
||||
|
||||
public MotdCommand(final MaintenancePlugin plugin) {
|
||||
super(plugin, "motd");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(final SenderInfo sender, final String[] args) {
|
||||
if (args.length == 1) {
|
||||
sendList(sender, getSettings().getPingMessages());
|
||||
} else if (args.length == 2 && args[1].equalsIgnoreCase("timer")) {
|
||||
if (!getSettings().hasTimerSpecificPingMessages()) {
|
||||
sender.send(getMessage("timerMotdDisabled"));
|
||||
return;
|
||||
}
|
||||
|
||||
sendList(sender, getSettings().getTimerSpecificPingMessages());
|
||||
} else {
|
||||
sender.send(getHelpMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private void sendList(final SenderInfo sender, final List<String> list) {
|
||||
if (list == null || list.isEmpty()) {
|
||||
sender.send(getMessage("motdListEmpty"));
|
||||
return;
|
||||
}
|
||||
|
||||
sender.send(getMessage("motdList"));
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
sender.sendRich("<aqua>" + (i + 1) + "<dark_gray><st>---------");
|
||||
sender.sendRich(list.get(i));
|
||||
}
|
||||
sender.sendRich("<dark_gray><st>----------");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompletion(final SenderInfo sender, final String[] args) {
|
||||
if (args.length != 2 || !getSettings().hasTimerSpecificPingMessages()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return Collections.singletonList("timer");
|
||||
}
|
||||
}
|
||||
-90
@@ -1,90 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.command.subcommand;
|
||||
|
||||
import eu.kennytv.maintenance.core.MaintenancePlugin;
|
||||
import eu.kennytv.maintenance.core.Settings;
|
||||
import eu.kennytv.maintenance.core.command.CommandInfo;
|
||||
import eu.kennytv.maintenance.core.config.ConfigSection;
|
||||
import eu.kennytv.maintenance.core.util.SenderInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public final class RemoveMotdCommand extends CommandInfo {
|
||||
|
||||
public RemoveMotdCommand(final MaintenancePlugin plugin) {
|
||||
super(plugin, "setmotd");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(final SenderInfo sender, String[] args) {
|
||||
boolean timerPingMessages = false;
|
||||
if (args.length == 3 && args[1].equalsIgnoreCase("timer")) {
|
||||
if (!getSettings().hasTimerSpecificPingMessages()) {
|
||||
sender.send(getMessage("timerMotdDisabled"));
|
||||
return;
|
||||
}
|
||||
|
||||
args = plugin.removeArrayIndex(args, 1);
|
||||
timerPingMessages = true;
|
||||
}
|
||||
if (checkArgs(sender, args, 2)) return;
|
||||
if (!plugin.isNumeric(args[1])) {
|
||||
sender.send(getHelpMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
final Settings settings = getSettings();
|
||||
final ConfigSection section = settings.getConfig().getSection("ping-message");
|
||||
final List<String> pingMessages = section.getStringList(timerPingMessages ? "timer-messages" : "messages");
|
||||
if (pingMessages.size() < 2) {
|
||||
sender.send(getMessage("removeMotdError"));
|
||||
return;
|
||||
}
|
||||
|
||||
final int index = Integer.parseInt(args[1]);
|
||||
if (index == 0 || index > pingMessages.size()) {
|
||||
sender.send(getMessage("setMotdIndexError",
|
||||
"%MOTDS%", Integer.toString(pingMessages.size()),
|
||||
"%NEWAMOUNT%", Integer.toString(pingMessages.size())));
|
||||
return;
|
||||
}
|
||||
|
||||
final List<String> pingComponents = timerPingMessages ? settings.getTimerSpecificPingMessages() : settings.getPingMessages();
|
||||
pingComponents.remove(index - 1);
|
||||
pingMessages.remove(index - 1);
|
||||
section.set(timerPingMessages ? "timer-messages" : "messages", pingMessages);
|
||||
settings.saveConfig();
|
||||
sender.send(getMessage("removedMotd", "%INDEX%", args[1]));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompletion(final SenderInfo sender, final String[] args) {
|
||||
if (args.length == 2 || (args.length == 3 && args[1].equalsIgnoreCase("timer"))) {
|
||||
final int size = (args.length == 3 ? plugin.getSettings().getTimerSpecificPingMessages() : plugin.getSettings().getPingMessages()).size();
|
||||
final List<String> list = new ArrayList<>(size);
|
||||
for (int i = 1; i <= size; i++) {
|
||||
list.add(Integer.toString(i));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.command.subcommand;
|
||||
|
||||
import eu.kennytv.maintenance.core.MaintenancePlugin;
|
||||
import eu.kennytv.maintenance.core.command.CommandInfo;
|
||||
import eu.kennytv.maintenance.core.util.SenderInfo;
|
||||
import java.time.Duration;
|
||||
|
||||
public final class ScheduleTimerCommand extends CommandInfo {
|
||||
|
||||
public ScheduleTimerCommand(final MaintenancePlugin plugin) {
|
||||
super(plugin, "timer");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(final SenderInfo sender, final String[] args) {
|
||||
if (checkArgs(sender, args, 3)) return;
|
||||
|
||||
final Duration enableIn = plugin.getCommandManager().parseDurationAndCheckTask(sender, args[1]);
|
||||
final Duration maintenanceDuration = plugin.getCommandManager().parseDurationAndCheckTask(sender, args[2], false);
|
||||
if (enableIn == null || maintenanceDuration == null) {
|
||||
sender.send(getHelpMessage());
|
||||
return;
|
||||
}
|
||||
if (plugin.isMaintenance()) {
|
||||
sender.send(getMessage("alreadyEnabled"));
|
||||
return;
|
||||
}
|
||||
|
||||
plugin.scheduleMaintenanceRunnable(enableIn, maintenanceDuration);
|
||||
sender.send(getMessage(
|
||||
"scheduletimerStarted",
|
||||
"%TIME%", plugin.getRunnable().getTime(),
|
||||
"%DURATION%", plugin.getFormattedTime((int) maintenanceDuration.getSeconds())
|
||||
));
|
||||
}
|
||||
}
|
||||
-127
@@ -1,127 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.command.subcommand;
|
||||
|
||||
import eu.kennytv.maintenance.core.MaintenancePlugin;
|
||||
import eu.kennytv.maintenance.core.Settings;
|
||||
import eu.kennytv.maintenance.core.command.CommandInfo;
|
||||
import eu.kennytv.maintenance.core.config.ConfigSection;
|
||||
import eu.kennytv.maintenance.core.util.SenderInfo;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static eu.kennytv.maintenance.core.Settings.NEW_LINE_REPLACEMENT;
|
||||
|
||||
public final class SetMotdCommand extends CommandInfo {
|
||||
|
||||
public SetMotdCommand(final MaintenancePlugin plugin) {
|
||||
super(plugin, "setmotd");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(final SenderInfo sender, String[] args) {
|
||||
boolean timerPingMessages = false;
|
||||
if (args.length > 1 && args[1].equalsIgnoreCase("timer")) {
|
||||
if (!getSettings().hasTimerSpecificPingMessages()) {
|
||||
sender.send(getMessage("timerMotdDisabled"));
|
||||
return;
|
||||
}
|
||||
|
||||
// remove the "timer" off the args to keep the rest the code cleaner
|
||||
args = plugin.removeArrayIndex(args, 1);
|
||||
timerPingMessages = true;
|
||||
}
|
||||
if (args.length < 4 || !plugin.isNumeric(args[1])) {
|
||||
sender.send(getHelpMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
final Settings settings = getSettings();
|
||||
final List<String> pingComponents = timerPingMessages ? settings.getTimerSpecificPingMessages() : settings.getPingMessages();
|
||||
final ConfigSection section = settings.getConfig().getSection("ping-message");
|
||||
final List<String> pingMessages = section.getStringList(timerPingMessages ? "timer-messages" : "messages");
|
||||
final int index = Integer.parseInt(args[1]);
|
||||
if (index == 0 || index > pingMessages.size() + 1) {
|
||||
sender.send(getMessage("setMotdIndexError",
|
||||
"%MOTDS%", Integer.toString(pingMessages.size()),
|
||||
"%NEWAMOUNT%", Integer.toString(pingMessages.size() + 1)));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!plugin.isNumeric(args[2])) {
|
||||
sender.send(getMessage("setMotdLineError"));
|
||||
return;
|
||||
}
|
||||
|
||||
final int line = Integer.parseInt(args[2]);
|
||||
if (line != 1 && line != 2) {
|
||||
sender.send(getMessage("setMotdLineError"));
|
||||
return;
|
||||
}
|
||||
|
||||
final String message = String.join(" ", Arrays.copyOfRange(args, 3, args.length));
|
||||
final String oldMessage = index > pingMessages.size() ? "" : pingMessages.get(index - 1);
|
||||
final String newMessage;
|
||||
if (line == 1) {
|
||||
newMessage = oldMessage.contains(NEW_LINE_REPLACEMENT) ?
|
||||
message + NEW_LINE_REPLACEMENT + oldMessage.split(NEW_LINE_REPLACEMENT, 2)[1] : message;
|
||||
} else {
|
||||
newMessage = oldMessage.contains(NEW_LINE_REPLACEMENT) ?
|
||||
oldMessage.split(NEW_LINE_REPLACEMENT, 2)[0] + NEW_LINE_REPLACEMENT + message : oldMessage + NEW_LINE_REPLACEMENT + message;
|
||||
}
|
||||
|
||||
// Replace component in config and the cached list
|
||||
final String componentString = newMessage.replace(NEW_LINE_REPLACEMENT, "\n");
|
||||
if (index > pingMessages.size()) {
|
||||
pingMessages.add(newMessage);
|
||||
pingComponents.add(componentString);
|
||||
} else {
|
||||
pingMessages.set(index - 1, newMessage);
|
||||
pingComponents.set(index - 1, componentString);
|
||||
}
|
||||
|
||||
section.set(timerPingMessages ? "timer-messages" : "messages", pingMessages);
|
||||
settings.saveConfig();
|
||||
sender.send(settings.getMessage(
|
||||
"setMotd",
|
||||
"%LINE%", args[2],
|
||||
"%INDEX%", args[1],
|
||||
"%MOTD%", componentString
|
||||
));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompletion(final SenderInfo sender, String[] args) {
|
||||
boolean timer = false;
|
||||
if (args.length > 1 && args[1].equalsIgnoreCase("timer")) {
|
||||
args = plugin.removeArrayIndex(args, 1);
|
||||
timer = true;
|
||||
}
|
||||
if (args.length == 3) return Arrays.asList("1", "2");
|
||||
if (args.length == 2) {
|
||||
final List<String> list = new ArrayList<>();
|
||||
for (int i = 1; i <= (timer ? getSettings().getTimerSpecificPingMessages() : getSettings().getPingMessages()).size() + 1; i++) {
|
||||
list.add(String.valueOf(i));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.command.subcommand;
|
||||
|
||||
import eu.kennytv.maintenance.core.MaintenancePlugin;
|
||||
import eu.kennytv.maintenance.core.command.CommandInfo;
|
||||
import eu.kennytv.maintenance.core.util.SenderInfo;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.event.ClickEvent;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.event.HoverEvent;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.format.NamedTextColor;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.minimessage.MiniMessage;
|
||||
|
||||
public final class UpdateCommand extends CommandInfo {
|
||||
|
||||
public UpdateCommand(final MaintenancePlugin plugin) {
|
||||
super(plugin, "update");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(final SenderInfo sender, final String[] args) {
|
||||
if (checkArgs(sender, args, 1)) return;
|
||||
if (args[0].equalsIgnoreCase("update")) {
|
||||
plugin.async(() -> checkForUpdate(sender));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!plugin.updateAvailable()) {
|
||||
sender.sendPrefixedRich("<green>You already have the latest version of the plugin!");
|
||||
return;
|
||||
}
|
||||
|
||||
sender.send(getMessage("updateDownloading"));
|
||||
try {
|
||||
if (plugin.installUpdate()) {
|
||||
sender.send(getMessage("updateFinished"));
|
||||
} else {
|
||||
sender.send(getMessage("updateFailed"));
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
sender.send(getMessage("updateFailed"));
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void checkForUpdate(final SenderInfo sender) {
|
||||
if (!plugin.updateAvailable()) {
|
||||
sender.sendPrefixedRich("<green>You already have the latest version of the plugin!");
|
||||
return;
|
||||
}
|
||||
|
||||
sender.sendPrefixedRich("<red>Newest version available: <green>Version " + plugin.getNewestVersion() + "<red>, you're on <green>" + plugin.getVersion());
|
||||
sender.sendPrefixedRich("<b><red>WARNING: <red>You will have to restart the server to prevent further issues and to complete the update! If you can't do that, don't update!");
|
||||
|
||||
sender.send(Component.text().append(MiniMessage.miniMessage().deserialize("<gold>× <dark_gray>[<green>Update<dark_gray>]"))
|
||||
.clickEvent(ClickEvent.runCommand("/maintenance forceupdate"))
|
||||
.hoverEvent(HoverEvent.showText(Component.text().content("Click here to update the plugin").color(NamedTextColor.GREEN)))
|
||||
.append(Component.text().content(", or manually run ").color(NamedTextColor.GRAY))
|
||||
.append(Component.text().content("/maintenance forceupdate").color(NamedTextColor.RED)).build());
|
||||
}
|
||||
}
|
||||
-108
@@ -1,108 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.command.subcommand;
|
||||
|
||||
import eu.kennytv.maintenance.core.MaintenancePlugin;
|
||||
import eu.kennytv.maintenance.core.command.CommandInfo;
|
||||
import eu.kennytv.maintenance.core.util.DummySenderInfo;
|
||||
import eu.kennytv.maintenance.core.util.SenderInfo;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public final class WhitelistAddCommand extends CommandInfo {
|
||||
|
||||
public WhitelistAddCommand(final MaintenancePlugin plugin) {
|
||||
super(plugin, "whitelist.add");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(final SenderInfo sender, final String[] args) {
|
||||
if (args.length == 2) {
|
||||
if (args[1].length() == 36) {
|
||||
final UUID uuid = plugin.checkUUID(sender, args[1]);
|
||||
if (uuid != null) {
|
||||
addPlayerToWhitelist(sender, uuid);
|
||||
}
|
||||
} else {
|
||||
addPlayerToWhitelist(sender, args[1]);
|
||||
}
|
||||
} else if (args.length == 3) {
|
||||
if (args[1].length() != 36) {
|
||||
sender.send(getHelpMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
final UUID uuid = plugin.checkUUID(sender, args[1]);
|
||||
if (uuid != null) {
|
||||
addPlayerToWhitelist(sender, new DummySenderInfo(uuid, args[2]));
|
||||
}
|
||||
} else {
|
||||
sender.send(getHelpMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompletion(final SenderInfo sender, final String[] args) {
|
||||
return args.length == 2 ? plugin.getCommandManager().getPlayersCompletion() : Collections.emptyList();
|
||||
}
|
||||
|
||||
private void addPlayerToWhitelist(final SenderInfo sender, final String name) {
|
||||
plugin.getOfflinePlayer(name).whenComplete((selected, ex) -> {
|
||||
if (ex != null) {
|
||||
plugin.getLogger().log(Level.SEVERE, "Error while fetching offline player", ex);
|
||||
sender.send(getMessage("offlinePlayerFetchError"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (selected == null) {
|
||||
sender.send(getMessage("playerNotOnline"));
|
||||
return;
|
||||
}
|
||||
|
||||
addPlayerToWhitelist(sender, selected);
|
||||
});
|
||||
}
|
||||
|
||||
private void addPlayerToWhitelist(final SenderInfo sender, final UUID uuid) {
|
||||
plugin.getOfflinePlayer(uuid).whenComplete((selected, ex) -> {
|
||||
if (ex != null) {
|
||||
plugin.getLogger().log(Level.SEVERE, "Error while fetching offline player", ex);
|
||||
sender.send(getMessage("offlinePlayerFetchError"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (selected == null) {
|
||||
sender.send(getMessage("playerNotFoundUuid"));
|
||||
return;
|
||||
}
|
||||
|
||||
addPlayerToWhitelist(sender, selected);
|
||||
});
|
||||
}
|
||||
|
||||
private void addPlayerToWhitelist(final SenderInfo sender, final SenderInfo selected) {
|
||||
if (getSettings().addWhitelistedPlayer(selected.getUuid(), selected.getName())) {
|
||||
sender.send(getMessage("whitelistAdded", "%PLAYER%", selected.getName()));
|
||||
} else {
|
||||
sender.send(getMessage("whitelistAlreadyAdded", "%PLAYER%", selected.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
-94
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.command.subcommand;
|
||||
|
||||
import eu.kennytv.maintenance.core.MaintenancePlugin;
|
||||
import eu.kennytv.maintenance.core.command.CommandInfo;
|
||||
import eu.kennytv.maintenance.core.util.SenderInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public final class WhitelistRemoveCommand extends CommandInfo {
|
||||
|
||||
public WhitelistRemoveCommand(final MaintenancePlugin plugin) {
|
||||
super(plugin, "whitelist.remove");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(final SenderInfo sender, final String[] args) {
|
||||
if (checkArgs(sender, args, 2)) return;
|
||||
if (args[1].length() == 36) {
|
||||
final UUID uuid = plugin.checkUUID(sender, args[1]);
|
||||
if (uuid != null) {
|
||||
removePlayerFromWhitelist(sender, uuid);
|
||||
}
|
||||
} else {
|
||||
removePlayerFromWhitelist(sender, args[1]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompletion(final SenderInfo sender, final String[] args) {
|
||||
if (args.length != 2) return Collections.emptyList();
|
||||
|
||||
final List<String> list = new ArrayList<>();
|
||||
String matchNameLowerCase = args[1].toLowerCase();
|
||||
for (final String name : getSettings().getWhitelistedPlayers().values()) {
|
||||
if (name.toLowerCase().startsWith(matchNameLowerCase)) {
|
||||
list.add(name);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private void removePlayerFromWhitelist(final SenderInfo sender, final String name) {
|
||||
plugin.getOfflinePlayer(name).whenComplete((selected, ex) -> {
|
||||
if (selected == null) {
|
||||
if (getSettings().removeWhitelistedPlayer(name)) {
|
||||
sender.send(getMessage("whitelistRemoved", "%PLAYER%", name));
|
||||
} else {
|
||||
sender.send(getMessage("whitelistNotFound"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
removePlayerFromWhitelist(sender, selected.getUuid(), selected.getName());
|
||||
});
|
||||
}
|
||||
|
||||
private void removePlayerFromWhitelist(final SenderInfo sender, final UUID uuid) {
|
||||
plugin.getOfflinePlayer(uuid).whenComplete((selected, ex) -> {
|
||||
if (selected == null) {
|
||||
removePlayerFromWhitelist(sender, uuid, uuid.toString());
|
||||
} else {
|
||||
removePlayerFromWhitelist(sender, selected.getUuid(), selected.getName());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void removePlayerFromWhitelist(final SenderInfo sender, final UUID uuid, final String toReplace) {
|
||||
if (getSettings().removeWhitelistedPlayer(uuid)) {
|
||||
sender.send(getMessage("whitelistRemoved", "%PLAYER%", toReplace));
|
||||
} else {
|
||||
sender.send(getMessage("whitelistNotFound"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,258 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.config;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Further modified version of the <a href="https://github.com/PSandro/SimpleConfig">SimpleConfig</a>SimpleConfig project of PSandro.
|
||||
*
|
||||
* @author kennytv
|
||||
*/
|
||||
public class ConfigSection {
|
||||
|
||||
protected final Config root;
|
||||
protected final String currentPath;
|
||||
protected Map<String, Object> values;
|
||||
|
||||
ConfigSection(final Config root, final String currentPath) {
|
||||
this(root, currentPath, new HashMap<>());
|
||||
}
|
||||
|
||||
ConfigSection(final Config root, final String currentPath, final Map<String, Object> values) {
|
||||
this.root = root;
|
||||
this.currentPath = currentPath;
|
||||
this.values = values;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public <E> E get(final String key) {
|
||||
return (E) getObject(key);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public <E> E get(final String key, @Nullable final E def) {
|
||||
final Object o = getObject(key);
|
||||
return o != null ? (E) o : def;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Object getObject(final String key) {
|
||||
return getObject(key, null);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Object getObject(final String key, final Object def) {
|
||||
int nextSeparatorIndex = -1;
|
||||
int sectionStartIndex;
|
||||
ConfigSection section = this;
|
||||
while ((nextSeparatorIndex = key.indexOf('.', sectionStartIndex = nextSeparatorIndex + 1)) != -1) {
|
||||
section = section.getSection(key.substring(sectionStartIndex, nextSeparatorIndex));
|
||||
if (section == null) return def;
|
||||
}
|
||||
|
||||
final String subKey = key.substring(sectionStartIndex);
|
||||
if (section == this) {
|
||||
final Object result = values.get(subKey);
|
||||
return result != null ? result : def;
|
||||
}
|
||||
return section.getObject(subKey, def);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public <E> E getOrSet(final String key, @Nullable final E def) {
|
||||
final Object o = getObject(key);
|
||||
if (o != null) {
|
||||
return (E) o;
|
||||
} else {
|
||||
this.set(key, def);
|
||||
return def;
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public ConfigSection getSection(final String key) {
|
||||
final Object o = getObject(key);
|
||||
if (!(o instanceof Map)) return null;
|
||||
return new ConfigSection(getRoot(), getFullKeyInPath(key), (Map<String, Object>) o);
|
||||
}
|
||||
|
||||
public ConfigSection getOrCreateSection(final String key) {
|
||||
final Object o = getObject(key);
|
||||
if (!(o instanceof Map)) {
|
||||
set(key, new LinkedHashMap<>());
|
||||
return getSection(key);
|
||||
}
|
||||
return new ConfigSection(getRoot(), getFullKeyInPath(key), (Map<String, Object>) o);
|
||||
}
|
||||
|
||||
public boolean contains(final String key) {
|
||||
return getObject(key) != null;
|
||||
}
|
||||
|
||||
public void set(final String key, @Nullable final Object value) {
|
||||
int nextSeparatorIndex = -1;
|
||||
int sectionStartIndex;
|
||||
ConfigSection section = this;
|
||||
while ((nextSeparatorIndex = key.indexOf('.', sectionStartIndex = nextSeparatorIndex + 1)) != -1) {
|
||||
section = section.getOrCreateSection(key.substring(sectionStartIndex, nextSeparatorIndex));
|
||||
}
|
||||
|
||||
final String sectionKey = key.substring(sectionStartIndex);
|
||||
if (value == null) {
|
||||
section.values.remove(sectionKey);
|
||||
getRoot().getComments().remove(getFullKeyInPath(key));
|
||||
} else {
|
||||
section.values.put(sectionKey, value);
|
||||
}
|
||||
}
|
||||
|
||||
public void move(final String key, final String toKey) {
|
||||
final Object o = getObject(key);
|
||||
if (o != null) {
|
||||
remove(key);
|
||||
set(toKey, o);
|
||||
}
|
||||
}
|
||||
|
||||
public void remove(final String key) {
|
||||
set(key, null);
|
||||
}
|
||||
|
||||
public Set<String> getKeys() {
|
||||
return this.values.keySet();
|
||||
}
|
||||
|
||||
public Map<String, Object> getValues() {
|
||||
return this.values;
|
||||
}
|
||||
|
||||
public boolean getBoolean(final String key) {
|
||||
return getBoolean(key, false);
|
||||
}
|
||||
|
||||
public boolean getBoolean(final String key, final boolean def) {
|
||||
final Object o = getObject(key);
|
||||
return o instanceof Boolean ? (boolean) o : def;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getString(final String key) {
|
||||
return get(key);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getString(final String key, @Nullable final String def) {
|
||||
final Object o = getObject(key);
|
||||
return o instanceof String ? (String) o : def;
|
||||
}
|
||||
|
||||
public int getInt(final String key) {
|
||||
return getInt(key, 0);
|
||||
}
|
||||
|
||||
public int getInt(final String key, final int def) {
|
||||
final Object o = getObject(key);
|
||||
return o instanceof Number ? ((Number) o).intValue() : def;
|
||||
}
|
||||
|
||||
public double getDouble(final String key) {
|
||||
return getDouble(key, 0D);
|
||||
}
|
||||
|
||||
public double getDouble(final String key, final double def) {
|
||||
final Object o = getObject(key);
|
||||
return o instanceof Number ? ((Number) o).doubleValue() : def;
|
||||
}
|
||||
|
||||
public long getLong(final String key) {
|
||||
return getLong(key, 0L);
|
||||
}
|
||||
|
||||
public long getLong(final String key, final long def) {
|
||||
final Object o = getObject(key);
|
||||
return o instanceof Number ? ((Number) o).longValue() : def;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public List<String> getStringList(final String key) {
|
||||
return get(key);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public List<String> getStringList(final String key, @Nullable final List<String> def) {
|
||||
final List<String> list = get(key);
|
||||
return list != null ? list : def;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public List<Integer> getIntList(final String key) {
|
||||
return get(key);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public List<Integer> getIntList(final String key, @Nullable final List<Integer> def) {
|
||||
final List<Integer> list = get(key);
|
||||
return list != null ? list : def;
|
||||
}
|
||||
|
||||
public boolean addMissingFields(final ConfigSection fromSection) {
|
||||
boolean changed = false;
|
||||
for (final Map.Entry<String, Object> entry : fromSection.values.entrySet()) {
|
||||
final String key = entry.getKey();
|
||||
final Object value = this.values.get(key);
|
||||
if (value != null) {
|
||||
// Go deeper for sections
|
||||
final Object newValue = entry.getValue();
|
||||
if (!(value instanceof Map) || !(newValue instanceof Map)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
changed |= this.getSection(key).addMissingFields(fromSection.getSection(key));
|
||||
} else {
|
||||
// Value is missing
|
||||
this.values.put(key, entry.getValue());
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return root config
|
||||
*/
|
||||
public Config getRoot() {
|
||||
return root;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return current path, or empty string if root
|
||||
*/
|
||||
public String getCurrentPath() {
|
||||
return currentPath;
|
||||
}
|
||||
|
||||
protected String getFullKeyInPath(final String key) {
|
||||
return currentPath.isEmpty() ? key : currentPath + "." + key;
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.event;
|
||||
|
||||
import eu.kennytv.maintenance.api.event.manager.EventListener;
|
||||
import eu.kennytv.maintenance.api.event.manager.MaintenanceEvent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public final class EventManager implements eu.kennytv.maintenance.api.event.manager.EventManager {
|
||||
private final Map<String, List<EventListener>> listeners = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void registerListener(final EventListener listener, final Class<? extends MaintenanceEvent> eventClass) {
|
||||
listeners.computeIfAbsent(eventClass.getSimpleName(), s -> new ArrayList<>()).add(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void callEvent(final MaintenanceEvent event) {
|
||||
final List<EventListener> list = listeners.get(event.getClass().getSimpleName());
|
||||
if (list != null) {
|
||||
for (final EventListener listener : list) {
|
||||
listener.onEvent(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.hook;
|
||||
|
||||
import eu.kennytv.maintenance.api.Maintenance;
|
||||
import net.luckperms.api.LuckPermsProvider;
|
||||
import net.luckperms.api.context.ContextCalculator;
|
||||
import net.luckperms.api.context.ContextConsumer;
|
||||
import net.luckperms.api.context.ContextSet;
|
||||
import net.luckperms.api.context.ImmutableContextSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public final class LuckPermsHook {
|
||||
|
||||
public static <T> void register(final Maintenance maintenance) {
|
||||
LuckPermsProvider.get().getContextManager().registerCalculator(new MaintenanceCalculator<T>(maintenance));
|
||||
}
|
||||
|
||||
public static final class MaintenanceCalculator<T> implements ContextCalculator<T> {
|
||||
|
||||
public static final String MAINTENANCE_KEY = "is-maintenance";
|
||||
private final Maintenance maintenance;
|
||||
|
||||
private MaintenanceCalculator(final Maintenance maintenance) {
|
||||
this.maintenance = maintenance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void calculate(@NotNull final T target, @NotNull final ContextConsumer consumer) {
|
||||
consumer.accept(MAINTENANCE_KEY, Boolean.toString(maintenance.isMaintenance()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContextSet estimatePotentialContexts() {
|
||||
return ImmutableContextSet.builder().add(MAINTENANCE_KEY, "true").add(MAINTENANCE_KEY, "false").build();
|
||||
}
|
||||
}
|
||||
}
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.runnable;
|
||||
|
||||
import eu.kennytv.maintenance.core.MaintenancePlugin;
|
||||
import eu.kennytv.maintenance.core.Settings;
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
|
||||
import java.time.Duration;
|
||||
|
||||
public final class MaintenanceScheduleRunnable extends MaintenanceRunnable {
|
||||
private final int maintenanceDuration;
|
||||
|
||||
public MaintenanceScheduleRunnable(final MaintenancePlugin plugin, final Settings settings, final int secondsToEnable, final int maintenanceDuration) {
|
||||
super(plugin, settings, secondsToEnable, true);
|
||||
this.maintenanceDuration = maintenanceDuration;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void finish() {
|
||||
super.finish();
|
||||
|
||||
// Start the timer to disable maintenance again
|
||||
plugin.startMaintenanceRunnable(Duration.ofSeconds(maintenanceDuration), false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Component getStartMessage() {
|
||||
return settings.getMessage("scheduletimerBroadcast",
|
||||
"%TIME%", getTime(),
|
||||
"%DURATION%", plugin.getFormattedTime(maintenanceDuration));
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.util;
|
||||
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public final class DummySenderInfo implements SenderInfo {
|
||||
private final UUID uuid;
|
||||
private final String name;
|
||||
|
||||
public DummySenderInfo(final UUID uuid, final String name) {
|
||||
this.uuid = uuid;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(final String permission) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(final Component component) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPlayer() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package eu.kennytv.maintenance.core.util;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Exception thrown when an API rate limit is reached.
|
||||
*/
|
||||
public class RateLimitedException extends IOException {
|
||||
}
|
||||
@@ -1,130 +0,0 @@
|
||||
###################################################################################################################
|
||||
# __ __ _ _ _ _ _ #
|
||||
# | \/ | __ _(_)_ __ | |_ ___ _ __ __ _ _ __ ___ ___ | |__ _ _ | | _____ _ __ _ __ _ _| |___ __ #
|
||||
# | |\/| |/ _` | | '_ \| __/ _ \ '_ \ / _` | '_ \ / __/ _ \ | '_ \| | | | | |/ / _ \ '_ \| '_ \| | | | __\ \ / / #
|
||||
# | | | | (_| | | | | | || __/ | | | (_| | | | | (_| __/ | |_) | |_| | | < __/ | | | | | | |_| | |_ \ V / #
|
||||
# |_| |_|\__,_|_|_| |_|\__\___|_| |_|\__,_|_| |_|\___\___| |_.__/ \__, | |_|\_\___|_| |_|_| |_|\__, |\__| \_/ #
|
||||
# |___/ |___/ #
|
||||
###################################################################################################################
|
||||
# You can report bugs here: https://github.com/kennytv/Maintenance/issues
|
||||
# If you need any other help/support, you can also join my Discord server: https://discord.gg/vGCUzHq
|
||||
# The config and language files use MiniMessage, NOT legacy text for input. Use https://webui.adventure.kyori.net/ to edit and preview the formatted text.
|
||||
# For a full list of formats and fancy examples of MiniMessage, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
|
||||
# Changes the language of command feedback/messages.
|
||||
# If you find missing translations or want to contribute, see https://crowdin.com/project/maintenance
|
||||
# Currently available are: en (English), de (German), fr (French), pt (Portuguese), es (Spanish), ru (Russian), zh (Chinese), it (Italian),
|
||||
# pl (Polish), tr (Turkish), sv (Swedish), uk (Ukrainian), ja (Japanese), da (Danish), ko (Korean), hu (Hungarian), vi (Vietnamese)
|
||||
language: en
|
||||
|
||||
# Enables maintenance mode.
|
||||
maintenance-enabled: true
|
||||
|
||||
# Enables maintenance on certain servers managed by your proxy instance(s).
|
||||
proxied-maintenance-servers:
|
||||
# - AServer
|
||||
|
||||
# If maintenance is enabled on a proxied server with players on it, they will be sent to the fallback server instead of being kicked off the network.
|
||||
# If the fallback server is not reachable/not set, they will just be kicked off the network.
|
||||
# This can also be set to an array to set multiple fallback servers, in case one server is not always reachable: 'fallback: [s1, s2, s3, ...]'
|
||||
fallback: unreachable
|
||||
|
||||
# If maintenance is enabled globally, you can define a "waiting" lobby for players to be sent to instead of being kicked.
|
||||
# Leave this empty to disable.
|
||||
waiting-server: ""
|
||||
|
||||
# The message (MOTD) shown in the multiplayer server list motd when maintenance is enabled.
|
||||
# If you put in multiple entries, one of them will be chosen randomly on every ping.
|
||||
# If running an endtimer, the time left can be displayed by including '%TIMER%' in a ping message.
|
||||
ping-message:
|
||||
enabled: true
|
||||
messages:
|
||||
- "<bold><green>True<red>OG</bold> <yellow>Network</yellow> <aqua>》<red> Updating... </red><aqua>《 <gold>[1.8.0-1.21.11]<br><yellow>⚠ <dark_red>Maintenance in progress! <yellow>We'll be back <dark_aqua>soon™"
|
||||
# If set to true and an endtimer is currently running, a message from this pool will be chosen
|
||||
# instead of the ones above, so you can have different messages for when an endtimer is running/not running.
|
||||
enable-timer-specific-messages: true
|
||||
timer-messages:
|
||||
- "<bold><green>True<red>OG</bold> <yellow>Network</yellow> <aqua>》<red>Maintenance Mode</red><aqua>《 <gold>[1.8.0-1.21.11]<br><dark_red>Maintenance ends in <yellow>%TIMER% <gray>| <green>Thanks for waiting!"
|
||||
|
||||
# If enabled, the message below will be shown in the top right corner of the server in the server list, where the player count would normally be displayed.
|
||||
# You can use '%ONLINE%' and '%MAX%' if you want to include the player count in a custom message (e.g. "Maintenance %ONLINE%/%MAX%").
|
||||
# DOES NOT SUPPORT RGB!
|
||||
player-count-message:
|
||||
enabled: true
|
||||
message: "<dark_red>Maintenance"
|
||||
# If set to true and an endtimer is currently running, the timer message will be used instead of the normal one.
|
||||
enable-timer-specific-message: true
|
||||
timer-message: "<dark_red>Come back in: <yellow>%TIMER%"
|
||||
|
||||
# Is shown when you move your mouse above the text in the top right corner of the server in the server list, where the player count would normally be displayed.
|
||||
# DOES NOT SUPPORT RGB!
|
||||
player-list-hover-message:
|
||||
enabled: true
|
||||
message: "<red>Currently under<br><red>maintenance"
|
||||
# If set to true and an endtimer is currently running, the timer message will be used instead of the normal one.
|
||||
enable-timer-specific-message: true
|
||||
timer-message: "<red>Come back in:<br><red><yellow>%TIMER%"
|
||||
|
||||
# Any extra commands inside the arrays will be executed when maintenance is enabled/disabled.
|
||||
# Example: commands-on-maintenance-enable: ["say hello!", "stop"]
|
||||
commands-on-maintenance-enable: []
|
||||
commands-on-maintenance-disable: []
|
||||
|
||||
# Any extra commands inside the "all" array will be executed when maintenance is enabled/disabled on a proxied server.
|
||||
# You can also add commands for specific servers by adding a new array with the server name as key.
|
||||
# In the commands, you can use the %SERVER% placeholder to get the server name.
|
||||
# Example: coolserver: ["say hello", "othercommand %SERVER%"]
|
||||
commands-on-single-maintenance-enable:
|
||||
all: []
|
||||
commands-on-single-maintenance-disable:
|
||||
all: []
|
||||
|
||||
# If set to true, the server icon will be changed to the 'maintenance-icon.png' file in the plugin's folder during maintenance.
|
||||
custom-maintenance-icon: false
|
||||
|
||||
# If set to true, players with the 'maintenance.joinnotification' permission will receive a message,
|
||||
# that a player tried to join the server while maintenance is enabled.
|
||||
send-join-notification: true
|
||||
|
||||
# Set this to false if you do not want players to be kicked when you enable maintenance (new connections will still be blocked).
|
||||
kick-online-players: true
|
||||
|
||||
# When fetched player does not exist then fallback to offline uuid. Only works on proxies like Velocity or BungeeCord
|
||||
fallback-to-offline-uuid: false
|
||||
|
||||
# If enabled and the server is restarted while running an endtimer, the timer will be continued after the restart.
|
||||
# If the timer ends while the server is offline, maintenance will be disabled as soon as the server starts again.
|
||||
continue-endtimer-after-restart:
|
||||
enabled: false
|
||||
# This value is set everytime an endtimer is started, cancelled or ended.
|
||||
# Do not manually change this value.
|
||||
end: 0
|
||||
|
||||
# If using the timer command: In what intervalls before enabling/disabling maintenance there will be a broadcast.
|
||||
timer-broadcast-for-seconds: [1200, 900, 600, 300, 120, 60, 30, 20, 10, 5, 4, 3, 2, 1]
|
||||
|
||||
# If you have 2 or more proxy instances, the database connection will make sure all proxies
|
||||
# have the same maintenance status, so you won't have to enable/disable it on every proxy by hand.
|
||||
mysql:
|
||||
use-mysql: false
|
||||
host: host
|
||||
port: 3306
|
||||
database: database
|
||||
username: username
|
||||
password: password
|
||||
# Requests to the database will only be made at least x seconds after the last request,
|
||||
# so there won't be a request on every single ping on a server with many players.
|
||||
#
|
||||
# Set this to 0 to make a database request on (almost) every single ping.
|
||||
# (0 is not recommended if having more than a hundred concurrent players, then I'd recommend keeping it from 10-60).
|
||||
update-interval: 15
|
||||
# If you for some reason cannot establish SSL connections to your database, you may disable it here (not recommended).
|
||||
use-ssl: true
|
||||
|
||||
# If disabled, you will no longer receive any messages if there is an update.
|
||||
# Not recommended to disable, as new versions generally tend to run better and with fewer bugs.
|
||||
# However, you can always check for updates manually using the '/maintenance update' command.
|
||||
update-checks: false
|
||||
|
||||
# Used for autoupdating the config, do not change this value.
|
||||
config-version: 9
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
|
||||
noPermission: "<red>Du har ikke tilladelse til at udføre denne kommando."
|
||||
kickmessage: "<red>Serveren er i øjeblikket under vedligeholdelse!<br>Prøv igen senere!"
|
||||
maintenanceActivated: "<prefix><gold>Vedligeholdelsestilstand er nu aktiveret."
|
||||
maintenanceDeactivated: "<prefix><gold>Vedligeholdelsestilstand er nu deaktiveret."
|
||||
alreadyEnabled: "<prefix><red>Vedligeholdelsestilstand er allerede aktiveret!"
|
||||
alreadyDisabled: "<prefix><red>Vedligeholdelsestilstand er allerede deaktiveret!"
|
||||
endtimerBroadcast: "<prefix><gray>Vedligeholdelsestilstand vil blive deaktiveret om <gold>%TIME%<gray>."
|
||||
endtimerStarted: "<prefix><green>Startet timer: <gray>Vedligeholdelsestilstand vil blive deaktiveret om <gold>%TIME%<gray>."
|
||||
starttimerBroadcast: "<prefix><gray>Vedligeholdelsestilstand vil blive aktiveret om <gold>%TIME%<gray>."
|
||||
starttimerStarted: "<prefix><green>Startet timer: <gray>Vedligeholdelsestilstand vil blive aktiveret om <gold>%TIME%<gray>."
|
||||
scheduletimerBroadcast: "<prefix><gray>Vedligeholdelsestilstand vil blive aktiveret om <gold>%TIME% <gray>og vil vare i <gold>%DURATION%<gray>."
|
||||
scheduletimerStarted: "<prefix><green>Startet timer: <gray>Vedligeholdelsestilstand vil blive aktiveret om <gold>%TIME% <gray>og vil vare i <gold>%DURATION%<gray>."
|
||||
timerAlreadyRunning: "<prefix><red>Der er allerede planlagt en timer!"
|
||||
timerNotRunning: "<prefix><red>Der er i øjeblikket ingen timer."
|
||||
timerCancelled: "<prefix><red>Den aktuelle timer er blevet deaktiveret."
|
||||
timerTooLong: "<prefix><red>Tallet skal være mindre end 40320 (28 days)!"
|
||||
timerMotdDisabled: "<prefix><red>Du skal angive 'enable-timerspecific-messages' i konfigurationsfilen til 'true', hvis du vil bruge/redigere tidsbestemte motds."
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<prefix><yellow>%PLAYER% <red>prøvede at forbinde til serveren."
|
||||
motdList: "<prefix><gray>Liste over dine vedligeholdelses motds:"
|
||||
motdListEmpty: "<prefix><red>Du har ikke oprettet nogen vedligeholdelses motds!"
|
||||
reload: "<prefix><green>Genindlæs konfigurationsfilen, hvidlistede spillere, sprogfilen og vedligeholdelsesikonet."
|
||||
removedMotd: "<prefix><green>Slet motd nummer %INDEX%."
|
||||
removeMotdError: "<prefix><red>Du har kun én motd, så du kan ikke slette nogen!"
|
||||
setMotd: "<prefix><green>Angiv linje %LINE% af %INDEX%. vedligeholdelses motd til %MOTD%"
|
||||
setMotdIndexError: "<prefix><red>Du har %MOTDS% motds, så du skal angive et nummer mellem 1 og %NEWAMOUNT%."
|
||||
setMotdLineError: "<prefix><red>Det andet argument skal være linjenummer (1 or 2)!"
|
||||
updateDownloading: "<prefix><red><bold>Downloader opdatering..."
|
||||
updateFailed: "<prefix><dark_red><bold>Opdatering fejlede!"
|
||||
updateFinished: "<prefix><green><bold>Opdateringen lykkedes! For at forhindre problemer og for at fuldføre opdateringen skal du genstarte serveren!"
|
||||
whitelistedPlayers: "<prefix><gold>Hvidlistede spillere til vedligeholdelse:"
|
||||
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
|
||||
whitelistAdded: "<prefix><green>Tilføj <aqua>%PLAYER% <green>til vedligeholdelseshvidlisten!"
|
||||
whitelistAlreadyAdded: "<prefix><aqua>%PLAYER% <red>findes allerede i vedligeholdelseshvidlisten!"
|
||||
whitelistRemoved: "<prefix><green>Fjern <aqua>%PLAYER% <green>fra vedligeholdelseshvidlisten!"
|
||||
whitelistNotFound: "<prefix><red>Denne spiller er ikke på vedligeholdelseshvidlisten!"
|
||||
whitelistEmpty: "<prefix><red>Vedligeholdelseshvidlisten er tom! Brug <yellow>/maintenance add <player/uuid> <red>til at tilføje spillere!"
|
||||
playerNotFound: "<prefix><red>Ingen spillere med dette navn har spillet på denne server før."
|
||||
playerNotFoundUuid: "<prefix><red>Ingen spiller med den uuid kunne findes."
|
||||
playerNotOnline: "<prefix><red>Der er ingen spiller online med det navn."
|
||||
offlinePlayerFetchError: "<prefix><red>There was an error while fetching offline player. Please try again later."
|
||||
invalidUuid: "<prefix><red>Ugyldigt uuid-format!"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<prefix><red>Du er blevet sendt til en venteserver!"
|
||||
forceWaitingServer: "<prefix><red>Du kan ikke forlade venteserveren, mens vedligeholdelsetilstand er aktiveret!"
|
||||
serverNotFound: "<prefix><red>Ingen server med dette navn er registreret på proxyen!"
|
||||
singleTimerAlreadyRunning: "<prefix><red>Der er allerede planlagt en timer for den server!"
|
||||
singleTimerCancelled: "<prefix><red>Den aktuelle timer for serveren <yellow>%SERVER% <red>er deaktiveret."
|
||||
singleTimerNotRunning: "<prefix><red>Der er i øjeblikket ingen kørende timer for den server."
|
||||
singleEndtimerBroadcast: "<prefix><gray>Vedligeholdelsestilstand på server %SERVER% vil blive deaktiveret om <gold>%TIME%<gray>."
|
||||
singleEndtimerStarted: "<prefix><green>Startet timer: <gray>Vedligeholdelsestilstand på server %SERVER% vil blive deaktiveret om <gold>%TIME%<gray>."
|
||||
singleStarttimerBroadcast: "<prefix><gray>Vedligeholdelsestilstand på server %SERVER% vil blive aktiveret om <gold>%TIME%<gray>."
|
||||
singleStarttimerStarted: "<prefix><green>Startet timer: <gray>Vedligeholdelsestilstand på server %SERVER% vil blive aktiveret om <gold>%TIME%<gray>."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>Vedligeholdelsestilstand på server %SERVER% vil blive aktiveret om <gold>%TIME% <gray>og vil vare i <gold>%DURATION%<gray>."
|
||||
singleScheduletimerStarted: "<prefix><green>Startet timer: <gray>Vedligeholdelsestilstand på server %SERVER% vil blive aktiveret om <gold>%TIME% <gray>og vil vare i <gold>%DURATION%<gray>."
|
||||
singleMaintenanceKick: "<prefix><red>Serveren %SERVER% er i øjeblikket under vedligeholdelse! Prøv igen senere!"
|
||||
singleMaintenanceKickComplete: "<red>Serveren %SERVER% er under vedligeholdelse!<br>Du kan prøve at forbinde igen for at gå ind på en anden server!"
|
||||
singleMaintenanceActivated: "<prefix><gold>Vedligeholdelsestilstand er nu aktiveret på serveren <yellow>%SERVER%<gold>."
|
||||
singleMaintenanceDeactivated: "<prefix><gold>Vedligeholdelsestilstand er nu deaktiveret på serveren <yellow>%SERVER%<gold>."
|
||||
singleServerAlreadyEnabled: "<prefix><red>Vedligeholdelsestilstand er allerede aktiveret på serveren <yellow>%SERVER%<red>!"
|
||||
singleServerAlreadyDisabled: "<prefix><red>Vedligeholdelsestilstand er allerede deaktiveret på serveren <yellow>%SERVER%<red>!"
|
||||
singleServerMaintenanceList: "<prefix><gray>Proxyservere, der har Vedligeholdelsestilstand aktiveret:"
|
||||
singleServerMaintenanceListEmpty: "<prefix><gray>Der er ingen proxy-servere, der er under vedligeholdelse."
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "sekund"
|
||||
seconds: "sekunder"
|
||||
minute: "minut"
|
||||
minutes: "minutter"
|
||||
hour: "time"
|
||||
hours: "timer"
|
||||
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
|
||||
helpPageNotFound: "<prefix><red>Der er ingen side med det nummer!"
|
||||
helpNextPage: "<gray>Brug <aqua>/maintenance help %PAGE% <gray>for at komme til næste hjælpevindue."
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(Hvis timeren kører, vil den blive afbrudt)"
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Aktiverer noget fejlretningslogning)"
|
||||
helpDump: "<gold>/maintenance dump <gray>(Dumper nogle serveroplysninger, brugt til fejlrapporter)"
|
||||
helpHelp: "<gold>/maintenance help [page] <gray>(Viser dette smukke hjælpevindue)"
|
||||
helpMotd: "<gold>/maintenance motd [timer] <gray>(Viser den aktuelle vedligeholdelses motds. Hvis 'timer' er angivet, bliver dennes motds vist)"
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd [timer] <index> <gray>(Sletter en vedligeholdelses motd. Hvis 'timer' er angivet, vil en tidsspecifik pingbesked blive slettet)"
|
||||
helpSetMotd: "<gold>/maintenance setmotd [timer] <index> <1/2> <message> <gray>(Angiver en motd for vedligeholdelsestilstand. Hvis 'timer' er angivet, vil en tidsspecifik pingbesked blive angivet)"
|
||||
helpReload: "<gold>/maintenance reload <gray>(Genindlæser konfigurationsfilen, hvidlisten og serverikonet)"
|
||||
helpToggle: "<gold>/maintenance <on/off> <gray>(Aktiverer/deaktiverer vedligeholdelsestilstand)"
|
||||
helpUpdate: "<gold>/maintenance update <gray>(Downloader den nyeste version af plugin'et på din server)"
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>(Viser alle hvidlistede spillere for vedligeholdelsestilstand)"
|
||||
helpWhitelistAdd: "<gold>/maintenance add <name/uuid> <gray>(Tilføjer spilleren til vedligeholdelseshvidlisten, så de kan forbinde til serveren, selvom vedligeholdelsestilstand er aktiveret)"
|
||||
helpWhitelistRemove: "<gold>/maintenance remove <name/uuid> <gray>(Sletter spilleren fra vedligeholdelseshvidlisten)"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [server] <gray>(Hvis timeren kører, vil den blive afbrudt)"
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance <on/off> [server] <gray>(Aktiverer/deaktiverer vedligeholdelsestilstand)"
|
||||
helpStatus: "<gold>/maintenance status <gray>(Viser alle proxyservere, der har Vedligeholdelsestilstand aktiveret)"
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
|
||||
noPermission: "<red>Du hast nicht die erforderliche Berechtigung, um diesen Befehl auszuführen."
|
||||
kickmessage: "<red>Der Server befindet sich momentan im Wartungsmodus!<br>Bitte versuche es später nochmal!"
|
||||
maintenanceActivated: "<prefix><gold>Der Wartungsmodus ist jetzt aktiviert."
|
||||
maintenanceDeactivated: "<prefix><gold>Der Wartungsmodus ist nun deaktiviert."
|
||||
alreadyEnabled: "<prefix><red>Der Wartungsmodus ist bereits aktiviert!"
|
||||
alreadyDisabled: "<prefix><red>Der Wartungsmodus ist bereits deaktiviert!"
|
||||
endtimerBroadcast: "<prefix><gray>Der Wartungsmodus wird deaktiviert in: <gold>%TIME%<gray>."
|
||||
endtimerStarted: "<prefix><green>Timer gestartet: <gray>Der Wartungsmodus wird deaktiviert in: <gold>%TIME%<gray>."
|
||||
starttimerBroadcast: "<prefix><gray>Der Wartungsmodus wird aktiviert in: <gold>%TIME%<gray>."
|
||||
starttimerStarted: "<prefix><green>Timer gestartet: <gray>Der Wartungsmodus wird aktiviert in: <gold>%TIME%<gray>."
|
||||
scheduletimerBroadcast: "<prefix><gray>Der Wartungsmodus wird in <gold>%TIME% <gray>aktiviert und <gold>%DURATION% <gray>dauern."
|
||||
scheduletimerStarted: "<prefix><green>Gestarteter Timer: <gray>Der Wartungsmodus ist in <gold>%TIME% <gray>aktiv und wird <gold>%DURATION% <gray>dauern."
|
||||
timerAlreadyRunning: "<prefix><red>Momentan läuft bereits ein Timer!"
|
||||
timerNotRunning: "<prefix><red>Momentan läuft kein Timer."
|
||||
timerCancelled: "<prefix><red>Der laufende Timer wurde beendet."
|
||||
timerTooLong: "<prefix><red>Die angegebene Zahl muss kleiner als 40320 sein, also 28 Tage!"
|
||||
timerMotdDisabled: "<prefix><red>Du musst den Wert 'enable-timerspecific-messages' in der Config auf 'true' stellen, wenn du timerspezifische Motds benutzen/bearbeiten möchtest."
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<prefix><yellow>%PLAYER% <red>hat versucht dem Server beizutreten."
|
||||
motdList: "<prefix><gray>Liste deiner Motds, die während Maintenance angezeigt werden:"
|
||||
motdListEmpty: "<prefix><red>Du hast keine Maintenance MOTDs gesetzt!"
|
||||
reload: "<prefix><green>Die Config, die Liste der Spieler die während Maintenance beitreten können, die Sprachdateien und das Icon, das während der Maintenance angezeigt wird, wurden reloaded."
|
||||
removedMotd: "<prefix><green>Die %INDEX%. Wartungs-MOTD wurde entfernt."
|
||||
removeMotdError: "<prefix><red>Du hast nur eine Maintenance MOTD eingestellt, daher kannst du auch keine entfernen!"
|
||||
setMotd: "<prefix><green>Die %LINE%. Zeile der %INDEX%. Maintenance MOTD wurde geändert zu: %MOTD%"
|
||||
setMotdIndexError: "<prefix><red>Momentan gibt es %MOTDS% MOTDs, du musst also eine Zahl, die zwischen 1 und %NEWAMOUNT% liegt, wählen."
|
||||
setMotdLineError: "<prefix><red>Das zweite Argument des Befehls muss die Zeilennummer sein (1 oder 2)!"
|
||||
updateDownloading: "<prefix><red><bold>Das Update wird heruntergeladen..."
|
||||
updateFailed: "<prefix><dark_red><bold>Das Update ist fehlgeschlagen!"
|
||||
updateFinished: "<prefix><green><bold>Das Update war erfolgreich! Um keine Fehler mit Timern zu erhalten und das Update abzuschließen, wäre ein Serverneustart erforderlich!"
|
||||
whitelistedPlayers: "<prefix><gold>Spieler in der Maintenance Whitelist:"
|
||||
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
|
||||
whitelistAdded: "<prefix><aqua>%PLAYER% <green>wurde zur Wartungs-Whitelist hinzugefügt!"
|
||||
whitelistAlreadyAdded: "<prefix><aqua>%PLAYER% <red>ist bereits in der Maintenance Whitelist!"
|
||||
whitelistRemoved: "<prefix><aqua>%PLAYER% <green>wurde von der Maintenance Whitelist entfernt!"
|
||||
whitelistNotFound: "<prefix><red>Dieser Spieler ist nicht in der Maintenance Whitelist!"
|
||||
whitelistEmpty: "<prefix><red>In der Maintenance Whitelist befinden sich keine Spieler! Nutze <yellow>/maintenance add <player/uuid><red>, um jemanden hinzuzufügen!"
|
||||
playerNotFound: "<prefix><red>Bisher hat kein Spieler mit diesem Namen auf diesem Server gespielt."
|
||||
playerNotFoundUuid: "<prefix><red>Es konnte kein Spieler mit dieser UUID gefunden werden."
|
||||
playerNotOnline: "<prefix><red>Es ist momentan kein Spieler mit diesem Namen online."
|
||||
offlinePlayerFetchError: "<prefix><red>Beim Abrufen des Offline-Spielers ist ein Fehler aufgetreten. Bitte versuche es später erneut."
|
||||
invalidUuid: "<prefix><red>Das UUID Format ist ungültig!"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<prefix><red>Du wurdest auf einen Warteserver verbunden!"
|
||||
forceWaitingServer: "<prefix><red>Du kannst den Warteserver nicht verlassen, solange der Wartungsmodus aktiviert ist!"
|
||||
serverNotFound: "<prefix><red>Es wurde kein Server mit diesem Namen gefunden!"
|
||||
singleTimerAlreadyRunning: "<prefix><red>Momentan läuft bereits ein Timer auf diesem Server!"
|
||||
singleTimerCancelled: "<prefix><red>Der laufende Timer von <yellow>%SERVER% <red>wurde beendet."
|
||||
singleTimerNotRunning: "<prefix><red>Momentan läuft kein Timer auf diesem Server."
|
||||
singleEndtimerBroadcast: "<prefix><gray>Der Wartungsmodus auf Server %SERVER% wird deaktiviert in: <gold>%TIME%<gray>."
|
||||
singleEndtimerStarted: "<prefix><green>Gestarteter Timer: <gray>Der Wartungsmodus auf Server %SERVER% wird deaktiviert in: <gold>%TIME%<gray>."
|
||||
singleStarttimerBroadcast: "<prefix><gray>Der Wartungsmodus auf Server %SERVER% wird aktiviert in: <gold>%TIME%<gray>."
|
||||
singleStarttimerStarted: "<prefix><green>Gestarteter Timer: <gray>Der Wartungsmodus auf Server %SERVER% ist aktiv in: <gold>%TIME%<gray>."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>Der Wartungsmodus auf Server %SERVER% wird aktiviert in <gold>%TIME% <gray>und wird <gold>%DURATION% <gray>dauern."
|
||||
singleScheduletimerStarted: "<prefix><green>Gestarteter Timer: <gray>Der Wartungsmodus auf Server %SERVER% ist in <gold>%TIME% <gray>aktiv und wird <gold>%DURATION% <gray>dauern."
|
||||
singleMaintenanceKick: "<prefix><red>Der Server %SERVER% befindet sich momentan im Wartungsmodus! Probier es später nochmal!"
|
||||
singleMaintenanceKickComplete: "<red>Der Server %SERVER% befindet sich in Wartung!<br>Du kannst versuchen zu rejoinen, um andere Server zu betreten!"
|
||||
singleMaintenanceActivated: "<prefix><gold>Der Wartungsmodus wurde auf <yellow>%SERVER% <gold>aktiviert."
|
||||
singleMaintenanceDeactivated: "<prefix><gold>Der Wartungsmodus wurde auf <yellow>%SERVER% <gold>deaktiviert."
|
||||
singleServerAlreadyEnabled: "<prefix><red>Der Wartungsmodus ist bereits an auf <yellow>%SERVER%<red>!"
|
||||
singleServerAlreadyDisabled: "<prefix><red>Der Wartungsmodus ist bereits aus auf <yellow>%SERVER%<red>!"
|
||||
singleServerMaintenanceList: "<prefix><gray>Unterserver, die im Wartungsmodus sind:"
|
||||
singleServerMaintenanceListEmpty: "<prefix><gray>Es befindet sich momentan kein Unterserver im Wartungsmodus."
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "Sekunde"
|
||||
seconds: "Sekunden"
|
||||
minute: "Minute"
|
||||
minutes: "Minuten"
|
||||
hour: "Stunde"
|
||||
hours: "Stunden"
|
||||
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
|
||||
helpPageNotFound: "<prefix><red>Es gibt keine Seite mit dieser Nummer!"
|
||||
helpNextPage: "<gray>Nutze <aqua>/maintenance help %PAGE%<gray>, um zur nächsten Hilfeseite zu kommen."
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(Falls momentan ein Timer läuft, wird dieser abgebrochen)"
|
||||
helpEndtimer: "<gold>/maintenance endtimer <Deaktiviere in> <gray>(Sobald der Timer, bspw. 1h5m, abläuft wird der Wartungsmodus deaktiviert)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <Aktiviere in> <gray>(Sobald der Timer, bspw. 1h5m, abläuft wird der Wartungsmodus aktiviert)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <Aktiviere in> <Wartungsdauer> <gray>(Nach der gegebenen Zeit, bspw. 1h5m, wird der Wartungsmodus für die Länge in Minuten aktiviert)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Aktiviert Debug Nachrichten in der Konsole)"
|
||||
helpDump: "<gold>/maintenance dump <gray>(Sammelt wichtige Informationen für Bugreports)"
|
||||
helpHelp: "<gold>/maintenance help [Seite] <gray>(Zeigt diese wunderschöne Hilfe)"
|
||||
helpMotd: "<gold>/maintenance motd [Timer] <gray>(Zeigt die momentan gesetzten Maintenance Motds an. Mit dem 'timer' Argument werden die timerspezifischen Motds angezeigt)"
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd [Timer] <Index> <gray>(Entfernt eine Maintenance Motd. Mit dem 'timer' Argument wird eine timerspezifischen Motd entfernt)"
|
||||
helpSetMotd: "<gold>/maintenance setmotd [Timer] <Index> <1/2> <Nachricht> <gray>(Setzte eine Motd für den Wartungsmodus. Mit dem 'timer' Argument wird eine timerspezifische Motd gesetzt)"
|
||||
helpReload: "<gold>/maintenance reload <gray>(Lädt Config, Language und Whitelist Dateien sowie das Maintenance Icon neu)"
|
||||
helpToggle: "<gold>/maintenance <on/off> <gray>(Aktiviert/deaktiviert den Wartungsmodus)"
|
||||
helpUpdate: "<gold>/maintenance update <gray>(Sucht nach neuen Updates für das Plugin und lädt diese auf den Server)"
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>(Zeigt alle gewhitelisteten Spieler für den Wartungsmodus an)"
|
||||
helpWhitelistAdd: "<gold>/maintenance add <Name/UUID> <gray>(Whitelistet einen Spieler für den Wartungsmodus, sodass dieser während Wartungen den Server betreten kann)"
|
||||
helpWhitelistRemove: "<gold>/maintenance remove <Name/UUID> <gray>(Entfernt einen Spieler aus der Wartungsmodus Whitelist)"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [Server] <gray>(Falls momentan ein Timer läuft, wird dieser abgebrochen)"
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [Server] <Deaktiviere in> <gray>(Sobald der Timer, bspw. 1h5m, abläuft wird der Wartungsmodus deaktiviert)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [Server] <Aktiviere in> <gray>(Sobald der Timer, bspw. 1h5m, abläuft wird der Wartungsmodus aktiviert)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [Server] <Starte in> <Wartungsdauer> <gray>(Sobald der Timer, bspw. 1h5m, abläuft wird der Wartungsmodus für die gegebene Länge aktiviert)"
|
||||
helpSingleToggle: "<gold>/maintenance <on/off> [Server] <gray>(Aktiviert/deaktiviert den Wartungsmodus)"
|
||||
helpStatus: "<gold>/maintenance status <gray>(Zeigt alle Server an, auf denen momentan der Wartungsmodus aktiviert ist)"
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
|
||||
noPermission: "<red>You do not have the permission to execute that command."
|
||||
kickmessage: "<red>The server is currently under maintenance!<br>Try again later!"
|
||||
maintenanceActivated: "<prefix><gold>Maintenance mode is now activated."
|
||||
maintenanceDeactivated: "<prefix><gold>Maintenance mode is now deactivated."
|
||||
alreadyEnabled: "<prefix><red>Maintenance is already enabled!"
|
||||
alreadyDisabled: "<prefix><red>Maintenance is already disabled!"
|
||||
endtimerBroadcast: "<prefix><gray>Maintenance mode will be disabled in <gold>%TIME%<gray>."
|
||||
endtimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode will be deactivated in <gold>%TIME%<gray>."
|
||||
starttimerBroadcast: "<prefix><gray>Maintenance mode will be enabled in <gold>%TIME%<gray>."
|
||||
starttimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode will be activated in <gold>%TIME%<gray>."
|
||||
scheduletimerBroadcast: "<prefix><gray>Maintenance mode will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
scheduletimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
timerAlreadyRunning: "<prefix><red>There is already a timer scheduled!"
|
||||
timerNotRunning: "<prefix><red>There is currently no running timer."
|
||||
timerCancelled: "<prefix><red>The current timer has been disabled."
|
||||
timerTooLong: "<prefix><red>The duration has to be less than 28 days!"
|
||||
timerMotdDisabled: "<prefix><red>You have to set 'enable-timerspecific-messages' in the config to 'true', if you want to use/edit timerspecific motds."
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<prefix><yellow>%PLAYER% <red>tried to join the server."
|
||||
motdList: "<prefix><gray>List of your maintenance motds:"
|
||||
motdListEmpty: "<prefix><red>You don't have any maintenance motds set!"
|
||||
reload: "<prefix><green>Reloaded config, whitelistedplayers, language file and the maintenance icon."
|
||||
removedMotd: "<prefix><green>Removed motd number %INDEX%."
|
||||
removeMotdError: "<prefix><red>You only have one motd, so you cannot remove any!"
|
||||
setMotd: "<prefix><green>Set line %LINE% of the %INDEX%. maintenance motd to %MOTD%"
|
||||
setMotdIndexError: "<prefix><red>You currently have %MOTDS% motds, so you have to pick a number between 1 and %NEWAMOUNT%."
|
||||
setMotdLineError: "<prefix><red>The second argument has to be the line number (1 or 2)!"
|
||||
updateDownloading: "<prefix><red><bold>Downloading update..."
|
||||
updateFailed: "<prefix><dark_red><bold>Update failed!"
|
||||
updateFinished: "<prefix><green><bold>The update was successful! To prevent issues with tasks and to complete the update, you have to restart the server!"
|
||||
whitelistedPlayers: "<prefix><gold>Whitelisted players for maintenance:"
|
||||
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
|
||||
whitelistAdded: "<prefix><green>Added <aqua>%PLAYER% <green>to the maintenance whitelist!"
|
||||
whitelistAlreadyAdded: "<prefix><aqua>%PLAYER% <red>already is in the maintenance whitelist!"
|
||||
whitelistRemoved: "<prefix><green>Removed <aqua>%PLAYER% <green>from the maintenance whitelist!"
|
||||
whitelistNotFound: "<prefix><red>This player is not in the maintenance whitelist!"
|
||||
whitelistEmpty: "<prefix><red>The maintenance whitelist is empty! Use <yellow>/maintenance add <player/uuid> <red>to add someone!"
|
||||
playerNotFound: "<prefix><red>No player with this name has played on this server before."
|
||||
playerNotFoundUuid: "<prefix><red>No player with that uuid could be found."
|
||||
playerNotOnline: "<prefix><red>There is no player online with that name."
|
||||
offlinePlayerFetchError: "<prefix><red>There was an error while fetching offline player. Please try again later."
|
||||
invalidUuid: "<prefix><red>Invalid uuid format!"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<prefix><red>You have been sent to a waiting server!"
|
||||
forceWaitingServer: "<prefix><red>You cannot leave the waiting server while maintenance is enabled!"
|
||||
serverNotFound: "<prefix><red>No server with this name is registered on the proxy!"
|
||||
singleTimerAlreadyRunning: "<prefix><red>There is already a timer scheduled for that server!"
|
||||
singleTimerCancelled: "<prefix><red>The current timer for server <yellow>%SERVER% <red>has been disabled."
|
||||
singleTimerNotRunning: "<prefix><red>There is currently no running timer for that server."
|
||||
singleEndtimerBroadcast: "<prefix><gray>Maintenance mode on server %SERVER% will be disabled in <gold>%TIME%<gray>."
|
||||
singleEndtimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode on server %SERVER% will be deactivated in <gold>%TIME%<gray>."
|
||||
singleStarttimerBroadcast: "<prefix><gray>Maintenance mode on server %SERVER% will be enabled in <gold>%TIME%<gray>."
|
||||
singleStarttimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode on server %SERVER% will be activated in <gold>%TIME%<gray>."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>Maintenance mode on server %SERVER% will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
singleScheduletimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode on server %SERVER% will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
singleMaintenanceKick: "<prefix><red>The server %SERVER% is currently under maintenance! Try again later!"
|
||||
singleMaintenanceKickComplete: "<red>The server %SERVER% is under maintenance!<br>You may try to rejoin to go onto another server!"
|
||||
singleMaintenanceActivated: "<prefix><gold>Maintenance mode is now activated on server <yellow>%SERVER%<gold>."
|
||||
singleMaintenanceDeactivated: "<prefix><gold>Maintenance mode is now deactivated on server <yellow>%SERVER%<gold>."
|
||||
singleServerAlreadyEnabled: "<prefix><red>Maintenance is already enabled on server <yellow>%SERVER%<red>!"
|
||||
singleServerAlreadyDisabled: "<prefix><red>Maintenance is already disabled on server <yellow>%SERVER%<red>!"
|
||||
singleServerMaintenanceList: "<prefix><gray>Proxied servers, that have maintenance enabled:"
|
||||
singleServerMaintenanceListEmpty: "<prefix><gray>There are no proxied servers that are under maintenance."
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "second"
|
||||
seconds: "seconds"
|
||||
minute: "minute"
|
||||
minutes: "minutes"
|
||||
hour: "hour"
|
||||
hours: "hours"
|
||||
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
|
||||
helpPageNotFound: "<prefix><red>There is no page with that number!"
|
||||
helpNextPage: "<gray>Use <aqua>/maintenance help %PAGE% <gray>to get to the next help window."
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(If running, the current timer will be aborted)"
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Enables some debug logging)"
|
||||
helpDump: "<gold>/maintenance dump <gray>(Dumps some server information, used for bug reports)"
|
||||
helpHelp: "<gold>/maintenance help [page] <gray>(Shows this beautiful help window)"
|
||||
helpMotd: "<gold>/maintenance motd [timer] <gray>(Lists the currently set maintenance motds. If specifying 'timer', the timer motds are shown)"
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd [timer] <index> <gray>(Removes a maintenance motd. If using 'timer' as an argument, a timerspecific pingmessage will be removed)"
|
||||
helpSetMotd: "<gold>/maintenance setmotd [timer] <index> <1/2> <message> <gray>(Sets a motd for maintenance mode. If using 'timer' as an argument, a timerspecific pingmessage will be set)"
|
||||
helpReload: "<gold>/maintenance reload <gray>(Reloads the config file, whitelist file and the server-icon)"
|
||||
helpToggle: "<gold>/maintenance <on/off> <gray>(Enables/disables maintenance mode)"
|
||||
helpUpdate: "<gold>/maintenance update <gray>(Remotely downloads the newest version of the plugin onto your server)"
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>(Shows all whitelisted players for the maintenance mode)"
|
||||
helpWhitelistAdd: "<gold>/maintenance add <name/uuid> <gray>(Adds the player to the maintenance whitelist, so they can join the server even though maintenance is enabled)"
|
||||
helpWhitelistRemove: "<gold>/maintenance remove <name/uuid> <gray>(Removes the player from the maintenance whitelist)"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [server] <gray>(If running, the current timer will be aborted)"
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance <on/off> [server] <gray>(Enables/disables maintenance mode)"
|
||||
helpStatus: "<gold>/maintenance status <gray>(Lists all proxied servers, that are currently under maintenance)"
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
|
||||
noPermission: "<prefix><dark_red>No tienes permiso para ejecutar este comando."
|
||||
kickmessage: "<red>¡El servidor se encuentra en mantenimiento!<br>¡Intentalo de nuevo más tarde!"
|
||||
maintenanceActivated: "<prefix><gold>Mantenimiento <gray>activado."
|
||||
maintenanceDeactivated: "<prefix><gold>Modo mantenimiento desactivado."
|
||||
alreadyEnabled: "<prefix><gray>¡Modo mantenimiento se encuentra habilitado!"
|
||||
alreadyDisabled: "<prefix><gray>¡Modo mantenimiento se encuentra deshabilitado!"
|
||||
endtimerBroadcast: "<prefix><gray>El modo mantenimiento se desactivará en <gold>%TIME%<gray>."
|
||||
endtimerStarted: "<prefix><gray>Temporizador iniciado: El modo mantenimiento se desactivará en <gold>%TIME%<gray>."
|
||||
starttimerBroadcast: "<prefix><gray>El modo mantenimiento se habilitara en <gold>%TIME%<gray>."
|
||||
starttimerStarted: "<prefix><gray>Temporizador iniciado: El modo mantenimiento se activará en <gold>%TIME%<gray>."
|
||||
scheduletimerBroadcast: "<prefix><gray>Maintenance mode will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
scheduletimerStarted: "<prefix><gray>Temporizador iniciado: El modo mantenimiento se activará en <gold>%TIME% <gray>y durará <gold>%DURATION%<gray>."
|
||||
timerAlreadyRunning: "<prefix><red>Ya hay un temporizador programado!"
|
||||
timerNotRunning: "<prefix><gray>Actualmente no hay temporizador."
|
||||
timerCancelled: "<prefix><red>El Temporizador actual ha sido deshabilitado."
|
||||
timerTooLong: "<prefix><gray>El numero debe ser menor a 40320 <dark_gray>(<gold>28 días<dark_gray>)"
|
||||
timerMotdDisabled: "<prefix><red>Tienes que configurar <green>'enable-timerspecific-messages'<red> en la configuración en <green>'true'<red>, si quieres usar / editar motdspecers específicos."
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<prefix><red>%PLAYER% <gray>Intenta unirse al servidor."
|
||||
motdList: "<prefix><gray>Lista de motds de mantenimiento:"
|
||||
motdListEmpty: "<prefix><red>¡No tiene ningún motd(s<dark_gray>) de mantenimiento establecido!"
|
||||
reload: "<prefix><green>Configuracion recargada"
|
||||
removedMotd: "<prefix><green>Numero de motd eliminado <gold>%INDEX%<green>."
|
||||
removeMotdError: "<prefix>&Solo tienes un motd, por lo que no puedes eliminar ninguno!"
|
||||
setMotd: "<prefix><green>Establecer linea <gold>%LINE%<green> sobre <gold>%INDEX%<green>. Para mantenimiento para %MOTD%"
|
||||
setMotdIndexError: "<prefix><green>Actualmente tiene <gold>%MOTDS%<green> Motd(s<dark_gray>), por lo que debe elegir un número entre 1 y %NEWAMOUNT%."
|
||||
setMotdLineError: "<prefix><gray>El segundo argumento tiene que ser el numero de línea.(1 ó 2<dark_gray>)!"
|
||||
updateDownloading: "<prefix><green>Descargando actualización..."
|
||||
updateFailed: "<prefix><red>Actualizacion fallida!"
|
||||
updateFinished: "<prefix><green>La actualización fue exitosa!, debes reiniciar el servidor!"
|
||||
whitelistedPlayers: "<prefix><gold>Jugadores en lista blanca:"
|
||||
whitelistedPlayersFormat: "<gray>- <green>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
|
||||
whitelistAdded: "<prefix><green>%PLAYER% <gray>Añadido a la lista de mantenimiento!"
|
||||
whitelistAlreadyAdded: "<prefix><green>%PLAYER% <gray>Se encuentra en la lista de mantenimiento!"
|
||||
whitelistRemoved: "<prefix><red>%PLAYER% <gray>Eliminado de la lista de mantenimiento!"
|
||||
whitelistNotFound: "<prefix><gray>No se encuentra en la lista de mantenimiento!"
|
||||
whitelistEmpty: "<prefix><gray>La lista de mantenimiento está vacía! Usa '<gold>/Maintenance add <Player>' <gray>para agregar a alguien!"
|
||||
playerNotFound: "<prefix><gray>Ningun jugador con este nombre ha jugado en este servidor antes!"
|
||||
playerNotFoundUuid: "<prefix><red>No se pudo encontrar el jugador con ese UUID."
|
||||
playerNotOnline: "<prefix><gray>No hay jugador en línea con este nombre."
|
||||
offlinePlayerFetchError: "<prefix><red>Hubo un error al obtener el jugador sin conexión. Por favor, inténtalo de nuevo más tarde."
|
||||
invalidUuid: "<prefix><red>Formato inválido!"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<prefix><green>Has sido enviado a un servidor de espera!"
|
||||
forceWaitingServer: "<prefix><red>No puedes dejar el servidor de espera mientras el mantenimiento está activado!"
|
||||
serverNotFound: "<prefix><red>Ningún servidor con este nombre está registrado en el proxy!"
|
||||
singleTimerAlreadyRunning: "<prefix><red>Ya hay un temporizador programado!"
|
||||
singleTimerCancelled: "<prefix><red>El temporizador actual para el servidor <gold>%SERVER% <red>ha sido desactivado."
|
||||
singleTimerNotRunning: "<prefix><red>Actualmente no hay ningún temporizador en ejecución para ese servidor."
|
||||
singleEndtimerBroadcast: "<prefix><gray>El modo mantenimiento en el Servidor <gold>%SERVER% <gray>se desactivará en <green>%TIME%<gray>."
|
||||
singleEndtimerStarted: "<prefix><gray>Temporizador iniciado: El modo mantenimiento en el servidor <gold>%SERVER%<gray> se desactivará en <gold>%TIME%<gray>."
|
||||
singleStarttimerBroadcast: "<prefix><gray>El modo mantenimiento en el servidor <gold>%SERVER%<gray> se activará en <green>%TIME%<gray>"
|
||||
singleStarttimerStarted: "<prefix><gray>Temporizador iniciado: El modo mantenimiento en el servidor <gold>%SERVER%<gray> se activará en <gold>%TIME%<gray>."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>El modo mantenimiento en el servidor %SERVER% se activará en <gold>%TIME% <gray>y durará <gold>%DURATION%<gray>."
|
||||
singleScheduletimerStarted: "<prefix><gray>Temporizador iniciado: El modo mantenimiento en el servidor <gold>%SERVER%<gray> se activará en <gold>%TIME% <gray>y durará <gold>%DURATION%<gray>."
|
||||
singleMaintenanceKick: "<prefix><gray>El servidor <gold>%SERVER% <gray>se encuentra en mantenimiento! Intentalo mas tarde!"
|
||||
singleMaintenanceKickComplete: "<gray>El Servidor <gold>%SERVER% <gray>está en mantenimiento!<br><red>Vuelve Más Tarde!"
|
||||
singleMaintenanceActivated: "<prefix><gray>El modo mantenimiento esta activado en el servidor <gold>%SERVER%<gray>."
|
||||
singleMaintenanceDeactivated: "<prefix><gray>El modo mantenimiento ahora esta deshabilitado en <gold>%SERVER%<gray>."
|
||||
singleServerAlreadyEnabled: "<prefix><gray>El modo mantenimiento se encuentra habilitado en <gold>%SERVER%<gray>!"
|
||||
singleServerAlreadyDisabled: "<prefix><gray>El modo mantenimiento se encuentra deshabilitado en <gold>%SERVER%<gray>!"
|
||||
singleServerMaintenanceList: "<prefix><gray>Servidores proxy, que tienen habilitado el mantenimiento:"
|
||||
singleServerMaintenanceListEmpty: "<prefix><gray>No hay servidores proxy que están en mantenimiento."
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "Segundo"
|
||||
seconds: "Segundos"
|
||||
minute: "Minuto"
|
||||
minutes: "Minutos"
|
||||
hour: "Hora"
|
||||
hours: "Horas"
|
||||
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
|
||||
helpPageNotFound: "<prefix><gray>No hay pagina con ese número."
|
||||
helpNextPage: "<gray>Utilice <aqua>/maintenance help %PAGE% <gray>Para pasar a la siguiente ventana de ayuda."
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <dark_gray>(<gray>Si se ejecuta, se abortará el temporizador actual<dark_gray>)"
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Activa algunos registros de depuración)"
|
||||
helpDump: "<gold>/maintenance dump <dark_gray>(<gray>Descarga información del servidor, usada para informes de errores<dark_gray>)"
|
||||
helpHelp: "<gold>/maintenance help [page] <dark_gray>(<gray>Muestra la pagina de ayuda<dark_gray>)"
|
||||
helpMotd: "<gold>/maintenance motd [timer] <dark_gray>(<gray>Enumera los motivos de mantenimiento establecidos actualmente. Si se especifica el 'temporizador', se muestran los motivos del temporizador<dark_gray>)"
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd [timer] <index> <dark_gray>(<gray>Elimina un mantenimiento motd. Si se usa 'timer' como argumento, se eliminará un pingmessage de temporizador específico<dark_gray>)"
|
||||
helpSetMotd: "<gold>/maintenance setmotd [timer] <index> <1/2> <message> <dark_gray>(<gray>Establece un motd para el modo de mantenimiento. Si usa 'timer' como argumento, se establecerá un mensaje de ping específico para el tiempo<dark_gray>)"
|
||||
helpReload: "<gold>/maintenance reload <dark_gray>(<gray>Vuelve a cargar el archivo de configuración, el archivo de la lista blanca y el ícono del servidor<dark_gray>)"
|
||||
helpToggle: "<gold>/maintenance <on/off> <dark_gray>(<gray>Habilita / deshabilita el modo de mantenimiento<dark_gray>)"
|
||||
helpUpdate: "<gold>/maintenance update <dark_gray>(<gray>Descarga de forma remota la versión más reciente del complemento en su servidor<dark_gray>)"
|
||||
helpWhitelist: "<gold>/maintenance whitelist <dark_gray>(<gray>Muestra todos los jugadores en lista blanca para el modo de mantenimiento<dark_gray>)"
|
||||
helpWhitelistAdd: "<gold>/maintenance add <name/uuid> <dark_gray>(<gray>Agrega al jugador a la lista blanca de mantenimiento, para que puedan unirse al servidor aunque el mantenimiento esté habilitado<dark_gray>)"
|
||||
helpWhitelistRemove: "<gold>/maintenance remove <name/uuid> <dark_gray>(<gray>Quita al jugador de la lista blanca de mantenimiento<dark_gray>)"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [servidor] <dark_gray>(<gray>Si está funcionando, se abortará el temporizador actual<dark_gray>)"
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance <on/off> [server] <dark_gray>(<gray>Habilita / deshabilita el modo de mantenimiento<dark_gray>)"
|
||||
helpStatus: "<gold>/maintenance status <dark_gray>(<gray>Enumera todos los servidores proxy, que están actualmente en mantenimiento<dark_gray>)"
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
|
||||
noPermission: "<red>Vous n'avez pas la permission d'exécuter cette commande."
|
||||
kickmessage: "<red>Le serveur est actuellement en maintenance !<br>Réessayez plus tard !"
|
||||
maintenanceActivated: "<prefix><gold>Le mode maintenance est maintenant activé."
|
||||
maintenanceDeactivated: "<prefix><gold>Le mode maintenance est maintenant désactivé."
|
||||
alreadyEnabled: "<prefix><red>La maintenance est déjà activée !"
|
||||
alreadyDisabled: "<prefix><red>La maintenance est déjà désactivée !"
|
||||
endtimerBroadcast: "<prefix><gray>Le mode maintenance sera désactivé dans <gold>%TIME%<gray>."
|
||||
endtimerStarted: "<prefix><green>Minuterie : <gray>Le mode maintenance sera désactivé dans <gold>%TIME%<gray>."
|
||||
starttimerBroadcast: "<prefix><gray>Le mode de maintenance sera activé dans <gold>%TIME%<gray>."
|
||||
starttimerStarted: "<prefix><green>Minuterie : <gray>Le mode maintenance sera activé dans <gold>%TIME%<gray>."
|
||||
scheduletimerBroadcast: "<prefix><gray>Maintenance mode will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
scheduletimerStarted: "<prefix><green>Le minuteur a été lancé : <gray>La maintenance va être activé dans <gold>%TIME%<gray> et elle va durer pendant : <gold>%DURATION%<gray>."
|
||||
timerAlreadyRunning: "<prefix><red>Il y a déjà un horaire prévu !"
|
||||
timerNotRunning: "<prefix><red>Il n'y a actuellement aucune maintenance prévue."
|
||||
timerCancelled: "<prefix><red>La minuterie actuelle a été désactivée."
|
||||
timerTooLong: "<prefix><red>Le nombre doit être inférieur à 40320 (28 jours) !"
|
||||
timerMotdDisabled: "<prefix><red>Vous devez définir 'enable-timerspecific-messages' sur 'true' au sein de la configuration si vous souhaitez utiliser / éditer des motds spécifiques au timer."
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<prefix><yellow>%PLAYER% <red>a essayé de rejoindre le serveur !"
|
||||
motdList: "<prefix><gray>Liste de vos motds pour la maintenance :"
|
||||
motdListEmpty: "<prefix><red>Vous n'avez pas de motds d'entretien fixés !"
|
||||
reload: "<prefix><green>Fichier de configuration, liste blanche (whitelist) des joueurs autorisés, fichier de langue et icône de maintenance rechargés avec succès."
|
||||
removedMotd: "<prefix><green>Numéro de motd supprimé %INDEX%."
|
||||
removeMotdError: "<prefix><red>Vous n’avez qu’un motd, vous ne pouvez donc pas en supprimer !"
|
||||
setMotd: "<prefix><green>Ligne %LINE% du motd %INDEX%. fixée à %MOTD%"
|
||||
setMotdIndexError: "<prefix><red>Vous avez actuellement %MOTDS% motd(s), vous devez donc choisir un nombre compris entre 1 et %NEWAMOUNT%."
|
||||
setMotdLineError: "<prefix><red>Le deuxième argument doit être le numéro de ligne (1 ou 2) !"
|
||||
updateDownloading: "<prefix><red><bold>Téléchargement de la mise à jour..."
|
||||
updateFailed: "<prefix><dark_red><bold>La mise à jour a échoué !"
|
||||
updateFinished: "<prefix><green><bold>La mise à jour a été réussie ! Pour éviter les problèmes liés aux tâches et terminer la mise à jour, vous devez redémarrer le serveur !"
|
||||
whitelistedPlayers: "<prefix><gold>Liste blanche des joueurs pour la maintenance :"
|
||||
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
|
||||
whitelistAdded: "<prefix><aqua>%PLAYER% <green>a été ajouté la liste blanche de maintenance !"
|
||||
whitelistAlreadyAdded: "<prefix><aqua>%PLAYER% <red>est déjà dans la liste blanche de maintenance !"
|
||||
whitelistRemoved: "<prefix><aqua>%PLAYER% <green>a été retiré de la liste blanche de maintenance !"
|
||||
whitelistNotFound: "<prefix><red>Ce joueur n'est pas dans la liste blanche de maintenance !"
|
||||
whitelistEmpty: "<prefix><red>La liste blanche de maintenance est vide : Utilisation <yellow>/maintenance add <joueur/uuid> <red> afin d''ajouter quelqu''un !"
|
||||
playerNotFound: "<prefix><red>Aucun joueur avec ce nom n'a auparavant joué sur ce serveur."
|
||||
playerNotFoundUuid: "<prefix><red>Aucun joueur avec cet UUID n'a pu être trouvé."
|
||||
playerNotOnline: "<prefix><red>Il n'y a pas de joueur en ligne avec ce nom."
|
||||
offlinePlayerFetchError: "<prefix><red>Une erreur s'est produite lors de la récupération du joueur hors ligne. Veuillez réessayer plus tard."
|
||||
invalidUuid: "<prefix><red>Le format de l'UUID est invalide !"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<prefix><red>Vous avez été redirigé(e) vers un serveur d'attente !"
|
||||
forceWaitingServer: "<prefix><red>Vous ne pouvez pas quitter le serveur d'attente tant que la maintenance est activée !"
|
||||
serverNotFound: "<prefix><red>Aucun serveur avec ce nom n'est enregistré sur le proxy !"
|
||||
singleTimerAlreadyRunning: "<prefix><red>Il y a déjà un horaire prévu sur ce serveur !"
|
||||
singleTimerCancelled: "<prefix><red>La minuterie actuelle a été désactivée sur ce serveur."
|
||||
singleTimerNotRunning: "<prefix><red>Il n'y a actuellement aucune maintenance prévue sur ce serveur."
|
||||
singleEndtimerBroadcast: "<prefix><gray>La maintenance sur le serveur %SERVER% sera désactivée dans <gold>%TIME%<gray>."
|
||||
singleEndtimerStarted: "<prefix><green>Minuterie : <gray>Le mode maintenance sur le serveur %SERVER% sera désactivé dans <gold>%TIME%<gray>."
|
||||
singleStarttimerBroadcast: "<prefix><gray>La maintenance sur le serveur %SERVER% sera activée dans <gold>%TIME%<gray>."
|
||||
singleStarttimerStarted: "<prefix><green>Minuterie : <gray>Le mode maintenance sur le serveur %SERVER% sera activé dans <gold>%TIME%<gray>."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>Maintenance mode on server %SERVER% will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
singleScheduletimerStarted: "<prefix><green>Le minuteur a été lancé : <gray>La maintenance sur le serveur %SERVER% va être activé dans <gold>%TIME%<gray> et va durer pendant <gold>%DURATION%<gray>."
|
||||
singleMaintenanceKick: "<prefix><red>Le serveur %SERVER% est actuellement en maintenance ! Réessayez plus tard !"
|
||||
singleMaintenanceKickComplete: "<red>Le serveur %SERVER% est en maintenance !<br>Vous pouvez essayer un autre serveur !"
|
||||
singleMaintenanceActivated: "<prefix><gold>La maintenance est maintenant activée sur le serveur <yellow>%SERVER%<gold>."
|
||||
singleMaintenanceDeactivated: "<prefix><gold>La maintenance est maintenant désactivée sur le serveur <yellow>%SERVER%<gold>."
|
||||
singleServerAlreadyEnabled: "<prefix><red>La maintenance est déjà activée sur le serveur <yellow>%SERVER%<red> !"
|
||||
singleServerAlreadyDisabled: "<prefix><red>La maintenance est déjà désactivée sur le serveur <yellow>%SERVER%<red> !"
|
||||
singleServerMaintenanceList: "<prefix><gray>Serveurs proxy ayant la maintenance activée :"
|
||||
singleServerMaintenanceListEmpty: "<prefix><gray>Il n'y a pas de serveurs proxy en maintenance."
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "seconde"
|
||||
seconds: "secondes"
|
||||
minute: "minute"
|
||||
minutes: "minutes"
|
||||
hour: "heure"
|
||||
hours: "heures"
|
||||
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
|
||||
helpPageNotFound: "<prefix><red>Il n'y a pas cette page !"
|
||||
helpNextPage: "<gray>Utilisez <aqua>/maintenance help %PAGE% <gray>pour accéder à la fenêtre d’aide suivante."
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(Si en cours d'exécution, le minuteur actuel sera abandonné)"
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Active certains enregistrements de débogage)"
|
||||
helpDump: "<gold>/maintenance dump <gray>(Enregistre certaines informations sur le serveur, utilisées pour les rapports de bug)"
|
||||
helpHelp: "<gold>/maintenance help [page] <gray>(Montre cette belle fenêtre d'aide)"
|
||||
helpMotd: "<gold>/maintenance motd [timer] <gray>(Répertorie les paramètres de maintenance actuellement définis. Si vous spécifiez 'timer', les mots de la minuterie seront affichés)"
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd [timer] <index> <gray>(Supprime un motd de maintenance. Si vous utilisez 'timer' comme argument, un message ping spécifique au temporisateur sera supprimé)"
|
||||
helpSetMotd: "<gold>/maintenance setmotd [timer] <index> <1/2> <message> <gray>(Définit un motd pour le mode maintenance. Si vous utilisez 'timer' comme argument, un message ping spécifique à un temporisateur sera défini)"
|
||||
helpReload: "<gold>/maintenance reload <gray>(Recharge le fichier de configuration, la liste blanche, le fichier de langue et l'icône du serveur)"
|
||||
helpToggle: "<gold>/maintenance <on/off> <gray>(Active/désactive le mode maintenance)"
|
||||
helpUpdate: "<gold>/maintenance update <gray>(Télécharge la dernière version du plugin sur votre serveur)"
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>(Affiche les joueurs de la liste blanche pour le mode maintenance)"
|
||||
helpWhitelistAdd: "<gold>/maintenance add <name/uuid> <gray>(Ajoute un joueur à la liste blanche de maintenance afin qu'il puisse rejoindre le serveur même si la maintenance est activée)"
|
||||
helpWhitelistRemove: "<gold>/maintenance remove <name/uuid> <gray>(Supprime un joueur de la liste blanche de maintenance)"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [server] <gray>(Si en cours d'exécution, le minuteur actuel sera abandonné)"
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance <on/off> [server] <gray>(Active/désactive le mode maintenance)"
|
||||
helpStatus: "<gold>/maintenance status <gray>(Répertorie tous les serveurs mandatés actuellement en maintenance)"
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
|
||||
noPermission: "<red>Nincs engedélyed a parancs használatához."
|
||||
kickmessage: "<red>A szerver karbantartás alatt áll!<br>Próbáld újra később!"
|
||||
maintenanceActivated: "<prefix><gold>Karbantartás elindítva."
|
||||
maintenanceDeactivated: "<prefix><gold>Karbantartás befejezve."
|
||||
alreadyEnabled: "<prefix><red>Már engedélyezve van!"
|
||||
alreadyDisabled: "<prefix><red>Már le van tiltva!"
|
||||
endtimerBroadcast: "<prefix><gray>Felléphetsz <gold>%TIME%<gray> múlva."
|
||||
endtimerStarted: "<prefix><green>Időzítő Elindítva: <gray>Felléphetsz <gold>%TIME%<gray> múlva."
|
||||
starttimerBroadcast: "<prefix><gray>Karbantartás lesz <gold>%TIME%<gray> múlva."
|
||||
starttimerStarted: "<prefix><green>Időzítő elindítva: <gray>Karbantartás lesz <gold>%TIME%<gray> múlva."
|
||||
scheduletimerBroadcast: "<prefix><gray>Karbantartás lesz <gold>%TIME%<gray> múlva és <gold>%DURATION%<gray>-ig fog tartani."
|
||||
scheduletimerStarted: "<prefix><green>Időzítő elindítva: <gray>Karbantartás lesz <gold>%TIME%<gray> múlva és <gold>%DURATION%<gray>-ig fog tartani."
|
||||
timerAlreadyRunning: "<prefix><red>Már van ídőzítő beállítva!"
|
||||
timerNotRunning: "<prefix><red>Nincs időzítő beállítva."
|
||||
timerCancelled: "<prefix><red>Az időzítő letiltva."
|
||||
timerTooLong: "<prefix><red>A számnak kevesebbnek kell lennie 40320-nál (28 nap)!"
|
||||
timerMotdDisabled: "<prefix><red>Be kell állítanod a 'enable-timerspecific-messages' beállítást 'true'-ra, ha ezt szeretnéd."
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<prefix><yellow>%PLAYER% <red>megpróbált belépni a szerverre."
|
||||
motdList: "<prefix><gray>Lista a karbantartás motd-(k)ről:"
|
||||
motdListEmpty: "<prefix><red>Nincs beállítva karbantartás motd!"
|
||||
reload: "<prefix><green>Újratöltve."
|
||||
removedMotd: "<prefix><green>Motd szám törölve: %INDEX%."
|
||||
removeMotdError: "<prefix><red>Csak egy motd van,nem törölheted!"
|
||||
setMotd: "<prefix><green>Sor %LINE% beállítva %INDEX%-re. motd %MOTD%-ra"
|
||||
setMotdIndexError: "<prefix><red>Csak %MOTDS%-d van, úgyhogy válassz egy számot 1 és %NEWAMOUNT% között."
|
||||
setMotdLineError: "<prefix><red>Ennek egy sornak kell lennie (1 vagy 2)!"
|
||||
updateDownloading: "<prefix><red><bold>Frissítés letöltése..."
|
||||
updateFailed: "<prefix><dark_red><bold>Hiba!"
|
||||
updateFinished: "<prefix><green><bold>Telepítve,indítsd újra a szervered!"
|
||||
whitelistedPlayers: "<prefix><gold>Emberek akik beléphetnek karbantartáskor:"
|
||||
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
|
||||
whitelistAdded: "<prefix><green>Hozzáadva <aqua>%PLAYER% <green>a karbantartás fehérlistához!"
|
||||
whitelistAlreadyAdded: "<prefix><aqua>%PLAYER% <red>már benne van a karbantartás fehérlistában!"
|
||||
whitelistRemoved: "<prefix><green>Törölve <aqua>%PLAYER% <green>a listából!"
|
||||
whitelistNotFound: "<prefix><red>Ez a játékos nincs a karbantartás fehérlistában!"
|
||||
whitelistEmpty: "<prefix><red>A lista üres!"
|
||||
playerNotFound: "<prefix><red>Ez a játékos soha nem lépett fel a szerverre."
|
||||
playerNotFoundUuid: "<prefix><red>A játékos nem található."
|
||||
playerNotOnline: "<prefix><red>A játékos nincs online."
|
||||
offlinePlayerFetchError: "<prefix><red>Hiba történt az offline játékos lekérése közben. Kérlek, próbáld újra később!"
|
||||
invalidUuid: "<prefix><red>Rossz UUID!"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<prefix><red>El lettél küldve egy várakozós szerverre!"
|
||||
forceWaitingServer: "<prefix><red>Ezt a szervert a karbantartás végéig nem hagyhatod el!"
|
||||
serverNotFound: "<prefix><red>Nincs a proxy-n ilyen nevű szerver regisztrálva!"
|
||||
singleTimerAlreadyRunning: "<prefix><red>Már van egy visszaszámláló!"
|
||||
singleTimerCancelled: "<prefix><red>Az aktuális visszaszámláló <yellow>%SERVER% <red>szervernek letiltva."
|
||||
singleTimerNotRunning: "<prefix><red>Nem fut időzító a szerveren."
|
||||
singleEndtimerBroadcast: "<prefix><gray>A karbantartás a(z) %SERVER% szerveren le lesz tiltva <gold>%TIME%<gray> múlva."
|
||||
singleEndtimerStarted: "<prefix><green>Időzítő elindítva: <gray>A karbantartás mód a %SERVER% szerveren ki lesz kapcsolva <gold>%TIME% múlva<gray>."
|
||||
singleStarttimerBroadcast: "<prefix>A karbantartás a(z) %SERVER% szerveren engedélyezve lesz <gold>%TIME%<gray> múlva."
|
||||
singleStarttimerStarted: "<prefix><green>Időzítő elindítva: <gray>A karbantartás mód a %SERVER% szerveren be lesz kapcsolva <gold>%TIME% múlva<gray>."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>A karbantartás a(z) %SERVER% szerveren le lesz tiltva <gold>%TIME%<gray> múlva, és <gold>%DURATION%<gray>-ig fog tartani."
|
||||
singleScheduletimerStarted: "<prefix><green>Időzítő Elindítva: <gray>A karbantartás a(z) %SERVER% szerveren le lesz tiltva <gold>%TIME%<gray> múlva,és <gold>%DURATION<gray>-ig fog tartani."
|
||||
singleMaintenanceKick: "<prefix><red>A(z) %SERVER% szerver jelenleg karbantartás alatt van! Próbáld újra később!"
|
||||
singleMaintenanceKickComplete: "<red>A(z) %SERVER% karbantartás alatt van!<br>Megpróbálhatsz belépni újra!"
|
||||
singleMaintenanceActivated: "<prefix><gold>A karbantartás engedélyezve a(z) <yellow>%SERVER%<gold> szerveren."
|
||||
singleMaintenanceDeactivated: "<prefix><gold>A karbantartás letiltva a(z) <yellow>%SERVER%<gold>."
|
||||
singleServerAlreadyEnabled: "<prefix><red>A karbantartás már engedélyezve van a(z) <yellow>%SERVER%<red> szerveren!"
|
||||
singleServerAlreadyDisabled: "<prefix><red>A karbantartás már le van tiltva a(z) <yellow>%SERVER%<red> szerveren!"
|
||||
singleServerMaintenanceList: "<prefix><gray>Proxy szerverek,karbantartási móddal engedélyezve:"
|
||||
singleServerMaintenanceListEmpty: "<prefix><gray>Nincsenek proxy szerverek karbantartás alatt."
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "másodperc"
|
||||
seconds: "másodperc"
|
||||
minute: "perc"
|
||||
minutes: "perc"
|
||||
hour: "óra"
|
||||
hours: "óra"
|
||||
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
|
||||
helpPageNotFound: "<prefix><red>Nincs ilyen oldal!"
|
||||
helpNextPage: "<gray>Használd a <aqua>/maintenance help %PAGE% <gray>parancsot,hogy lapozz."
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(Az időzítő,ha fut nem lesz figelembe vévve)"
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Hibakeresés bekapcsolása)"
|
||||
helpDump: "<gold>/maintenance dump <gray>(A hibajelentési előzményeket törli)"
|
||||
helpHelp: "<gold>/maintenance help [page] <gray>(Megjelenítí a segítség ablakot)"
|
||||
helpMotd: "<gold>/maintenance motd [timer] <gray>(Megjeleníti a motd-ket)"
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd [timer] <index> <gray>(Törli a megadott motd-t)"
|
||||
helpSetMotd: "<gold>/maintenance setmotd [timer] <index> <1/2> <message> <gray>(Beállít egy motd-t)"
|
||||
helpReload: "<gold>/maintenance reload <gray>(Újratölti a plugint)"
|
||||
helpToggle: "<gold>/maintenance <on/off> <gray>(Karbantartás mód ki-be kapcsolása)"
|
||||
helpUpdate: "<gold>/maintenance update <gray>(Frissíti a plugin verziót)"
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>(Megmutatja a karbantartás fehérlistázottak listáját)"
|
||||
helpWhitelistAdd: "<gold>/maintenance add <name/uuid> <gray>(Hozzáadja a játékost a karbantartás fehérlistához)"
|
||||
helpWhitelistRemove: "<gold>/maintenance remove <name/uuid> <gray>(Kitörli a játékost a karbantartás fehérlistáról)"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [server] <gray>(Ha van karbantartás,akkor figyelmen kívül veszi az időzítőt)"
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance <on/off> [server] <gray>(Ki-be kapcsolja a karbantartás módot)"
|
||||
helpStatus: "<gold>/maintenance status <gray>(Kiírja az összes proxy szervert, ami karbantartás alatt van)"
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
|
||||
noPermission: "<red>Non hai i permessi necessari per eseguire quel comando."
|
||||
kickmessage: "<red>Il server è momentaneamente in manutenzione!<br>Riprova più tardi!"
|
||||
maintenanceActivated: "<prefix><gold>Modalità manutenzione ora attivata."
|
||||
maintenanceDeactivated: "<prefix><gold>Modalità manutenzione ora disattivata."
|
||||
alreadyEnabled: "<prefix><red>La modalità manutenzione è già attiva!"
|
||||
alreadyDisabled: "<prefix><red>La modalità mantenzione è già disattivata!"
|
||||
endtimerBroadcast: "<prefix><gray>La modalità manutenzione verrà disattivata tra <gold>%TIME%<gray>."
|
||||
endtimerStarted: "<prefix><green>Timer avviato: <gray>La modalità manutenzione verrà disattivata tra <gold>%TIME%<gray>."
|
||||
starttimerBroadcast: "<prefix><gray>La modalità manutenzione verrà attivata tra <gold>%TIME%<gray>."
|
||||
starttimerStarted: "<prefix><green>Timer avviato: <gray>La modalità manutenzione verrà attivata tra <gold>%TIME%<gray>."
|
||||
scheduletimerBroadcast: "<prefix><gray>Maintenance mode will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
scheduletimerStarted: "<prefix><green>Timer avviato: la modalità di manutenzione <gray>sarà abilitata in <gold>%TIME% <gray>e durerà per <gold>%DURATION%<gray>."
|
||||
timerAlreadyRunning: "<prefix><red>C'è già un timer programmato!"
|
||||
timerNotRunning: "<prefix><red>Non c'è nessun timer attivo al momento."
|
||||
timerCancelled: "<prefix><red>Il timer attuale è stato disattivato."
|
||||
timerTooLong: "<prefix><red>Il numero deve essere inferiore a 40320 (28 giorni)!"
|
||||
timerMotdDisabled: "<prefix><red>Devi impostare 'enable-timerspecific-messages' nella config su 'true', se desideri usare/modificare motds specifiche di un timer."
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<prefix><yellow>%PLAYER% <red>ha tentato di accedere al server."
|
||||
motdList: "<prefix><gray>Lista delle tue motds di manutenzione:"
|
||||
motdListEmpty: "<prefix><red>Non hai ancora nessuna motds di manutenzione!"
|
||||
reload: "<prefix><green>Ricaricata config, whitelistedplayers, file dei linguaggi e la icona di manutenzione."
|
||||
removedMotd: "<prefix><green>Rimossa motd numero %INDEX%."
|
||||
removeMotdError: "<prefix><red>Hai soltanto una motd, quindi non puoi rimuoverla!"
|
||||
setMotd: "<prefix><green>Impostata linea %LINE% in %INDEX%. motd manutenzione a %MOTD%"
|
||||
setMotdIndexError: "<prefix><red>Hai attualmente %MOTDS% motds, quindi devi scegliere un numero fra 1 e %NEWAMOUNT%."
|
||||
setMotdLineError: "<prefix><red>Il secondo argomento deve corrispondere alla linea (1 o 2)!"
|
||||
updateDownloading: "<prefix><red><bold>Scaricando aggiornamento..."
|
||||
updateFailed: "<prefix><dark_red><bold>Aggiornamento non riuscito!"
|
||||
updateFinished: "<prefix><green><bold>L'aggiornamento è completato! Per prevenire problemi e completare l'aggiornamento dovresti riavviare il server!"
|
||||
whitelistedPlayers: "<prefix><gold>Player in whitelist per la manutenzione:"
|
||||
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
|
||||
whitelistAdded: "<prefix><green>Aggiunto <aqua>%PLAYER% <green>alla whitelist della manutenzione!"
|
||||
whitelistAlreadyAdded: "<prefix><aqua>%PLAYER% <red>è già nella whitelist della manutenzione!"
|
||||
whitelistRemoved: "<prefix><green>Rimosso <aqua>%PLAYER% <green>dalla lista della manutenzione!"
|
||||
whitelistNotFound: "<prefix><red>Questo giocatore non fa parte della whitelist della manutenzione!"
|
||||
whitelistEmpty: "<prefix><red>La whitelist di manutenzione è vuota! Usa <yellow>/maintenance add <player/uuid> <red>per aggiungere qualcuno!"
|
||||
playerNotFound: "<prefix><red>Nessun giocatore con questo username è mai entrato nel server."
|
||||
playerNotFoundUuid: "<prefix><red>Nessun player con quell'uuid è stato trovato."
|
||||
playerNotOnline: "<prefix><red>Non c'è nessun giocatore online con quell'username."
|
||||
offlinePlayerFetchError: "<prefix><red>C'è stato un errore cercando il player offline. Riprova più tardi."
|
||||
invalidUuid: "<prefix><red>L'uuid presenta un formato invalido!"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<prefix><red>Sei stato inviato su un server d'attesa!"
|
||||
forceWaitingServer: "<prefix><red>Non puoi abbandonare il server d'attesa durante una manutenzione!"
|
||||
serverNotFound: "<prefix><red>Nessun server con questo nome è registrato sulla proxy!"
|
||||
singleTimerAlreadyRunning: "<prefix><red>È già presente un timer pianificato per quel server!"
|
||||
singleTimerCancelled: "<prefix><red>Il timer attuale per il server <yellow>%SERVER% <red>è stato rimosso."
|
||||
singleTimerNotRunning: "<prefix><red>Non c'è nessun timer correntemente attivo per quel server."
|
||||
singleEndtimerBroadcast: "<prefix><gray>La modalità manutenzione per il server %SERVER% verrà disabilitata tra <gold>%TIME%<gray>."
|
||||
singleEndtimerStarted: "<prefix><green>Timer avviato: <gray>La modalità manutenzione per il server %SERVER% verrà disattivata tra <gold>%TIME%<gray>."
|
||||
singleStarttimerBroadcast: "<prefix><gray>La modalità manutenzione per il server %SERVER% verrà disabilitata tra <gold>%TIME%<gray>."
|
||||
singleStarttimerStarted: "<prefix><green>Timer avviato: <gray>La modalità manutenzione per il server %SERVER% verrà attivata tra <gold>%TIME%<gray>."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>Maintenance mode on server %SERVER% will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
singleScheduletimerStarted: "<prefix><green>Timer avviato: <gray>Modalità di manutenzione sul server %SERVER% sarà attivato in <gold>%TIME% <gray>e durerà per <gold>%DURATION%<gray>."
|
||||
singleMaintenanceKick: "<prefix><red>Il server %SERVER% è in manutenzione al momento! Ritenta più tardi!"
|
||||
singleMaintenanceKickComplete: "<red>Il server %SERVER% è in manutenzione!<br>Prova a rientrare per accedere ad un'altro server!"
|
||||
singleMaintenanceActivated: "<prefix><gold>La modalità manutenzione è ora attiva sul server <yellow>%SERVER%<gold>."
|
||||
singleMaintenanceDeactivated: "<prefix><gold>La modalità manutenzione è ora disattivata sul server <yellow>%SERVER%<gold>."
|
||||
singleServerAlreadyEnabled: "<prefix><red>La modalità manutenzione è già attiva sul server <yellow>%SERVER%<red>!"
|
||||
singleServerAlreadyDisabled: "<prefix><red>La modalità manutenzione è già disattivata sul server <yellow>%SERVER%<red>!"
|
||||
singleServerMaintenanceList: "<prefix><gray>Servers sotto proxy che hanno la modalità manutenzione attiva:"
|
||||
singleServerMaintenanceListEmpty: "<prefix><gray>Nessun server sotto proxy ha la modalità manutenzione attiva."
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "secondo"
|
||||
seconds: "secondi"
|
||||
minute: "minuto"
|
||||
minutes: "minuti"
|
||||
hour: "ora"
|
||||
hours: "ore"
|
||||
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
|
||||
helpPageNotFound: "<prefix><red>Non c'è alcuna pagina con quel numero!"
|
||||
helpNextPage: "<gray>Usa <aqua>/maintenance help %PAGE% <gray>per andare alla prossima pagina d'aiuto."
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(Se attivo, l'attuale timer verrà fermato)"
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Enables some debug logging)"
|
||||
helpDump: "<gold>/maintenance dump <gray>(Copia alcune informazioni dal server, usato per segnalare problemi)"
|
||||
helpHelp: "<gold>/maintenance help [page] <gray>(Mostra questa fantastica pagina d'aiuto)"
|
||||
helpMotd: "<gold>/maintenance motd [timer] <gray>(Elenca le attuali motds di manutenzione impostate. Se specifichi 'timer', verranno mostrati i motds dei timer)"
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd [timer] <index> <gray>(Rimuove una motd di manutenzione. Se specifichi 'timer' come argomento, un messaggio specifico al timer verrà rimosso)"
|
||||
helpSetMotd: "<gold>/maintenance setmotd [timer] <index> <1/2> <message> <gray>(Imposta il motd per la manutenzione. Se specifichi 'timer' come argomento, un messaggio specifico al timer verrà impostato)"
|
||||
helpReload: "<gold>/maintenance reload <gray>(Ricarica il file di configurazione, whitelist server e icona)"
|
||||
helpToggle: "<gold>/maintenance <on/off> <gray>(Abilita/Disabilita modalità manutenzione)"
|
||||
helpUpdate: "<gold>/maintenance update <gray>(Scarica dall'esterno l'ultima versione del plugin nel server)"
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>(Elenca tutti i giocatori nella whitelist per la manutenzione)"
|
||||
helpWhitelistAdd: "<gold>/maintenance add <name/uuid> <gray>(Aggiunge il giocatore alla whitelist di manutenzione, così possono entrare in un server durante la manutenzione)"
|
||||
helpWhitelistRemove: "<gold>/maintenance remove <name/uuid> <gray>(Rimuovi il player dalla whitelist della manutenzione)"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [server] <gray>(Se attivo, il timer attuale verrà fermato)"
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance <on/off> [server] <gray>(Abilita/disabilita la modalità di manutenzione)"
|
||||
helpStatus: "<gold>/maintenance status <gray>(Elenca tutti i server sotto proxy che hanno la modalità manutenzione attiva)"
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
|
||||
noPermission: "<red>このコマンドを実行する権限がありません。"
|
||||
kickmessage: "<red>メンテナンス中です。<br>しばらくたってから、もう一度お試しください"
|
||||
maintenanceActivated: "<prefix><green>メンテナンスを有効にしました。"
|
||||
maintenanceDeactivated: "<prefix><yellow>メンテナンスを解除しました。"
|
||||
alreadyEnabled: "<prefix><red>メンテナンスは既に有効です。"
|
||||
alreadyDisabled: "<prefix><red>メンテナンスは既に解除されています。"
|
||||
endtimerBroadcast: "<prefix><gray>メンテナンスモードは、<gold>%TIME%<gray>で無効になります。"
|
||||
endtimerStarted: "<prefix><green>メンテナンスモードは<gold>%TIME%<gray>で解除されます。"
|
||||
starttimerBroadcast: "<prefix><gray>タイマー開始:<gray>メンテナンスモードは、<gold>%TIME%<gray>で有効になります。"
|
||||
starttimerStarted: "<prefix><green>タイマー開始:<gray>メンテナンスモードは<gold>%TIME%<gray>で開始されます。"
|
||||
scheduletimerBroadcast: "<prefix><gray>メンテナンスモードは、<gold>%TIME% <gray>で有効になり、<gold>%DURATION%<gray>の間、持続されます。"
|
||||
scheduletimerStarted: "<prefix><green>タイマー開始:<gray>メンテナンスモードは、<gold>%TIME% <gray>で有効になり、<gold>%DURATION%<gray>の間、持続されます。"
|
||||
timerAlreadyRunning: "<prefix><red>すでにタイマーが設定されています。"
|
||||
timerNotRunning: "<prefix><red>現在、実行中のタイマーはありません。"
|
||||
timerCancelled: "<prefix><red>現在のタイマーを中止しました。"
|
||||
timerTooLong: "<prefix><red>40320(28日)以下でなければなりません。"
|
||||
timerMotdDisabled: "<prefix><red>タイマー固有のモットーを使用/編集したい場合は、config.yml内の「enable-timerspecific-messages」を「true」に設定する必要があります。"
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<prefix><red>%PLAYER% <white>がサーバーに参加しようとしました。"
|
||||
motdList: "<prefix><gray>MOTDのリスト: "
|
||||
motdListEmpty: "<prefix><red>MOTDが設定されていません。"
|
||||
reload: "<prefix><green>再読み込みが完了しました。"
|
||||
removedMotd: "<prefix><green>motd番号%INDEX%を削除しました。"
|
||||
removeMotdError: "<prefix><red>motdは1つしかないので、削除することはできません。"
|
||||
setMotd: "<prefix><greenINDEX%.の行 %LINE% を %MOTD% に設定します。"
|
||||
setMotdIndexError: "<prefix><red>現在、%MOTDS%のMOTDを持っているので、1から%NEWAMOUNT%の間の数字を選ぶ必要があります。"
|
||||
setMotdLineError: "<prefix><red>第2引数には、行番号(1または2)を指定する必要があります。"
|
||||
updateDownloading: "<prefix><red><bold>アップデートをダウンロード中です..."
|
||||
updateFailed: "<prefix><dark_red><bold>アップデートに失敗しました。"
|
||||
updateFinished: "<prefix><green><bold>アップデートが完了しました! アップデートを完了させるために、サーバーを再起動する必要があります。"
|
||||
whitelistedPlayers: "<prefix><gold>メンテナンスのホワイトリストに追加されたプレイヤー: "
|
||||
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
|
||||
whitelistAdded: "<prefix><aqua>%PLAYER% <green>をホワイトリストに追加しました。"
|
||||
whitelistAlreadyAdded: "<prefix><aqua>%PLAYER% <green>をホワイトリストに追加しました。"
|
||||
whitelistRemoved: "<prefix><aqua>%PLAYER% <green>をホワイトリストから削除しました。"
|
||||
whitelistNotFound: "<prefix><aqua>%PLAYER% <green>不明なユーザーです。"
|
||||
whitelistEmpty: "<prefix><red>使用方法が違います。<yellow>/maintenance add <player/uuid> <red>を使用してください。"
|
||||
playerNotFound: "<prefix><red>不明なユーザーです。"
|
||||
playerNotFoundUuid: "<prefix><red>不明なUUIDです。"
|
||||
playerNotOnline: "<prefix><red>このユーザーはオンラインではありません。"
|
||||
offlinePlayerFetchError: "<prefix><red>オフラインプレイヤーの取得中にエラーが発生しました。しばらく経ってからもう一度お試しください。"
|
||||
invalidUuid: "<prefix><red>UUID形式が無効です。"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<prefix><red>待機サーバーに転送されました!"
|
||||
forceWaitingServer: "<prefix><red>メンテナンスが有効な間は、待機中のサーバーから離れることはできません。"
|
||||
serverNotFound: "<prefix><red>この名前のサーバーはプロキシに登録されていません。"
|
||||
singleTimerAlreadyRunning: "<prefix><red>そのサーバーには既にタイマーが設定されています。"
|
||||
singleTimerCancelled: "<prefix><yellow>%SERVER% <red>の現在のタイマが解除されました。"
|
||||
singleTimerNotRunning: "<prefix><red>現在、そのサーバーの実行中のタイマーはありません。"
|
||||
singleEndtimerBroadcast: "<prefix><gray>%SERVER% のメンテナンスモードは、<gold>%TIME%<gray> で無効になります。"
|
||||
singleEndtimerStarted: "<prefix><green>タイマー開始:<gray>%SERVER% のメンテナンスモードは、<gold>%TIME%<gray> で解除されます。"
|
||||
singleStarttimerBroadcast: "<prefix><gray>%SERVER% のメンテナンスモードは、<gold>%TIME%<gray> で有効になります。"
|
||||
singleStarttimerStarted: "<prefix><green>タイマー開始:<gray>%SERVER% のメンテナンスモードは、<gold>%TIME%<gray> で開始されます。"
|
||||
singleScheduletimerBroadcast: "<prefix><gray>サーバ %SERVER% のメンテナンスモードは <gold>%TIME% <gray> で有効になり、<gold>%DURATION%<gray> の間持続します。"
|
||||
singleScheduletimerStarted: "<prefix><green>タイマー開始:<gray>サーバ %SERVER% のメンテナンスモードは <gold>%TIME% <gray> で有効になり、<gold>%DURATION%<gray> の間持続します。"
|
||||
singleMaintenanceKick: "<prefix><red>%SERVER% はメンテナンス中です。しばらくたってからもう一度お試しください。"
|
||||
singleMaintenanceKickComplete: "<red>サーバー %SERVER% はメンテナンス中です!<br>他のサーバーに再び参加することができます!"
|
||||
singleMaintenanceActivated: "<prefix><yellow>%SERVER%<green> のメンテナンスを有効にしました。"
|
||||
singleMaintenanceDeactivated: "<prefix><yellow>%SERVER%<yellow> のメンテナンスを解除しました。"
|
||||
singleServerAlreadyEnabled: "<prefix><yellow>%SERVER%<red> のメンテナンスは既に有効です。"
|
||||
singleServerAlreadyDisabled: "<prefix><yellow>%SERVER%<red> のメンテナンスは既に無効です。"
|
||||
singleServerMaintenanceList: "<prefix><gray>プロキシサーバーで、メンテナンスが有効になっているもの: "
|
||||
singleServerMaintenanceListEmpty: "<prefix><gray>メンテナンス中のプロキシサーバーはありません。"
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "秒"
|
||||
seconds: "秒"
|
||||
minute: "分"
|
||||
minutes: "分"
|
||||
hour: "時間"
|
||||
hours: "時間"
|
||||
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
|
||||
helpPageNotFound: "<prefix><red>その番号のページがありません。"
|
||||
helpNextPage: "<gray>Use <aqua>/maintenance help %PAGE% <gray>で次のヘルプウィンドウに移動します。"
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(タイマーを実行していた場合、タイマーの実行を中止します。)"
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(デバッグロギングを有効にします。)"
|
||||
helpDump: "<gold>/maintenance dump <gray>(バグレポートに使用される、いくつかのサーバ情報をダンプします。)"
|
||||
helpHelp: "<gold>/maintenance help [page] <gray>(このようなヘルプページが表示されます。)"
|
||||
helpMotd: "<gold>/maintenance motd [timer] <gray>(現在設定されているメンテナンスMOTDを一覧表示します。'timer'を指定した場合は、タイマーの場合のMOTDを表示します。)"
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd [timer] <index> <gray>(メンテナンスの場合に使用されるMOTDを削除します。引数として'timer'を使用した場合にはタイマー固有のピングメッセージが表示されます。)"
|
||||
helpSetMotd: "<gold>/maintenance setmotd [timer] <index> <1/2> <message> <gray>(メンテナンスの場合に使用されるMOTDを設定します。引数として'timer'を使用した場合にはタイマー固有のピングメッセージが表示されます。)"
|
||||
helpReload: "<gold>/maintenance reload <gray>(設定ファイル、ホワイトリストファイル、サーバーアイコンを再読み込みします。)"
|
||||
helpToggle: "<gold>/maintenance <on/off> <gray>(メンテナンスモードの有効/解除を設定します。)"
|
||||
helpUpdate: "<gold>/maintenance update <gray>(最新版のプラグインをサーバーにリモートでダウンロードします。)"
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>(メンテナンスモードのホワイトリストに登録されているすべてのプレーヤーを表示します。)"
|
||||
helpWhitelistAdd: "<gold>/maintenance add <name/uuid> <gray>(メンテナンスのホワイトリストにユーザーを追加し、メンテナンスが有効な状態でもサーバーに参加できるようにします。)"
|
||||
helpWhitelistRemove: "<gold>/maintenance remove <name/uuid> <gray>(メンテナンスのホワイトリストからプレーヤーを削除します。)"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [server] <gray>(もし、タイマーが実行中の場合、現在のタイマーを中止します。)"
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance <on/off> [server] <gray>(メンテナンスモードの有効化/無効化を設定します。)"
|
||||
helpStatus: "<gold>/maintenance status <gray>(現在メンテナンス中のプロキシサーバーをすべてリストアップします。)"
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
|
||||
noPermission: "<red>권한이 없습니다."
|
||||
kickmessage: "<red>서버가 현재 점검 중입니다!<br>나중에 다시 시도하세요!"
|
||||
maintenanceActivated: "<prefix><gold>유지 관리 모드가 활성화되었습니다."
|
||||
maintenanceDeactivated: "<prefix><gold>유지 관리 모드가 비활성화되었습니다."
|
||||
alreadyEnabled: "<prefix><red>유지 관리가 이미 활성화되었습니다!"
|
||||
alreadyDisabled: "<prefix><red>유지보수가 이미 비활성화되었습니다!"
|
||||
endtimerBroadcast: "<prefix><gray>유지 관리 모드는<gold>%TIME%<gray>에 비활성화됩니다.."
|
||||
endtimerStarted: "<prefix><green>타이머가 시작 되었습니다: <gray>유지 관리 모드가 <gold>%TIME%<gray>에 비활성화됩니다."
|
||||
starttimerBroadcast: "<prefix><gray>유지 관리 모드가 <gold>%TIME%<gray>에 활성화됩니다.."
|
||||
starttimerStarted: "<prefix><green>타머가 시작 되었습니다: <gray>유지 관리 모드가 <gold>%TIME%<gray>에 활성화됩니다."
|
||||
scheduletimerBroadcast: "<prefix><gray>유지 관리 모드는 <gold>%TIME%<gray>에 활성화되며, <gold>%DURATION%<gray>동안 지속됩니다.."
|
||||
scheduletimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
timerAlreadyRunning: "<prefix><red>이미 타이머가 예약되어 있습니다!"
|
||||
timerNotRunning: "<prefix><red>현재 실행중인 타이머가 없습니다."
|
||||
timerCancelled: "<prefix><red>현재 타이머가 비활성화되었습니다."
|
||||
timerTooLong: "<prefix><red>숫자는 40320(28일) 미만이어야 합니다!"
|
||||
timerMotdDisabled: "<prefix><red>타이머별 모드를 사용/편집하려면 설정에서 'enable-timerspecific-messages'를 'true'로 설정해야 합니다."
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<prefix><yellow>%PLAYER%<red>님이 서버에 접속을 시도했습니다."
|
||||
motdList: "<prefix><gray>유지 관리 motd 목록:"
|
||||
motdListEmpty: "<prefix><red>유지 관리 motd가 설정되어 있지 않습니다!"
|
||||
reload: "<prefix><green>설정, 화이트리스트 플레이어, 언어 파일 및 유지 관리 아이콘을 새로고침 했습니다."
|
||||
removedMotd: "<prefix><green>%INDEX%번째 motd를 삭제했습니다."
|
||||
removeMotdError: "<prefix><red>motd가 하나만 있으므로 제거할 수 없습니다!"
|
||||
setMotd: "<prefix><green>INDEX%의 %LINE% 줄을 %MOTD%로 설정합니다."
|
||||
setMotdIndexError: "<prefix><red>현재 %MOTDS% motd가 있으므로 1에서 %NEWAMOUNT% 사이의 숫자를 선택해야 합니다."
|
||||
setMotdLineError: "<prefix><red>두 번째 인수는 줄 번호(1 또는 2)여야 합니다!"
|
||||
updateDownloading: "<prefix><red><bold>업데이트 다운로드 중..."
|
||||
updateFailed: "<prefix><dark_red><bold>업데이트에 실패했습니다!"
|
||||
updateFinished: "<prefix><green><bold>업데이트가 성공했습니다! 작업 관련 문제를 방지하고 업데이트를 완료하려면 서버를 다시 시작해야 합니다!"
|
||||
whitelistedPlayers: "<prefix><gold>화이트리스트 된 플레이어: "
|
||||
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
|
||||
whitelistAdded: "<prefix><green><aqua>%PLAYER%<green>님을 화이트리스트에 추가했습니다!"
|
||||
whitelistAlreadyAdded: "<prefix><aqua>%PLAYER%<red>님은 이미 화이트리스트에 있습니다!"
|
||||
whitelistRemoved: "<prefix><green><aqua>%PLAYER%<green>님을 화이트리스트에서 제거했습니다!"
|
||||
whitelistNotFound: "<prefix><red>이 플레이어는 유지 관리 화이트리스트에 없습니다!"
|
||||
whitelistEmpty: "<prefix><red>유지 관리 화이트리스트가 비어 있습니다! <yellow>/maintenance add <player/uuid> <red>으로 누군가를 추가하세요!"
|
||||
playerNotFound: "<prefix><red>이 이름을 가진 플레이어가 이 서버에서 플레이한 적이 없습니다."
|
||||
playerNotFoundUuid: "<prefix><red>해당 UUID를 가진 플레이어를 찾을 수 없습니다."
|
||||
playerNotOnline: "<prefix><red>해당 이름을 가진 플레이어가 온라인이 아닙니다."
|
||||
offlinePlayerFetchError: "<prefix><red>There was an error while fetching offline player. Please try again later."
|
||||
invalidUuid: "<prefix><red>유효하지 않은 UUID 형식입니다!"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<prefix><red>You have been sent to a waiting server!"
|
||||
forceWaitingServer: "<prefix><red>You cannot leave the waiting server while maintenance is enabled!"
|
||||
serverNotFound: "<prefix><red>No server with this name is registered on the proxy!"
|
||||
singleTimerAlreadyRunning: "<prefix><red>There is already a timer scheduled for that server!"
|
||||
singleTimerCancelled: "<prefix><red>The current timer for server <yellow>%SERVER% <red>has been disabled."
|
||||
singleTimerNotRunning: "<prefix><red>There is currently no running timer for that server."
|
||||
singleEndtimerBroadcast: "<prefix><gray>Maintenance mode on server %SERVER% will be disabled in <gold>%TIME%<gray>."
|
||||
singleEndtimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode on server %SERVER% will be deactivated in <gold>%TIME%<gray>."
|
||||
singleStarttimerBroadcast: "<prefix><gray>Maintenance mode on server %SERVER% will be enabled in <gold>%TIME%<gray>."
|
||||
singleStarttimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode on server %SERVER% will be activated in <gold>%TIME%<gray>."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>Maintenance mode on server %SERVER% will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
singleScheduletimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode on server %SERVER% will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
singleMaintenanceKick: "<prefix><red>The server %SERVER% is currently under maintenance! Try again later!"
|
||||
singleMaintenanceKickComplete: "<red>The server %SERVER% is under maintenance!<br>You may try to rejoin to go onto another server!"
|
||||
singleMaintenanceActivated: "<prefix><gold>Maintenance mode is now activated on server <yellow>%SERVER%<gold>."
|
||||
singleMaintenanceDeactivated: "<prefix><gold>Maintenance mode is now deactivated on server <yellow>%SERVER%<gold>."
|
||||
singleServerAlreadyEnabled: "<prefix><red>Maintenance is already enabled on server <yellow>%SERVER%<red>!"
|
||||
singleServerAlreadyDisabled: "<prefix><red>Maintenance is already disabled on server <yellow>%SERVER%<red>!"
|
||||
singleServerMaintenanceList: "<prefix><gray>Proxied servers, that have maintenance enabled:"
|
||||
singleServerMaintenanceListEmpty: "<prefix><gray>There are no proxied servers that are under maintenance."
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "second"
|
||||
seconds: "seconds"
|
||||
minute: "minute"
|
||||
minutes: "minutes"
|
||||
hour: "hour"
|
||||
hours: "hours"
|
||||
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
|
||||
helpPageNotFound: "<prefix><red>There is no page with that number!"
|
||||
helpNextPage: "<gray>Use <aqua>/maintenance help %PAGE% <gray>to get to the next help window."
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(If running, the current timer will be aborted)"
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Enables some debug logging)"
|
||||
helpDump: "<gold>/maintenance dump <gray>(Dumps some server information, used for bug reports)"
|
||||
helpHelp: "<gold>/maintenance help [page] <gray>(Shows this beautiful help window)"
|
||||
helpMotd: "<gold>/maintenance motd [timer] <gray>(Lists the currently set maintenance motds. If specifying 'timer', the timer motds are shown)"
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd [timer] <index> <gray>(Removes a maintenance motd. If using 'timer' as an argument, a timerspecific pingmessage will be removed)"
|
||||
helpSetMotd: "<gold>/maintenance setmotd [timer] <index> <1/2> <message> <gray>(Sets a motd for maintenance mode. If using 'timer' as an argument, a timerspecific pingmessage will be set)"
|
||||
helpReload: "<gold>/maintenance reload <gray>(Reloads the config file, whitelist file and the server-icon)"
|
||||
helpToggle: "<gold>/maintenance <on/off> <gray>(Enables/disables maintenance mode)"
|
||||
helpUpdate: "<gold>/maintenance update <gray>(Remotely downloads the newest version of the plugin onto your server)"
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>(Shows all whitelisted players for the maintenance mode)"
|
||||
helpWhitelistAdd: "<gold>/maintenance add <name/uuid> <gray>(Adds the player to the maintenance whitelist, so they can join the server even though maintenance is enabled)"
|
||||
helpWhitelistRemove: "<gold>/maintenance remove <name/uuid> <gray>(Removes the player from the maintenance whitelist)"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [server] <gray>(If running, the current timer will be aborted)"
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance <on/off> [server] <gray>(Enables/disables maintenance mode)"
|
||||
helpStatus: "<gold>/maintenance status <gray>(Lists all proxied servers, that are currently under maintenance)"
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Prace techniczne<dark_gray>] "
|
||||
noPermission: "<red>Nie posiadasz permisji na użycie tej komendy."
|
||||
kickmessage: "<red>Serwer jest w trakcie przerwy technicznej!<br>Spróbuj ponownie później!"
|
||||
maintenanceActivated: "<prefix><gold>Tryb konserwacji włączony."
|
||||
maintenanceDeactivated: "<prefix><gold>Tryb konserwacji wyłączony."
|
||||
alreadyEnabled: "<prefix><red>Przerwa techniczna już jest włącznona!"
|
||||
alreadyDisabled: "<prefix><red>Przerwa techniczna już jest wyłącznona!"
|
||||
endtimerBroadcast: "<prefix><gray>Przerwa techniczna zostanie zakończona za <gold>%TIME%<gray>."
|
||||
endtimerStarted: "<prefix><green>Rozpoczęto timer: <gray>Tryb konserwacji zostanie wyłączony za <gold>%TIME%<gray>."
|
||||
starttimerBroadcast: "<prefix><gray>Przerwa techniczna zacznie się za <gold>%TIME%<gray>."
|
||||
starttimerStarted: "<prefix><green>Rozpoczęto timer: <gray>Tryb konserwacji zostanie włączony za <gold>%TIME%<gray>."
|
||||
scheduletimerBroadcast: "<prefix><gray>Przerwa techniczna zostanie rozpoczęta za <gold>%TIME% <gray>i będzie trwała przez <gold>%DURATION%<gray>."
|
||||
scheduletimerStarted: "<prefix><green>Rozpoczęto timer: <gray>Przerwa techniczna zostanie rozpoczęta za <gold>%TIME% <gray>i będzie trwała przez <gold>%DURATION%<gray>."
|
||||
timerAlreadyRunning: "<prefix><red>Timer został już zaplanowany!"
|
||||
timerNotRunning: "<prefix><red>Aktualnie nie ma żadnego działającego timera."
|
||||
timerCancelled: "<prefix><red>Bieżący timer został anulowany."
|
||||
timerTooLong: "<prefix><red>Liczba musi byc mniejsz niż 40320 (28 dni)!"
|
||||
timerMotdDisabled: "<prefix><red>Musisz ustawić 'enable-timerspecific-messages' w konfiguracji na 'true', jeśli chcesz używać motd z timerem."
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<prefix><yellow>%PLAYER% <red>próbował(a) dołączyć do serwera."
|
||||
motdList: "<prefix><gray>Lista motd konserwacji:"
|
||||
motdListEmpty: "<prefix><red>Nie masz żadnych motd konserwacji!"
|
||||
reload: "<prefix><green>Ponownie załadowano plik konfiguracji, białą listę, plik języka i ikonę trybu przerwy technicznej."
|
||||
removedMotd: "<prefix><green>Usunięto motd numer %INDEX%."
|
||||
removeMotdError: "<prefix><red>Masz tylko jedno motd, którego nie możesz usunąć!"
|
||||
setMotd: "<prefix><green>Ustawiono wiersz %LINE% od %INDEX%. motd konserwacji na %MOTD%"
|
||||
setMotdIndexError: "<prefix><red>Masz aktualnie %MOTDS% motd, więc musisz wybrać liczbę między 1 a %NEWAMOUNT%."
|
||||
setMotdLineError: "<prefix><red>Drugi argument musi być numerem lini (1 lub 2)!"
|
||||
updateDownloading: "<prefix><red><bold>Pobieranie aktualizacji..."
|
||||
updateFailed: "<prefix><dark_red><bold>Aktualizacja nieudana!"
|
||||
updateFinished: "<prefix><green><bold>Aktualizacja udana! Aby zapobiec problemom i zakończyć instalację, zrestartuj serwer!"
|
||||
whitelistedPlayers: "<prefix><gold>Biała lista graczy trybu konserwacji:"
|
||||
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
|
||||
whitelistAdded: "<prefix>&Dodano <aqua>%PLAYER% <green>do białej listy konserwacji!"
|
||||
whitelistAlreadyAdded: "<prefix><aqua>%PLAYER% <red>już jest w białej liście konserwacji!"
|
||||
whitelistRemoved: "<prefix><green>Usunięto <aqua>%PLAYER% <green>z białej listy konserwacji!"
|
||||
whitelistNotFound: "<prefix><red>Ten gracz nie znajduje się na białej liście konserwacji."
|
||||
whitelistEmpty: "<prefix><red>Biała lista konserwacji jest pusta! Użyj <yellow>/maintenance add <player/uuid> <red>aby kogoś dodać!"
|
||||
playerNotFound: "<prefix><red>Ten gracz nigdy nie grał na serwerze."
|
||||
playerNotFoundUuid: "<prefix><red>Nie można znaleźć gracza z tym uuid."
|
||||
playerNotOnline: "<prefix><red>Nie ma gracza online z tym nickiem."
|
||||
offlinePlayerFetchError: "<prefix><red>There was an error while fetching offline player. Please try again later."
|
||||
invalidUuid: "<prefix><red>Nieprawidłowy format uuid!"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<prefix><red>Zostałeś wysłany do poczekalni!"
|
||||
forceWaitingServer: "<prefix><red>Nie możesz opuścić poczekalni gdy tryb konserwacji jest włączony!"
|
||||
serverNotFound: "<prefix><red>Brak serwera z tą nazwą!"
|
||||
singleTimerAlreadyRunning: "<prefix><red>Timer został już zaplanowany na tym serwerze!"
|
||||
singleTimerCancelled: "<prefix><red>Timer dla serwera <yellow>%SERVER% <red>został wyłączony."
|
||||
singleTimerNotRunning: "<prefix><red>Nie ma działających timerów na tym serwerze."
|
||||
singleEndtimerBroadcast: "<prefix><gray>Tryb konserwacji na serwerze %SERVER% zostanie wyłączony za <gold>%TIME%<gray>."
|
||||
singleEndtimerStarted: "<prefix><green>Rozpoczęto timer: <gray>Tryb konserwacji na serwerze %SERVER% zostanie wyłączony za <gold>%TIME%<gray>."
|
||||
singleStarttimerBroadcast: "<prefix><gray>Tryb konserwacji na serwerze %SERVER% zostanie włączony za <gold>%TIME%<gray>."
|
||||
singleStarttimerStarted: "<prefix><green>Rozpoczęto timer: <gray>Tryb konserwacji na serwerze %SERVER% zostanie włączony za <gold>%TIME%<gray>."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>Tryb konserwacji na serwerze %SERVER% zostanie włączony za <gold>%TIME% <gray>i będzie trwał <gold>%DURATION%<gray>."
|
||||
singleScheduletimerStarted: "<prefix><green>Rozpoczęto timer: <gray>Tryb konserwacji na serwerze %SERVER% zostanie włączony za <gold>%TIME% <gray>i będzie trwał <gold>%DURATION%<gray>."
|
||||
singleMaintenanceKick: "<prefix><red>Serwer %SERVER% jest w trakcie przerwy technicznej! Spróbuj ponownie później!"
|
||||
singleMaintenanceKickComplete: "<red>Serwer %SERVER% jest w trakcie przerwy technicznej!<br>Możesz spróbować dołączyć ponownie lub iść na inny serwer!"
|
||||
singleMaintenanceActivated: "<prefix><gold>Tryb konserwacji został włączony na serwerze <yellow>%SERVER%<gold>."
|
||||
singleMaintenanceDeactivated: "<prefix><gold>Tryb konserwacji został wyłączony na serwerze <yellow>%SERVER%<gold>."
|
||||
singleServerAlreadyEnabled: "<prefix><red>Tryb konserwacji jest już włączony na serwerze <yellow>%SERVER%<red>!"
|
||||
singleServerAlreadyDisabled: "<prefix><red>Tryb konserwacji jest już wyłączony na serwerze <yellow>%SERVER%<red>!"
|
||||
singleServerMaintenanceList: "<prefix><gray>Serwery z włączonym trybem konserwacji:"
|
||||
singleServerMaintenanceListEmpty: "<prefix><gray>Brak serwerów pod nadzorem."
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "sekunda"
|
||||
seconds: "sekund"
|
||||
minute: "minuta"
|
||||
minutes: "minuty"
|
||||
hour: "godzina"
|
||||
hours: "godzin/y"
|
||||
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
|
||||
helpPageNotFound: "<prefix><red>Strona z tym numerem nie istnieje!"
|
||||
helpNextPage: "<gray>Użyj <aqua>/maintenance help %PAGE% <gray>aby przejść do następnej strony pomocy."
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(Jeśli aktywny, timer zostanie anulowany)"
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Włacza logowanie dodatkowych informcji do debugowania)"
|
||||
helpDump: "<gold>/maintenance dump <gray>(Daje informacje o serwerze, używane do raportowania błędów)"
|
||||
helpHelp: "<gold>/maintenance help [strona] <gray>(Pokazuje tą piękną stronę pomocy)"
|
||||
helpMotd: "<gold>/maintenance motd [timer] <gray>(Wyświetla aktualnie ustawione motd. Jeśli wstawiono 'timer', motd z timerem zostaną pokazane)"
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd [timer] <index> <gray>(Usuwa motd konserwacji. Jeśli wstawiono 'timer', motd z timerem zostanie usunięte)"
|
||||
helpSetMotd: "<gold>/maintenance setmotd [timer] <index> <1/2> <wiadomość> <gray>(Ustawia motd konserwacji. Jeśli wstawiono 'timer', motd z timerem zostanie ustawione)"
|
||||
helpReload: "<gold>/maintenance reload <gray>(Przeładowuje plik konfiguracji, białej listy i ikonę serwera)"
|
||||
helpToggle: "<gold>/maintenance <on/off> <gray>(Włącza/wyłącza tryb konserwacji)"
|
||||
helpUpdate: "<gold>/maintenance update <gray>(Pobiera najnowszą wersję plugina)"
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>(Pokazuje białą listę trybu konserwacji)"
|
||||
helpWhitelistAdd: "<gold>/maintenance add <nazwa/uuid> <gray>(Dodaje gracza do listy konserwacji, aby mogli dołączyć do serwera w trakcie konserwacji)"
|
||||
helpWhitelistRemove: "<gold>/maintenance remove <nazwa/uuid> <gray>(Usuwa gracza z listy trybu konserwacji)"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [serwer] <gray>(Jeśli aktywny, timer zostanie anulowany)"
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance <on/off> [serwer] <gray>(Włącza/wyłącza tryb konserwacji)"
|
||||
helpStatus: "<gold>/maintenance status <gray>(Wyświetla wszystkie serwery w trybie konserwacji)"
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
|
||||
noPermission: "<red>Você não tem permissão para executar esse comando."
|
||||
kickmessage: "<red>O servidor está em manutenção!<br>Tente novamente mais tarde!"
|
||||
maintenanceActivated: "<prefix><gold>O modo de manutenção agora está ativado."
|
||||
maintenanceDeactivated: "<prefix><gold>O modo de manutenção agora está desativado."
|
||||
alreadyEnabled: "<prefix><red>A manutenção já está ativada!"
|
||||
alreadyDisabled: "<prefix><red>A manutenção já está desativada!"
|
||||
endtimerBroadcast: "<prefix><gray>O modo de manutenção será desativado em <gold>%TIME%<gray>."
|
||||
endtimerStarted: "<prefix><green>Iniciou o temporizador: <gray>O modo de manutenção será desativado em <gold>%TIME%<gray>."
|
||||
starttimerBroadcast: "<prefix><gray>O modo de manutenção será ativado em <gold>%TIME%<gray>."
|
||||
starttimerStarted: "<prefix><green>Iniciou o temporizador: <gray>O modo de manutenção será ativado em <gold>%TIME%<gray>."
|
||||
scheduletimerBroadcast: "<prefix><gray>O modo de manutenção será ativado em <gold>%TIME% <gray>e durará <gold>%DURATION%<gray>."
|
||||
scheduletimerStarted: "<prefix><green>Iniciou o temporizador: <gray>O modo de manutenção será ativado em <gold>%TIME% <gray>e durará <gold>%DURATION%<gray>."
|
||||
timerAlreadyRunning: "<prefix><red>Já há um temporizador agendado!"
|
||||
timerNotRunning: "<prefix><red>Não há temporizador em execução no momento."
|
||||
timerCancelled: "<prefix><red>O temporizador atual foi desativado."
|
||||
timerTooLong: "<prefix><red>O número deve ser menor que 40320 (28 dias)!"
|
||||
timerMotdDisabled: "<prefix><red>Você deve definir 'enable-timerspecific-messages' na configuração como 'true', se desejar usar/editar motds específicas do temporizador."
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<prefix><yellow>%PLAYER% <red>tentou entrar no servidor."
|
||||
motdList: "<prefix><gray>Lista das suas motds de manutenção:"
|
||||
motdListEmpty: "<prefix><red>Você não possui nenhuma motd de manutenção definida!"
|
||||
reload: "<prefix><green>Recarregou a configuração, lista de jogadores com permissão, arquivo de idioma e o ícone de manutenção."
|
||||
removedMotd: "<prefix><green>Motd número %INDEX% removida."
|
||||
removeMotdError: "<prefix><red>Você possui apenas uma motd, portanto, não pode remover nenhuma!"
|
||||
setMotd: "<prefix><green>Definiu a linha %LINE% da motd de manutenção %INDEX% para %MOTD%"
|
||||
setMotdIndexError: "<prefix><red>No momento, você possui %MOTDS% motds, portanto, deve escolher um número entre 1 e %NEWAMOUNT%."
|
||||
setMotdLineError: "<prefix><red>O segundo argumento deve ser o número da linha (1 ou 2)!"
|
||||
updateDownloading: "<prefix><red><bold>Baixando atualização..."
|
||||
updateFailed: "<prefix><dark_red><bold>Falha na atualização!"
|
||||
updateFinished: "<prefix><green><bold>A atualização foi bem-sucedida! Para evitar problemas com tarefas e concluir a atualização, você deve reiniciar o servidor!"
|
||||
whitelistedPlayers: "<prefix><gold>Jogadores na lista branca para a manutenção:"
|
||||
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
|
||||
whitelistAdded: "<prefix><green>Adicionou <aqua>%PLAYER% <green>à lista branca de manutenção!"
|
||||
whitelistAlreadyAdded: "<prefix><aqua>%PLAYER% <red>já está na lista branca de manutenção!"
|
||||
whitelistRemoved: "<prefix><green>Removeu <aqua>%PLAYER% <green>da lista branca de manutenção!"
|
||||
whitelistNotFound: "<prefix><red>Este jogador não está na lista branca de manutenção!"
|
||||
whitelistEmpty: "<prefix><red>A lista branca de manutenção está vazia! Use <yellow>/maintenance add <player/uuid> <red>para adicionar alguém!"
|
||||
playerNotFound: "<prefix><red>Nenhum jogador com esse nome já jogou neste servidor."
|
||||
playerNotFoundUuid: "<prefix><red>Nenhum jogador com esse UUID foi encontrado."
|
||||
playerNotOnline: "<prefix><red>Não há nenhum jogador online com esse nome."
|
||||
offlinePlayerFetchError: "<prefix><red>Ocorreu um erro ao recuperar os dados do jogador off-line. Por favor, tente novamente mais tarde."
|
||||
invalidUuid: "<prefix><red>Formato de UUID inválido!"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<prefix><red>Você foi enviado para um servidor de espera!"
|
||||
forceWaitingServer: "<prefix><red>Você não pode sair do servidor de espera enquanto a manutenção estiver ativada!"
|
||||
serverNotFound: "<prefix><red>Nenhum servidor com esse nome está registrado no proxy!"
|
||||
singleTimerAlreadyRunning: "<prefix><red>Já há um temporizador agendado para esse servidor!"
|
||||
singleTimerCancelled: "<prefix><red>O temporizador atual para o servidor <yellow>%SERVER% <red>foi desativado."
|
||||
singleTimerNotRunning: "<prefix><red>No momento, não há temporizador em execução para esse servidor."
|
||||
singleEndtimerBroadcast: "<prefix><gray>O modo de manutenção no servidor %SERVER% será desativado em <gold>%TIME%<gray>."
|
||||
singleEndtimerStarted: "<prefix><green>Iniciou o temporizador: <gray>O modo de manutenção no servidor %SERVER% será desativado em <gold>%TIME%<gray>."
|
||||
singleStarttimerBroadcast: "<prefix><gray>O modo de manutenção no servidor %SERVER% será ativado em <gold>%TIME%<gray>."
|
||||
singleStarttimerStarted: "<prefix><green>Iniciou o temporizador: <gray>O modo de manutenção no servidor %SERVER% será ativado em <gold>%TIME%<gray>."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>O modo de manutenção no servidor %SERVER% será ativado em <gold>%TIME% <gray>e durará <gold>%DURATION%<gray>."
|
||||
singleScheduletimerStarted: "<prefix><green>Iniciou o temporizador: <gray>O modo de manutenção no servidor %SERVER% será ativado em <gold>%TIME% <gray>e durará <gold>%DURATION%<gray>."
|
||||
singleMaintenanceKick: "<prefix><red>O servidor %SERVER% está em manutenção! Tente novamente mais tarde!"
|
||||
singleMaintenanceKickComplete: "<red>O servidor %SERVER% está em manutenção!<br>Você pode tentar se reconectar para ir para outro servidor!"
|
||||
singleMaintenanceActivated: "<prefix><gold>O modo de manutenção foi ativado no servidor <yellow>%SERVER%<gold>."
|
||||
singleMaintenanceDeactivated: "<prefix><gold>O modo de manutenção foi desativado no servidor <yellow>%SERVER%<gold>."
|
||||
singleServerAlreadyEnabled: "<prefix><red>A manutenção já está ativada no servidor <yellow>%SERVER%<red>!"
|
||||
singleServerAlreadyDisabled: "<prefix><red>A manutenção já está desativada no servidor <yellow>%SERVER%<red>!"
|
||||
singleServerMaintenanceList: "<prefix><gray>Servidores proxy com manutenção ativada:"
|
||||
singleServerMaintenanceListEmpty: "<prefix><gray>Não há servidores proxy em manutenção no momento."
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "segundo"
|
||||
seconds: "segundos"
|
||||
minute: "minuto"
|
||||
minutes: "minutos"
|
||||
hour: "hora"
|
||||
hours: "horas"
|
||||
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
|
||||
helpPageNotFound: "<prefix><red>Não há página com esse número!"
|
||||
helpNextPage: "<gray>Use <aqua>/maintenance help %PAGE% <gray>para ir para a próxima janela de ajuda."
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(Se estiver em execução, o temporizador atual será abortado)"
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Ativa alguns registros de depuração)"
|
||||
helpDump: "<gold>/maintenance dump <gray>(Exibe algumas informações do servidor, usadas para relatórios de bugs)"
|
||||
helpHelp: "<gold>/maintenance help [página] <gray>(Mostra esta bela janela de ajuda)"
|
||||
helpMotd: "<gold>/maintenance motd [temporizador] <gray>(Lista as motds de manutenção atualmente definidas. Se 'temporizador' for especificado, as motds de temporizador serão mostradas)"
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd [temporizador] <índice> <gray>(Remove uma motd de manutenção. Se usar 'temporizador' como argumento, uma mensagem de ping específica do temporizador será removida)"
|
||||
helpSetMotd: "<gold>/maintenance setmotd [temporizador] <índice> <1/2> <mensagem> <gray>(Define uma motd para o modo de manutenção. Se usar 'temporizador' como argumento, uma mensagem de ping específica do temporizador será definida)"
|
||||
helpReload: "<gold>/maintenance reload <gray>(Recarrega o arquivo de configuração, arquivo de lista branca e o ícone do servidor)"
|
||||
helpToggle: "<gold>/maintenance <on/off> <gray>(Ativa/desativa o modo de manutenção)"
|
||||
helpUpdate: "<gold>/maintenance update <gray>(Baixa remotamente a versão mais recente do plugin para o seu servidor)"
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>(Mostra todos os jogadores na lista branca para o modo de manutenção)"
|
||||
helpWhitelistAdd: "<gold>/maintenance add <nome/uuid> <gray>(Adiciona o jogador à lista branca de manutenção, permitindo que eles entrem no servidor mesmo com a manutenção ativada)"
|
||||
helpWhitelistRemove: "<gold>/maintenance remove <nome/uuid> <gray>(Remove o jogador da lista branca de manutenção)"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [servidor] <gray>(Se estiver em execução, o temporizador atual será abortado)"
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance <on/off> [servidor] <gray>(Ativa/desativa o modo de manutenção)"
|
||||
helpStatus: "<gold>/maintenance status <gray>(Lista todos os servidores proxy que estão atualmente em manutenção)"
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
|
||||
noPermission: "<red>У вас недостаточно прав."
|
||||
kickmessage: "<red>Сервер закрыт на технические работы!<br>Попробуйте позже!"
|
||||
maintenanceActivated: "<prefix><gold>Режим технических работ включен."
|
||||
maintenanceDeactivated: "<prefix><gold>Режим технических работ выключен."
|
||||
alreadyEnabled: "<prefix><red>Режим технических работ уже включен!"
|
||||
alreadyDisabled: "<prefix><red>Режим технических работ не был включен!"
|
||||
endtimerBroadcast: "<prefix><gray>Сервер будет открыт через <gold>%TIME%<gray>."
|
||||
endtimerStarted: "<prefix><green>Таймер запущен: <gray>Сервер будет открыт через <gold>%TIME%<gray>."
|
||||
starttimerBroadcast: "<prefix><gray>Сервер будет закрыт на тех. работы через <gold>%TIME%<gray>."
|
||||
starttimerStarted: "<green>Таймер успешно запущен! Сервер будет закрыт на технические работы через <white>%TIME%<green>!"
|
||||
scheduletimerBroadcast: "<prefix><gray>Maintenance mode will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
scheduletimerStarted: "<prefix><green>Начат таймер: <gray>Тех. работы будут включены <gold>%TIME% <gray>и будут последние для <gold>%DURATION%<gray>."
|
||||
timerAlreadyRunning: "<red>Таймер уже запущен!"
|
||||
timerNotRunning: "<red>Таймер не был запущен."
|
||||
timerCancelled: "<gray>Таймер был остановлен."
|
||||
timerTooLong: "<red>Число должно быть не больше чем <white>40320 <red>(<white>28 <red>дней)."
|
||||
timerMotdDisabled: "<red>Сообщения по таймеру выключены в настройках плагина."
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<red>Игрок <white>%PLAYER% <red>пытался зайти на сервер."
|
||||
motdList: "<gray>Список титульных строк в режиме технических работ:"
|
||||
motdListEmpty: "<red>Список пуст."
|
||||
reload: "<green>Плагин успешно перезагружен!"
|
||||
removedMotd: "<green>Титульная строка с индексом <white>%INDEX% <green>успешно удалена!"
|
||||
removeMotdError: "<red>Вы не можете удалить последние 2 титульные строки."
|
||||
setMotd: "<green>Титульная строка <white>%LINE% <green>с индексом <white>%INDEX% <green>успешно изменена: <white>%MOTD%"
|
||||
setMotdIndexError: "<red>Неверный индекс, допустимые значения: 1 - %NEWAMOUNT%."
|
||||
setMotdLineError: "<red>Второй аргумент должен быть номером строки (1 или 2)!"
|
||||
updateDownloading: "<green>Обновление загружается..."
|
||||
updateFailed: "<red>Обновление не удалось!"
|
||||
updateFinished: "<green>Обновление успешно пройдено! Перезагрузите сервер, чтобы избежать возможных проблем."
|
||||
whitelistedPlayers: "<gray>Белый лист в режиме технических работ:"
|
||||
whitelistedPlayersFormat: "<gray>- <white>%NAME% <gray>(<white>%UUID%<gray>)"
|
||||
whitelistAdded: "<green>Игрок <white>%PLAYER% <green>успешно добавлен в белый лист!"
|
||||
whitelistAlreadyAdded: "<red>Игрок <white>%PLAYER% <red>уже в белом листе!"
|
||||
whitelistRemoved: "<green>Игрок <white>%PLAYER% <green>успешно удалён из белого листа!"
|
||||
whitelistNotFound: "<red>Данный игрок не находится в белом листе!"
|
||||
whitelistEmpty: "<red>Белый лист пуст! Используйте /maintenance add [игрок|uuid] чтобы добавить кого-нибудь."
|
||||
playerNotFound: "<red>Игрок не найден!"
|
||||
playerNotFoundUuid: "<red>Игрок с таким UUID не найден!"
|
||||
playerNotOnline: "<red>Игрок должен быть онлайн!"
|
||||
offlinePlayerFetchError: "<prefix><red>Произошла ошибка при получении игрока в автономном режиме. Пожалуйста, повторите попытку позже."
|
||||
invalidUuid: "<red>Неверный формат UUID!"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<red>Вы были перемещены в лобби!"
|
||||
forceWaitingServer: "<red>Вы не можете покинуть лобби во время технических работ!"
|
||||
serverNotFound: "<red>Сервер не найден!"
|
||||
singleTimerAlreadyRunning: "<red>Таймер сервера <white>%SERVER% <red>уже запущен!"
|
||||
singleTimerCancelled: "<gray>Таймер сервера <white>%SERVER% <gray>был остановлен."
|
||||
singleTimerNotRunning: "<red>Таймер сервера <white>%SERVER% <red>не был запущен."
|
||||
singleEndtimerBroadcast: "<green>Сервер <white>%SERVER% <green>будет открыт через <white>%TIME%<green>!"
|
||||
singleEndtimerStarted: "<prefix><green>Начат таймер: <gray>Тех. работы будут включены <gold>%TIME% <gray>и будут последние для <gold>%DURATION%<gray>."
|
||||
singleStarttimerBroadcast: "<red>Внимание! Сервер <white>%SERVER% <red>будет закрыт на технические работы через <white>%TIME%<red>!"
|
||||
singleStarttimerStarted: "<prefix><red>Внимание! <gray>Сервер <green>%SERVER%<gray> будет закрыт на технические работы через <gold>%TIME%<gray>."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>Maintenance mode on server %SERVER% will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
singleScheduletimerStarted: "<prefix><green>Таймер начат: <gray>Тех. работы на сервере %SERVER% будут начаты в <gold>%TIME% <gray>и продлятся <gold>%DURATION%<gray>."
|
||||
singleMaintenanceKick: "<red>Данный сервер закрыт на технические работы! Попробуйте позже."
|
||||
singleMaintenanceKickComplete: "<red>Данный сервер закрыт на технические работы!<br>Попробуйте позже."
|
||||
singleMaintenanceActivated: "<green>Режим технических работ на сервере <white>%SERVER% <green>включен!"
|
||||
singleMaintenanceDeactivated: "<green>Режим технических работ на сервере <white>%SERVER% <green>выключен!"
|
||||
singleServerAlreadyEnabled: "<red>Режим технических работ на сервере <white>%SERVER% <red>уже включен!"
|
||||
singleServerAlreadyDisabled: "<red>Режим технических работ на сервере <white>%SERVER% <red>не был включен."
|
||||
singleServerMaintenanceList: "<gray>Сервера на которых включен режим технических работ:"
|
||||
singleServerMaintenanceListEmpty: "<gray>Сервера на которых включен режим технических работ: <white>пусто"
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "секунду"
|
||||
seconds: "секунд"
|
||||
minute: "минуту"
|
||||
minutes: "минут"
|
||||
hour: "час"
|
||||
hours: "часов"
|
||||
helpHeader: "<gray>========[ <white>%NAME% <gray>| <gold>%PAGE%<white>/<gold>%MAX% <gray>]========"
|
||||
helpPageNotFound: "<red>Страница не найдена."
|
||||
helpNextPage: "<white>Используйте <gold>/maintenance help %PAGE% <white>чтобы перейти на следующую страницу."
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>- <white>Остановить таймер включения/выключения режима технических работ."
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Enables some debug logging)"
|
||||
helpDump: "<gold>/maintenance dump <gray>- <white>Создать дамп."
|
||||
helpHelp: "<gold>/maintenance help [страница] <gray>- <white>Отобразить список доступных команд."
|
||||
helpMotd: "<gold>/maintenance motd <timer> <gray>- <white>Отобразить список титульных сообщений."
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd <timer> [индекс] <gray>- <white>Удалить титульное сообщение."
|
||||
helpSetMotd: "<gold>/maintenance setmotd <timer> [индекс] [1|2] [сообщение] <gray>- <white>Добавить новое титульное сообщение."
|
||||
helpReload: "<gold>/maintenance reload <gray>- <white>Перезагрузить плагин."
|
||||
helpToggle: "<gold>/maintenance [on|off] <gray>- <white>Включить/выключить режим технических работ."
|
||||
helpUpdate: "<gold>/maintenance update <gray>- <white>Обновить плагин."
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>- <white>Отобразить всех игроков из белого списка."
|
||||
helpWhitelistAdd: "<gold>/maintenance add [ник|uuid] <gray>- <white>Добавить игрока в белый список."
|
||||
helpWhitelistRemove: "<gold>/maintenance remove [ник|uuid] <gray>- <white>Удалить игрока из белого списка."
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [сервер] <gray>- <white>Остановить таймер включения/выключения режима технических работ."
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance [on|off] [сервер] <gray>- <white>Включить/выключить режим технических работ."
|
||||
helpStatus: "<gold>/maintenance status <gray>- <white>Список всех серверов закрытых на технические работы."
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Underhållsarbete<dark_gray>] "
|
||||
noPermission: "<red>Du har inte rättigheterna att utfärda det kommandot."
|
||||
kickmessage: "<red>Servern är just nu under underhåll!<br>Försök igen senare!"
|
||||
maintenanceActivated: "<prefix><gold>Underhållsläge är aktiverat."
|
||||
maintenanceDeactivated: "<prefix><gold>Underhållsläge är avaktiverat."
|
||||
alreadyEnabled: "<prefix><red>Underhållsläge är redan aktiverat!"
|
||||
alreadyDisabled: "<prefix><red>Underhållsläge är redan avaktiverat!"
|
||||
endtimerBroadcast: "<prefix><gray>Underhållsläget kommer att vara avstängt om <gold>%TIME%<gray>."
|
||||
endtimerStarted: "<prefix><green>Startade timer: <gray>Underhållsläge kommer stängas av om <gold>%TIME%<gray>."
|
||||
starttimerBroadcast: "<prefix><gray>Underhållsläge kommer aktiveras om <gold>%TIME%<gray>."
|
||||
starttimerStarted: "<prefix><green>Startade timer: <gray>Underhållsläge kommer aktiveras om <gold>%TIME%<gray>."
|
||||
scheduletimerBroadcast: "<prefix><gray>Underhållsläge kommer aktiveras om <gold>%TIME% <gray>och håller på i <gold>%DURATION%<gray>."
|
||||
scheduletimerStarted: "<prefix><green>Startade timer: <gray>Underhållsläge kommer aktiveras om <gold>%TIME% <gray>och håller på i <gold>%DURATION%<gray>."
|
||||
timerAlreadyRunning: "<prefix><red>Det finns redan en timer schemalagd!"
|
||||
timerNotRunning: "<prefix><red>Ingen timer är aktiverad för tillfället."
|
||||
timerCancelled: "<prefix><red>Den nuvarande timern har blivit inaktiverad."
|
||||
timerTooLong: "<prefix><red>Talet måste vara mindre än 40320 (28 days)!"
|
||||
timerMotdDisabled: "<prefix><red>Du måste sätta värdet för 'enable-timerspecific-messages' i konfigurationsfilen filen till 'true', om du vill använda/redigera tidsspecifika motds."
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<prefix><yellow>%PLAYER% <red>försökte ansluta till servern."
|
||||
motdList: "<prefix><gray>Lista på dina underhålls motds:"
|
||||
motdListEmpty: "<prefix><red>Du har inte skapat några underhålls motds än!"
|
||||
reload: "<prefix><green>Laddade om konfigurationsfilen, vitlistade spelare, språkfilerna och underhålls ikonen."
|
||||
removedMotd: "<prefix><green>Tog bort motd nummer %INDEX%."
|
||||
removeMotdError: "<prefix><red>Du har bara en motd, så du kan inte ta bort några!"
|
||||
setMotd: "<prefix><green>Satte linjen %LINE% av %INDEX%. underhålls motd till %MOTD%"
|
||||
setMotdIndexError: "<prefix><red>Du har just nu %MOTDS% motds, så du måste välja ett nummer mellan 1 och %NEWAMOUNT%."
|
||||
setMotdLineError: "<prefix><red>Det andra argumentet måste vara linjenumret (1 or 2)!"
|
||||
updateDownloading: "<prefix><red><bold>Laddar ner uppdatering..."
|
||||
updateFailed: "<prefix><dark_red><bold>Uppdatering misslyckades!"
|
||||
updateFinished: "<prefix><green><bold>Uppdateringen genomfördes framgångsrikt! För att förebygga problem med uppgifter och för att färdigställa uppdateringen, måste du starta om servern!"
|
||||
whitelistedPlayers: "<prefix><gold>Vitlistade spelare för underhåll:"
|
||||
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
|
||||
whitelistAdded: "<prefix><green>Lade till <aqua>%PLAYER% <green>till underhållsvitlistan!"
|
||||
whitelistAlreadyAdded: "<prefix><aqua>%PLAYER% <red>finns redan med i underhållsvitlistan!"
|
||||
whitelistRemoved: "<prefix><green>Tog bort <aqua>%PLAYER% <green>från underhållsvitlistan!"
|
||||
whitelistNotFound: "<prefix><red>Den specifierade spelaren är inte med i vitlistan!"
|
||||
whitelistEmpty: "<prefix><red>Underhållsvitlistan är tom! Använd <yellow>/maintenance add <player/uuid> <red>för att lägga till någon!"
|
||||
playerNotFound: "<prefix><red>Ingen spelare med detta namn har spelat på servern tidigare."
|
||||
playerNotFoundUuid: "<prefix><red>Ingen spelare med det uuid hittades."
|
||||
playerNotOnline: "<prefix><red>Det finns ingen spelare med det namnet online."
|
||||
offlinePlayerFetchError: "<prefix><red>There was an error while fetching offline player. Please try again later."
|
||||
invalidUuid: "<prefix><red>Ogiltigt uuid format!"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<prefix><red>Du har blvitt skickad till en väntserver!"
|
||||
forceWaitingServer: "<prefix><red>Du kan inte lämna väntservern medans underhållsläget är aktiverat!"
|
||||
serverNotFound: "<prefix><red>Ingen server med det namnet är registerad på proxyn!"
|
||||
singleTimerAlreadyRunning: "<prefix><red>Det finns redan en timer schemalagd för den servern!"
|
||||
singleTimerCancelled: "<prefix><red>Den nuvarande timern för för server <yellow>%SERVER% <red>har blivit avaktiverad."
|
||||
singleTimerNotRunning: "<prefix><red>Det finns för närvarande ingen timer för den servern."
|
||||
singleEndtimerBroadcast: "<prefix><gray>Underhållsläge på server %SERVER% kommer avaktiveras om <gold>%TIME%<gray>."
|
||||
singleEndtimerStarted: "<prefix><green>Startade timer: <gray>Underhållsläge på server %SERVER% kommer stängas av om <gold>%TIME%<gray>."
|
||||
singleStarttimerBroadcast: "<prefix><gray>Underhållsläge på server %SERVER% kommer aktiveras om <gold>%TIME%<gray>."
|
||||
singleStarttimerStarted: "<prefix><green>Startade timer: <gray>Underhållsläge på server %SERVER% kommer aktiveras om <gold>%TIME%<gray>."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>Underhållsläge på server %SERVER% kommer aktiveras om <gold>%TIME% <gray>och håller på i <gold>%DURATION%<gray>."
|
||||
singleScheduletimerStarted: "<prefix><green>Startade timer: <gray>Underhållsläge på server %SERVER% kommer aktiveras om <gold>%TIME% <gray>och håller på i <gold>%DURATION%<gray>."
|
||||
singleMaintenanceKick: "<prefix><red>Servern %SERVER% är just nu i underhåll! Försök igen senare!"
|
||||
singleMaintenanceKickComplete: "<red>Servern %SERVER% är just nu i underhåll!<br>Du kan försöka återansluta dig för att gå in på en annan server!"
|
||||
singleMaintenanceActivated: "<prefix><gold>Underhållsläge är nu aktiverat på server <yellow>%SERVER%<gold>."
|
||||
singleMaintenanceDeactivated: "<prefix><gold>Underhållsläge är nu avaktiverat på server <yellow>%SERVER%<gold>."
|
||||
singleServerAlreadyEnabled: "<prefix><red>Underhåll är redan aktiverat på server <yellow>%SERVER%<red>!"
|
||||
singleServerAlreadyDisabled: "<prefix><red>Underhåll är redan avaktiverat på server <yellow>%SERVER%<red>!"
|
||||
singleServerMaintenanceList: "<prefix><gray>Proxiade servrar, som är under underhåll:"
|
||||
singleServerMaintenanceListEmpty: "<prefix><gray>Det finns inga proxiade servrar som har underhåll aktiverat."
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "sekund"
|
||||
seconds: "sekunder"
|
||||
minute: "minut"
|
||||
minutes: "minuter"
|
||||
hour: "timme"
|
||||
hours: "timmar"
|
||||
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
|
||||
helpPageNotFound: "<prefix><red>Det finns ingen sida med det numret!"
|
||||
helpNextPage: "<gray>Use <aqua>/maintenance help %PAGE% <gray>för att komma till nästa hjälpsida."
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(Om timern körs, kommer den nuvarande timern avbrytas)"
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Aktiverar lite felsöknings loggande)"
|
||||
helpDump: "<gold>/maintenance dump <gray>(Dumpar lite serverinformation, används för buggrapportering)"
|
||||
helpHelp: "<gold>/maintenance help [sida] <gray>(Visar denna magiskt fina hjälpsida)"
|
||||
helpMotd: "<gold>/maintenance motd [timer] <gray>(Listar alla för närvarande aktiva underhålls motds. Om argumentet 'timer' specificeras, kommer alla timer motds visas)"
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd [timer] <index> <gray>(Tar bort ett motd. Om 'timer' används som argument, kommer ett timerspecifikt pingmeddelande bli borttaget)"
|
||||
helpSetMotd: "<gold>/maintenance setmotd [timer] <index> <1/2> <meddelande> <gray>(Sätter ett specifikt motd. If using. Om argumentet 'timer' specificeras, kommer ett timerspecifikt pingmeddelande bli satt)"
|
||||
helpReload: "<gold>/maintenance reload <gray>(Laddar om konfigurationsfilen, vitlistan and server ikonen)"
|
||||
helpToggle: "<gold>/maintenance <on/off> <gray>(Aktiverar/avaktiverar underhållsläget)"
|
||||
helpUpdate: "<gold>/maintenance update <gray>(Avlägset laddar ner senaste versionen av insticksprogrammet på din server)"
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>(Visar alla vitlistade spelare för underhållsläget)"
|
||||
helpWhitelistAdd: "<gold>/maintenance add <namn/uuid> <gray>(Lägger till en spelare på vitlistan för underhållsläget, så de kan logga in även om underhåll är aktiverat)"
|
||||
helpWhitelistRemove: "<gold>/maintenance remove <namn/uuid> <gray>(Tar bort spelaren från vitlistan för underhållsläget)"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [server] <gray>(Vid utfärdandet av detta kommando kommer den nuvarande timern bli avbruten)"
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance <on/off> [server] <gray>(Aktiverar/avaktiverar underhållsläge)"
|
||||
helpStatus: "<gold>/maintenance status <gray>(Listar alla proxiade servrar som är i underhåll)"
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<yellow><bold>Sunucu<bold> <dark_gray>▸ "
|
||||
noPermission: "<red>Bunun için iznin yok!"
|
||||
kickmessage: "<red>Sunucuda bakım çalışması vardır!"
|
||||
maintenanceActivated: "<prefix><gold>Bakım modu aktif."
|
||||
maintenanceDeactivated: "<prefix><gold>Bakım modu deaktif."
|
||||
alreadyEnabled: "<prefix><red>Bakım modu zaten aktif!"
|
||||
alreadyDisabled: "<prefix><red>Bakım modu zaten deaktif!"
|
||||
endtimerBroadcast: "<prefix><gray>Bakım modu <gold>%TIME%<gray> içerisinde devre dışı olacak."
|
||||
endtimerStarted: "<prefix><green>Başlatılan zamanlayıcı: <gray>Bakım modu <gold>%TIME%<gray> içerisinde devre dışı olacak."
|
||||
starttimerBroadcast: "<prefix><gray>Bakım modu <gold>%TIME%<gray> içerisinde etkin olacak."
|
||||
starttimerStarted: "<prefix><green>Başlatılan zamanlayıcı: <gray>Bakım modu <gold>%TIME%<gray> içerisinde etkin olacak."
|
||||
scheduletimerBroadcast: "<prefix><gray>Bakım modu <gold>%TIME% <gray>içerisinde etkin olacak ve <gold>%DURATION%<gray> sürecek."
|
||||
scheduletimerStarted: "<prefix><green>Başlatılan zamanlayıcı: <gray>Bakım modu <gold>%TIME% <gray>içerisinde etkin olacak ve <gold>%DURATION%<gray> sürecek."
|
||||
timerAlreadyRunning: "<prefix><red>Zaten planlanmış bir zamanlayıcı var!"
|
||||
timerNotRunning: "<prefix><red>Şu anda çalışan bir zamanlayıcı yok."
|
||||
timerCancelled: "<prefix><red>Geçerli zamanlayıcı devre dışı bırakıldı."
|
||||
timerTooLong: "<prefix><red>Belirtilen sayı 40320'den küçük olmalıdır (28 güne tekabül)!"
|
||||
timerMotdDisabled: "<prefix><red>Zamanlayıcıya özgü motd'ları kullanmak/düzenlemek istiyorsanız, konfigürasyonda 'enable-timerspecial-messages' kısmını 'true' olarak ayarlamalısınız."
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<prefix><yellow>%PLAYER% <red>sunucuya katılmaya çalıştı."
|
||||
motdList: "<prefix><gray>Bakım modu MOTD'leriniz:"
|
||||
motdListEmpty: "<prefix><red>Herhangi bir MOTD ayarlamadınız!"
|
||||
reload: "<prefix><green>Konfigürasyon dosyaları yeniden yüklendi."
|
||||
removedMotd: "<prefix><green>%INDEX% numaralı MOTD kaldırıldı."
|
||||
removeMotdError: "<prefix><red>Yalnızca bir MOTD'niz var, bu nedenle hiçbirini kaldıramazsınız!"
|
||||
setMotd: "<prefix><green>%LINE% satırını %INDEX% ayarlayın. Bakım MOTD'si %MOTD%"
|
||||
setMotdIndexError: "<prefix><red>Şu anda %MOTDS% motd'unuz var, bu yüzden 1 ile %NEWAMOUNT% arasında bir sayı seçmeniz gerekiyor."
|
||||
setMotdLineError: "<prefix><red>2. argüman satır numarası (1 veya 2) olmalıdır.!"
|
||||
updateDownloading: "<prefix><red><bold>Güncelleme indiriliyor..."
|
||||
updateFailed: "<prefix><dark_red><bold>Güncelleme hataya uğradı!"
|
||||
updateFinished: "<prefix><green><bold>Güncelleme başarılı oldu! Işleyişle ilgili sorunları önlemek ve güncellemeyi tamamlamak için sunucuyu yeniden başlatmanız gerekir!"
|
||||
whitelistedPlayers: "<prefix><gold>Bakım için beyaz listeye alınan oyuncular:"
|
||||
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
|
||||
whitelistAdded: "<prefix><aqua>%PLAYER% <green>bakım için beyaz listeye eklendi!"
|
||||
whitelistAlreadyAdded: "<prefix><aqua>%PLAYER% <red>zaten bakım için beyaz listede yer alıyor!"
|
||||
whitelistRemoved: "<prefix><aqua>%PLAYER% <green>bakım için beyaz listeden kaldırıldı!"
|
||||
whitelistNotFound: "<prefix><red>Bu oyuncu bakım için beyaz listesinde değil!"
|
||||
whitelistEmpty: "<prefix><red>Bakım beyaz listesi boş! Eklemek için <yellow>/maintenance add <isim/uuid> <red>komutunu kullan!"
|
||||
playerNotFound: "<prefix><red>Bu sunucuda daha önce bu isimde hiçbir oyuncu oynamadı."
|
||||
playerNotFoundUuid: "<prefix><red>Bu UUID'ye sahip hiçbir oyuncu bulunamadı."
|
||||
playerNotOnline: "<prefix><red>Bu isimle çevrimiçi oyuncu yok."
|
||||
offlinePlayerFetchError: "<prefix><red>Çevrimdışı oyuncu getirilirken bir hata oluştu. Lütfen daha sonra tekrar deneyin."
|
||||
invalidUuid: "<prefix><red>Geçersiz UUID biçimi!"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<prefix><red>Bekleme sunucusuna gönderildiniz!"
|
||||
forceWaitingServer: "<prefix><red>Bakım varken bekleme sunucusundan ayrılamazsınız!"
|
||||
serverNotFound: "<prefix><red>Bu ada sahip hiçbir sunucu BungeeCord'da kayıtlı değil!"
|
||||
singleTimerAlreadyRunning: "<prefix><red>Bu sunucu için planlanmış bir zamanlayıcı zaten var!"
|
||||
singleTimerCancelled: "<prefix><yellow>%SERVER% <red>sunucusu için zamanlayıcı devre dışı bırakıldı."
|
||||
singleTimerNotRunning: "<prefix><red>Şu anda o sunucu için çalışan bir zamanlayıcı yok."
|
||||
singleEndtimerBroadcast: "<prefix><gray>%SERVER% sunucusundaki bakım modu <gold>%TIME%<gray> içerisinde devre dışı olacaktır."
|
||||
singleEndtimerStarted: "<prefix><green>Zamanlayıcı Başlatıldı: <gray>%SERVER% sunucusundaki bakım modu <gold>%TIME% <gray>içerisinde devre dışı olacaktır."
|
||||
singleStarttimerBroadcast: "<prefix><gray>%SERVER% sunucusunda <gold>%TIME%<gray> içerisinde bakım modu etkin olacaktır."
|
||||
singleStarttimerStarted: "<prefix><green>Zamanlayıcı başlatıldı: <gray>%SERVER% sunucusundaki bakım modu <gold>%TIME% <gray>içinde aktifleşecektir."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>%SERVER% sunucusunda <gold>%TIME% <gray> içerisinde bakım modu etkin olacaktır, süre: <gold>%DURATION%<gray>."
|
||||
singleScheduletimerStarted: "<prefix><green>Başlatılan zamanlayıcı: <gray>%SERVER% sunucusunda <gold>%TIME% <gray> içerisinde bakım modu etkin olacaktır, süre: <gold>%DURATION%<gray>."
|
||||
singleMaintenanceKick: "<prefix><red>%SERVER% sunucusunda bakım modu aktif!"
|
||||
singleMaintenanceKickComplete: "<red>%SERVER% sunucusunda bakım modu aktif!"
|
||||
singleMaintenanceActivated: "<prefix><yellow>%SERVER%<gold> sunucusunda bakım modu aktifleştirildi."
|
||||
singleMaintenanceDeactivated: "<prefix><yellow>%SERVER%<gold> sunucusunda bakım modu devre dışı bırakıldı."
|
||||
singleServerAlreadyEnabled: "<prefix><yellow>%SERVER%<red> sunucusunda zaten bakım modu aktif!"
|
||||
singleServerAlreadyDisabled: "<prefix>%SERVER%<red> sunucusunda zaten bakım modu deaktif!"
|
||||
singleServerMaintenanceList: "<prefix><gray>Bakımı etkinleştirilmiş sunucular:"
|
||||
singleServerMaintenanceListEmpty: "<prefix><gray>Bakımda olan sunucu yok."
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "saniye"
|
||||
seconds: "saniye"
|
||||
minute: "dakika"
|
||||
minutes: "dakika"
|
||||
hour: "saat"
|
||||
hours: "saat"
|
||||
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
|
||||
helpPageNotFound: "<prefix><red>Bu numaraya sahip bir sayfa yok!"
|
||||
helpNextPage: "<aqua>/maintenance help %PAGE% <gray>yazarak bir sonraki yardım sayfasına geçebilirsiniz."
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(Eğer çalışıyorsa mevcut zamanlayıcı iptal edilecektir.)"
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Bazı hata ayıklama kaydını etkinleştirir)"
|
||||
helpDump: "<gold>/maintenance dump <gray>(Hata raporları için kullanılan bazı sunucu bilgilerini atar)"
|
||||
helpHelp: "<gold>/maintenance help [sayfa] <gray>(Bu güzel yardım penceresini gösterir)"
|
||||
helpMotd: "<gold>/maintenance motd [zamanlayıcı] <gray>(Halihazırda ayarlanmış bakım MOTD'lerini listeler. Zamanlayıcı belirtilirse, zamanlayıcı modları gösterilir)"
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd [zamanlayıcı] <dizin> <gray>(Bir bakım MOTD'sini kaldırır. Argüman olarak zamanlayıcı kullanılıyorsa, zamanlayıcıya özel bir MOTD mesajı kaldırılacaktır)"
|
||||
helpSetMotd: "<gold>/maintenance setmotd [zamanlayıcı] <dizin> <1/2> <mesaj> <gray>(Bakım modu için bir MOTD ayarlar. Argüman olarak zamanlayıcı kullanılıyorsa, zamanlayıcıya özel MOTD ping mesajı ayarlanır)"
|
||||
helpReload: "<gold>/maintenance reload <gray>(Konfigürasyon dosyasını, beyaz liste dosyasını ve sunucu simgesini yeniden yükler)"
|
||||
helpToggle: "<gold>/maintenance <on/off> <gray>(Bakım modunu etkinleştirir/devre dışı bırakır)"
|
||||
helpUpdate: "<gold>/maintenance update <gray>(Eklentinin en yeni sürümünü sunucunuza uzaktan indirir)"
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>(Bakım modu için beyaz listedeki tüm oyuncuları gösterir)"
|
||||
helpWhitelistAdd: "<gold>/maintenance add <isim/uuid> <gray>(Oyuncuyu bakım beyaz listesine ekler, böylece bakım etkin olsa bile sunucuya katılabilir)"
|
||||
helpWhitelistRemove: "<gold>/maintenance remove <isim/uuid> <gray>(Oyuncuyu bakım beyaz listesinden kaldırır)"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [sunucu] <gray>(Çalışıyorsa, mevcut zamanlayıcı iptal edilecektir.)"
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance <on/off> [sunucu] <gray>(Bakım modunu etkinleştirir/devre dışı bırakır)"
|
||||
helpStatus: "<gold>/maintenance status <gray>(Şu anda bakımda olan tüm sunucuları listeler)"
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
|
||||
noPermission: "<red>У вас недостатньо прав!"
|
||||
kickmessage: "<red>Сервер зачинено на технічні роботи!"
|
||||
maintenanceActivated: "<green>Режим технічних робіт увімкнено!"
|
||||
maintenanceDeactivated: "<gray>Режим технічних робіт вимкнено!"
|
||||
alreadyEnabled: "<red>Режим технічних робіт вже увімкнено!"
|
||||
alreadyDisabled: "<red>Режим технічних робіт був включений."
|
||||
endtimerBroadcast: "<green>Сервер буде відкритий через<white>%TIME%<green>!"
|
||||
endtimerStarted: "<green>Таймер успішно запущено! Сервер буде відкритий через<white>%TIME%<green>!"
|
||||
starttimerBroadcast: "<green>Сервер буде закрито на технічні роботи через <white>%TIME%<green>!"
|
||||
starttimerStarted: "<green>Таймер успішно запущено! Сервер буде закрито на технічні роботи через <white>%TIME%<green>!"
|
||||
scheduletimerBroadcast: "<prefix><gray>Технічні роботи розпочнуться в<gold>%TIME% <gray>і триватимуть <gold>%DURATION%<gray>."
|
||||
scheduletimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
timerAlreadyRunning: "<red>Таймер вже запущено!"
|
||||
timerNotRunning: "<red>Таймер не було запущено."
|
||||
timerCancelled: "<gray>Таймер було зупинено."
|
||||
timerTooLong: "<red>Число має бути не більше ніж <white>40320 <red>(<white>28 <red>днів)."
|
||||
timerMotdDisabled: "<red>Повідомлення про таймер вимкнено в налаштуваннях плагіна."
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<red>Гравець <white>%PLAYER% <red>намагався зайти на сервер."
|
||||
motdList: "<gray>Лист титульних рядків у режимі технічних робіт:"
|
||||
motdListEmpty: "<red>Лист порожній."
|
||||
reload: "<green>Плагін успішно перезавантажено!"
|
||||
removedMotd: "<green>Титульний рядок з індексом <white>%INDEX% <green>успішно видалено!"
|
||||
removeMotdError: "<red>Ви не можете видалити останні 2 титульні рядки."
|
||||
setMotd: "<green>Титульний рядок <white>%LINE% <green>з індексом<white>%INDEX% <green>успішно змінено: <white>%MOTD%"
|
||||
setMotdIndexError: "<red>Неправильний індекс, допустимі значення: 1 - %NEWAMOUNT%."
|
||||
setMotdLineError: "<red>Другий аргумент має бути номером рядка (1 или 2)!"
|
||||
updateDownloading: "<green>Оновлення завантажується..."
|
||||
updateFailed: "<red>Оновлення не вдалось!"
|
||||
updateFinished: "<green>Оновлення успішно пройдено! Перезавантажте сервер, щоб уникнути можливих проблем."
|
||||
whitelistedPlayers: "<gray>Білий лист у режимі технічних робіт:"
|
||||
whitelistedPlayersFormat: "<gray>- <white>%NAME% <gray>(<white>%UUID%<gray>)"
|
||||
whitelistAdded: "<green>Гравець <white>%PLAYER% <green>успішно доданий у білий лист!"
|
||||
whitelistAlreadyAdded: "<red>Гравець <white>%PLAYER% <red>вже у білому листі!"
|
||||
whitelistRemoved: "<green>Гравця <white>%PLAYER% <green>успішно видалено з білого листа!"
|
||||
whitelistNotFound: "<red>Цей гравець не знаходиться у білому листі!"
|
||||
whitelistEmpty: "<red>Білий лист порожній! Використовуйте /maintenance add [Гравець|uuid] щоб додати когось."
|
||||
playerNotFound: "<red>Гравець не знайден!"
|
||||
playerNotFoundUuid: "<red>Гравець з таким UUID не знайден!"
|
||||
playerNotOnline: "<red>Гравець повинен бути онлайн!"
|
||||
offlinePlayerFetchError: "<prefix><red>There was an error while fetching offline player. Please try again later."
|
||||
invalidUuid: "<red>Невірний формат UUID!"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<red>Ви були переміщені у лобі!"
|
||||
forceWaitingServer: "<red>Ви не можете залишити лобі під час технічних робіт!"
|
||||
serverNotFound: "<red>Сервер не знайдено!"
|
||||
singleTimerAlreadyRunning: "<red>Таймер сервера <white>%SERVER% <red>вже запущено!"
|
||||
singleTimerCancelled: "<gray>Таймер сервера <white>%SERVER% <gray>було зупинено."
|
||||
singleTimerNotRunning: "<red>Таймер сервера <white>%SERVER% <red>не був запущений."
|
||||
singleEndtimerBroadcast: "<green>Сервер <white>%SERVER% <green>буде відкрито через <white>%TIME%<green>!"
|
||||
singleEndtimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode on server %SERVER% will be deactivated in <gold>%TIME%<gray>."
|
||||
singleStarttimerBroadcast: "<red>Увага! Сервер <white>%SERVER% <red>буде закрито на технічні роботи через <white>%TIME%<red>!"
|
||||
singleStarttimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode on server %SERVER% will be activated in <gold>%TIME%<gray>."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>Технічні роботи на сервері %SERVER% почнуться через <gold>%TIME% <gray>і триватиме <gold>%DURATION%<gray>."
|
||||
singleScheduletimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode on server %SERVER% will be enabled in <gold>%TIME% <gray>and will last for <gold>%DURATION%<gray>."
|
||||
singleMaintenanceKick: "<red>Цей сервер закрито на технічні роботи! Спробуй пізніше."
|
||||
singleMaintenanceKickComplete: "<red>Цей сервер закрито на технічні роботи!<br>Спробуйте пізніше."
|
||||
singleMaintenanceActivated: "<green>Режим технічних робіт на сервері <white>%SERVER% <green>увімкнено!"
|
||||
singleMaintenanceDeactivated: "<green>Режим технічних робіт на сервері <white>%SERVER% <green>вимкнено!"
|
||||
singleServerAlreadyEnabled: "<red>Режим технічних робіт на сервері <white>%SERVER% <red>вже включений!"
|
||||
singleServerAlreadyDisabled: "<red>Режим технічних робіт на сервері <white>%SERVER% <red>не був включений."
|
||||
singleServerMaintenanceList: "<gray>Сервера на яких включено режим технічних робіт:"
|
||||
singleServerMaintenanceListEmpty: "<gray>Сервера на яких включено режим технічних робіт:<white>порожньо"
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "секунду"
|
||||
seconds: "секунд"
|
||||
minute: "хвилину"
|
||||
minutes: "хвилин"
|
||||
hour: "година"
|
||||
hours: "годин"
|
||||
helpHeader: "<gray>========[ <white>%NAME% <gray>| <gold>%PAGE%<white>/<gold>%MAX% <gray>]========"
|
||||
helpPageNotFound: "<red>Сторінку не знайдено."
|
||||
helpNextPage: "<white>Використовуйте <gold>/maintenance help %PAGE% <white>щоб перейти до наступної сторінки."
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>- <white>Зупинити таймер увімкнення/вимкнення режиму технічних робіт."
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Вмикає деяке журналювання налагодження)"
|
||||
helpDump: "<gold>/maintenance dump <gray>- <white>Створити дамп."
|
||||
helpHelp: "<gold>/maintenance help [сторінка] <gray>- <white>Відобразити список доступних команд."
|
||||
helpMotd: "<gold>/maintenance motd <timer> <gray>- <white>Відобразити список титульних повідомлень."
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd <timer> [індекс] <gray>- <white>Видалити титульне повідомлення."
|
||||
helpSetMotd: "<gold>/maintenance setmotd <timer> [індекс] [1|2] [сообщение] <gray>- <white>Додати нове титульне повідомлення."
|
||||
helpReload: "<gold>/maintenance reload <gray>- <white>Перезавантажити плагін."
|
||||
helpToggle: "<gold>/maintenance [on|off] <gray>- <white>Увімкнути/вимкнути режим технічних робіт."
|
||||
helpUpdate: "<gold>/maintenance update <gray>- <white>Оновити плагін."
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>- <white>Відобразити всіх гравців із білого листа."
|
||||
helpWhitelistAdd: "<gold>/maintenance add [ник|uuid] <gray>- <white>Додати гравця до білого листа."
|
||||
helpWhitelistRemove: "<gold>/maintenance remove [ник|uuid] <gray>- <white>Видалити гравця із білого листа."
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [сервер] <gray>- <white>Зупинити таймер увімкнення/вимкнення режиму технічних робіт."
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance [on|off] [сервер] <gray>- <white>Увімкнути/вимкнути режим технічних робіт."
|
||||
helpStatus: "<gold>/maintenance status <gray>- <white>Список всіх серверів, закритих на технічні роботи."
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
|
||||
noPermission: "<red>Bạn không có quyền thực hiện lệnh đó."
|
||||
kickmessage: "<red>Máy chủ hiện đang được bảo trì!<br>Hãy thử lại sau!"
|
||||
maintenanceActivated: "<prefix><gold>Chế độ bảo trì hiện đã được kích hoạt."
|
||||
maintenanceDeactivated: "<prefix><gold>Chế độ bảo trì hiện đã bị vô hiệu hóa."
|
||||
alreadyEnabled: "<prefix><red>Bảo trì đã được kích hoạt sẵn rồi!"
|
||||
alreadyDisabled: "<prefix><red>Bảo trì đã bị vô hiệu hóa sẵn rồi!"
|
||||
endtimerBroadcast: "<prefix><gray>Chế độ bảo trì sẽ bị tắt trong <gold>%TIME%<gray>."
|
||||
endtimerStarted: "<prefix><green>Bộ hẹn giờ đã bắt đầu: <gray>Chế độ bảo trì sẽ bị vô hiệu hóa sau <gold>%TIME%<gray>."
|
||||
starttimerBroadcast: "<prefix><gray>Chế độ bảo trì sẽ được kích hoạt trong <gold>%TIME%<gray>."
|
||||
starttimerStarted: "<prefix><green>Bộ hẹn giờ đã bắt đầu: <gray>Chế độ bảo trì sẽ được kích hoạt trong <gold>%TIME%<gray>."
|
||||
scheduletimerBroadcast: "<prefix><gray>Chế độ bảo trì sẽ được bật sau <gold>%TIME% <gray>và sẽ kéo dài trong <gold>%DURATION%<gray>."
|
||||
scheduletimerStarted: "<prefix><green>Bộ hẹn giờ đã bắt đầu: <gray>Chế độ bảo trì sẽ được bật sau <gold>%TIME% <gray> và sẽ kéo dài trong <gold>%DURATION%<gray>."
|
||||
timerAlreadyRunning: "<prefix><red>Đã có lịch hẹn giờ rồi!"
|
||||
timerNotRunning: "<prefix><red>Hiện tại không có bộ đếm thời gian đang chạy."
|
||||
timerCancelled: "<prefix><red>Bộ hẹn giờ hiện tại đã bị tắt."
|
||||
timerTooLong: "<prefix><red>Số phải nhỏ hơn 40320 (28 ngày)!"
|
||||
timerMotdDisabled: "<prefix><red>Bạn phải đặt 'enable-timerspecific-messages' trong cấu hình thành 'true', nếu bạn muốn sử dụng/chỉnh sửa các motds hẹn giờ cụ thể."
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<prefix><yellow>%PLAYER% <red>đã cố gắng tham gia máy chủ."
|
||||
motdList: "<prefix><gray>Danh sách các phương thức bảo trì motds của bạn:"
|
||||
motdListEmpty: "<prefix><red>Bạn không có bất kỳ chế độ bảo trì nào được thiết lập!"
|
||||
reload: "<prefix><green>Đã tải lại cấu hình, người chơi được đưa vào danh sách trắng, tệp ngôn ngữ và biểu tượng bảo trì"
|
||||
removedMotd: "<prefix><green>Đã xóa motd %INDEX%."
|
||||
removeMotdError: "<prefix><red>Bạn chỉ có một motd nên bạn không thể xóa bất kỳ cái nào!"
|
||||
setMotd: "<prefix><green>Đặt dòng %LINE% của %INDEX%. phương thức bảo trì để %MOTD%"
|
||||
setMotdIndexError: "<prefix><red>Bạn hiện có %MOTDS% motds, vì vậy bạn phải chọn một số trong khoảng từ 1 đến %NEWAMOUNT%."
|
||||
setMotdLineError: "<prefix><red>Đối số thứ hai phải là số dòng (1 hoặc 2)!"
|
||||
updateDownloading: "<prefix><red><bold>Đang Tải Bản Cập Nhật..."
|
||||
updateFailed: "<prefix><dark_red><bold>Cập nhật không thành công!"
|
||||
updateFinished: "<prefix><green><bold>Cập nhật đã thành công! Để tránh sự cố với tác vụ và để hoàn tất cập nhật, bạn phải khởi động lại máy chủ!"
|
||||
whitelistedPlayers: "<prefix><gold>Người chơi trong danh sách trắng để bảo trì:"
|
||||
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
|
||||
whitelistAdded: "<prefix><green>Đã thêm <aqua>%PLAYER% <green>vào danh sách trắng bảo trì!"
|
||||
whitelistAlreadyAdded: "<prefix><aqua>%PLAYER% <red>đã có trong danh sách trắng bảo trì!"
|
||||
whitelistRemoved: "<prefix><green>Đã xóa <aqua>%PLAYER% <green>khỏi danh sách trắng bảo trì!"
|
||||
whitelistNotFound: "<prefix><red>Người chơi này không có trong danh sách trắng bảo trì"
|
||||
whitelistEmpty: "<prefix><red>Danh sách trắng bảo trì trống! Sử dụng <yellow>/maintenance add <Tên Người Chơi Hoặc uuid> <red>để thêm ai đó!"
|
||||
playerNotFound: "<prefix><red>Chưa có người chơi nào có tên này từng chơi trên máy chủ này trước đây."
|
||||
playerNotFoundUuid: "<prefix><red>Không tìm thấy người chơi nào có uuid đó."
|
||||
playerNotOnline: "<prefix><red>Không có người chơi trực tuyến nào có tên đó."
|
||||
offlinePlayerFetchError: "<prefix><red>Đã xảy ra lỗi khi tìm Người Chơi Ngoại Tuyến. Vui lòng thử lại sau."
|
||||
invalidUuid: "<prefix><red>Định dạng uuid không hợp lệ!"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<prefix><red>Bạn đã được gửi đến một máy chủ đang chờ!"
|
||||
forceWaitingServer: "<prefix><red>Bạn không thể rời khỏi máy chủ đang chờ trong khi bảo trì được kích hoạt!"
|
||||
serverNotFound: "<prefix><red>Không có máy chủ nào có tên này được đăng ký trên proxy!"
|
||||
singleTimerAlreadyRunning: "<prefix><red>Đã có bộ hẹn giờ được lên lịch cho máy chủ đó!"
|
||||
singleTimerCancelled: "<prefix><red>Bộ hẹn giờ hiện tại cho máy chủ <yellow>%SERVER% <red>đã bị tắt."
|
||||
singleTimerNotRunning: "<prefix><red>Hiện tại không có bộ đếm thời gian chạy cho máy chủ đó."
|
||||
singleEndtimerBroadcast: "<prefix><gray>Chế độ bảo trì trên máy chủ %SERVER% sẽ bị tắt trong <gold>%TIME%<gray>."
|
||||
singleEndtimerStarted: "<prefix><green>Bộ hẹn giờ đã bắt đầu: <gray>Chế độ bảo trì trên máy chủ %SERVER% sẽ bị vô hiệu hóa sau <gold>%TIME%<gray>."
|
||||
singleStarttimerBroadcast: "<prefix><gray>Chế độ bảo trì trên máy chủ %SERVER% sẽ được bật trong <gold>%TIME%<gray>."
|
||||
singleStarttimerStarted: "<prefix><green>Bộ hẹn giờ đã bắt đầu: <gray>Chế độ bảo trì trên máy chủ %SERVER% sẽ được kích hoạt sau <gold>%TIME%<gray>."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>Chế độ bảo trì trên máy chủ %SERVER% sẽ được bật sau <gold>%TIME% <gray>và sẽ kéo dài trong <gold>%DURATION%<gray>."
|
||||
singleScheduletimerStarted: "<prefix><green>Bộ hẹn giờ đã bắt đầu: <gray>Chế độ bảo trì trên máy chủ %SERVER% sẽ được bật sau <gold>%TIME% <gray>và sẽ kéo dài trong <gold>%DURATION%<gray>."
|
||||
singleMaintenanceKick: "<prefix><red>Máy chủ %SERVER% hiện đang được bảo trì! Thử lại sau!"
|
||||
singleMaintenanceKickComplete: "<red>Máy chủ %SERVER% đang được bảo trì!<br>Bạn có thể thử tham gia lại để truy cập vào máy chủ khác!"
|
||||
singleMaintenanceActivated: "<prefix><gold>Chế độ bảo trì hiện đã được kích hoạt trên máy chủ <yellow>%SERVER%<gold>."
|
||||
singleMaintenanceDeactivated: "<prefix><gold>Chế độ bảo trì hiện đã bị vô hiệu hóa trên máy chủ <yellow>%SERVER%<gold>."
|
||||
singleServerAlreadyEnabled: "<prefix><red>Bảo trì đã được kích hoạt trên máy chủ <yellow>%SERVER%<red> sẵn rồi!"
|
||||
singleServerAlreadyDisabled: "<prefix><red>Bảo trì đã bị vô hiệu hóa trên máy chủ <yellow>%SERVER%<red> sẵn rồi!"
|
||||
singleServerMaintenanceList: "<prefix><gray>Máy chủ proxy đã kích hoạt bảo trì:"
|
||||
singleServerMaintenanceListEmpty: "<prefix><gray>Không có máy chủ proxy nào đang được bảo trì."
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "Giây"
|
||||
seconds: "Giây"
|
||||
minute: "Phút"
|
||||
minutes: "Phút"
|
||||
hour: "Tiếng"
|
||||
hours: "Tiếng"
|
||||
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
|
||||
helpPageNotFound: "<prefix><red>Không có trang nào có số đó!"
|
||||
helpNextPage: "<gray>Sử dụng <aqua>/maintenance help %PAGE% <gray> để đến cửa sổ trợ giúp tiếp theo."
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(Nếu chạy, bộ đếm thời gian hiện tại sẽ bị hủy bỏ)"
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Cho phép một số ghi nhật ký gỡ lỗi)"
|
||||
helpDump: "<gold>/maintenance dump <gray>(Loại bỏ một số thông tin máy chủ, được sử dụng để báo cáo lỗi)"
|
||||
helpHelp: "<gold>/maintenance help [Trang] <gray>(Hiển thị cửa sổ trợ giúp tuyệt đẹp này)"
|
||||
helpMotd: "<gold>/maintenance motd [hẹn giờ] <gray>(Liệt kê các chế độ bảo trì hiện được thiết lập. Nếu chỉ định 'bộ hẹn giờ', các mô-đun hẹn giờ sẽ được hiển thị)"
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd [hẹn giờ] <index> <gray>(Loại bỏ một motd bảo trì. Nếu sử dụng 'bộ hẹn giờ' làm đối số, tin nhắn ping dành riêng cho bộ hẹn giờ sẽ bị xóa)"
|
||||
helpSetMotd: "<gold>/maintenance setmotd [hẹn giờ] <index> <1/2> <tin nhắn> <gray>(Loại bỏ một motd bảo trì. Nếu sử dụng 'bộ hẹn giờ' làm đối số, tin nhắn ping dành riêng cho bộ hẹn giờ sẽ bị xóa)"
|
||||
helpReload: "<gold>/maintenance reload <gray>(Tải lại tệp cấu hình, tệp danh sách trắng và biểu tượng máy chủ)"
|
||||
helpToggle: "<gold>/maintenance <on/off> <gray>(Bật/tắt chế độ bảo trì)"
|
||||
helpUpdate: "<gold>/maintenance update <gray>(Tải từ xa phiên bản mới nhất của plugin xuống máy chủ của bạn)"
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>(Hiển thị tất cả người chơi trong danh sách trắng cho chế độ bảo trì)"
|
||||
helpWhitelistAdd: "<gold>/maintenance add <Tên Người Chơi Hoặc uuid> <gray>(Thêm người chơi vào danh sách trắng bảo trì, để họ có thể tham gia máy chủ ngay cả khi bảo trì được bật)"
|
||||
helpWhitelistRemove: "<gold>/maintenance remove <Tên Người Chơi Hoặc uuid> <gray>(Xóa Người Chơi khỏi danh sách trắng bảo trì)"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [server] <gray>(Nếu chạy, bộ đếm thời gian hiện tại sẽ bị hủy bỏ)"
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance <on/off> [server] <gray>(Bật/tắt chế độ bảo trì)"
|
||||
helpStatus: "<gold>/maintenance status <gray>(Liệt kê tất cả các máy chủ proxy hiện đang được bảo trì)"
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,104 +0,0 @@
|
||||
#Maintenance Plugin by kennytv
|
||||
#You can use https://webui.adventure.kyori.net/ to edit and preview the formatted text
|
||||
#For a full list of formats and fancy examples, see https://docs.adventure.kyori.net/minimessage/format.html
|
||||
#Messages containing the placeholder "<prefix>" will have it replaced with the following string
|
||||
prefix: "<dark_gray>[<yellow>Maintenance<dark_gray>] "
|
||||
noPermission: "<red>你没有执行该命令的权限。"
|
||||
kickmessage: "<red>服务器正在维护!<br>请稍后再试!"
|
||||
maintenanceActivated: "<prefix><gold>维护模式已启用。"
|
||||
maintenanceDeactivated: "<prefix><gold>维护模式已停用。"
|
||||
alreadyEnabled: "<prefix><red>维护模式已开启。"
|
||||
alreadyDisabled: "<prefix><red>维护模式已关闭!"
|
||||
endtimerBroadcast: "<prefix><gray>维护模式将在<gold>%TIME%<gray>后关闭"
|
||||
endtimerStarted: "<prefix><green>开始计时: <gray>维护模式将在<gold>%TIME%<gray>后关闭"
|
||||
starttimerBroadcast: "<prefix><gray>维护模式将在<gold>%TIME%<gray>后开启"
|
||||
starttimerStarted: "<prefix><green>开始计时: <gray>维护模式将在<gold>%TIME%<gray>后开启。"
|
||||
scheduletimerBroadcast: "<prefix><gray>维护模式将在 <gold>%TIME%<gray> 后开启,并将持续 <gold>%DURATION%<gray>。"
|
||||
scheduletimerStarted: "<prefix><green>正在运行的计时器: <gray>维护模式将在 <gold>%TIME% <gray> 后启用,并持续 <gold>%DURATION%<gray>."
|
||||
timerAlreadyRunning: "<prefix><red>当前已有计时正在执行!"
|
||||
timerNotRunning: "<prefix><red>当前没有正在运行的计时器。"
|
||||
timerCancelled: "<prefix><red>当前计时器已中止。"
|
||||
timerTooLong: "<prefix><red>数值必须小于40320(28天)!"
|
||||
timerMotdDisabled: "<prefix><red>如果要使用/编辑特定于计时器的MOTD,你必须在Config.yml配置中将'enable-timerspecific-messages'设置为'true'"
|
||||
motdTimer: "%HOURS%:%MINUTES%:%SECONDS%"
|
||||
motdTimerNotRunning: "-"
|
||||
joinNotification: "<prefix><yellow>%PLAYER%<red>试图加入服务器。"
|
||||
motdList: "<prefix><gray>当前维护模式MOTD:"
|
||||
motdListEmpty: "<prefix><red>你没有配置维护模式MOTD!"
|
||||
reload: "<prefix><green>重新加载配置、维护玩家白名单、语言文件和维护图标"
|
||||
removedMotd: "<prefix><green>删除第%INDEX%条维护模式MOTD"
|
||||
removeMotdError: "<prefix><red>你只有一条维护模式MOTD,所有你不能再删除任何MOTD!"
|
||||
setMotd: "<prefix><green>设置第%INDEX%条第%LINE%行维护模式MOTD为%MOTD%"
|
||||
setMotdIndexError: "<prefix><red>你现在有%MOTDS%条MOTD,所以你必须选择一个介于1和%NEWAMOUNT%之间的数字。"
|
||||
setMotdLineError: "<prefix><red>第二个参数必须是行号(1或2)!"
|
||||
updateDownloading: "<prefix><red><bold>正在下载更新..."
|
||||
updateFailed: "<prefix><dark_red><bold>更新失败!"
|
||||
updateFinished: "<prefix><green><bold>插件更新成功!为了防止任务出现问题并完成更新,你必须重新启动服务器!"
|
||||
whitelistedPlayers: "<prefix><gold>维护玩家白名单:"
|
||||
whitelistedPlayersFormat: "<dark_gray>- <yellow>%NAME% <dark_gray>(<gray>%UUID%<dark_gray>)"
|
||||
whitelistAdded: "<prefix><green>将<aqua>%PLAYER%<green>添加到维护玩家白名单!"
|
||||
whitelistAlreadyAdded: "<prefix><red>玩家<aqua>%PLAYER%<red>已在维护玩家白名单中!"
|
||||
whitelistRemoved: "<prefix><green>从维护玩家白名单中删除<aqua>%PLAYER%<green>!"
|
||||
whitelistNotFound: "<prefix><red>此玩家不在维护玩家白名单中!"
|
||||
whitelistEmpty: "<prefix><red>维护玩家白名单为空!使用<yellow>/maintenance add <player/uuid> <red>添加某人!"
|
||||
playerNotFound: "<prefix><red>此服务器上从未出现该名称的玩家"
|
||||
playerNotFoundUuid: "<prefix><red>找不到具有该UUID的玩家。"
|
||||
playerNotOnline: "<prefix><red>没有使用该名称的在线玩家"
|
||||
offlinePlayerFetchError: "<prefix><red>获取离线玩家时出现错误。请稍后再试。"
|
||||
invalidUuid: "<prefix><red>无效的UUID格式!"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
sentToWaitingServer: "<prefix><red>您已被传送到等待服务器!"
|
||||
forceWaitingServer: "<prefix><red>启用维护时,您不能离开等待服务器!"
|
||||
serverNotFound: "<prefix><red>未找到拥有此名称的服务器!"
|
||||
singleTimerAlreadyRunning: "<prefix><red>该服务器已有计时器正在运行!"
|
||||
singleTimerCancelled: "<prefix><red>服务器<yellow>%SERVER%<red>的计时器已中止"
|
||||
singleTimerNotRunning: "<prefix><red>该服务器当前没有正在运行的计时器。"
|
||||
singleEndtimerBroadcast: "<prefix><gray>服务器%SERVER%的维护模式将在<gold>%TIME%<gray>后关闭。"
|
||||
singleEndtimerStarted: "<prefix><green>正在运行的计时器:<gray>将在 <gold>%TIME%<gray> 后关闭 %SERVER% 上的维护模式 <gray>."
|
||||
singleStarttimerBroadcast: "<prefix><gray>服务器%SERVER%的维护模式将在<gold>%TIME%<gray>后开启。"
|
||||
singleStarttimerStarted: "<prefix><green>正在运行的计时器:<gray>将在 <gold>%TIME%<gray> 后开启 %SERVER% 上的维护模式 <gray>."
|
||||
singleScheduletimerBroadcast: "<prefix><gray>服务器 %SERVER% 上的维护模式将在 <gold>%TIME%<gray> 后开启,并持续 <gold>%DURATION%<gray>。"
|
||||
singleScheduletimerStarted: "<prefix><green>正在运行的计时器: <gray>%SERVER% 上的维护模式将在 <gold>%TIME% <gray> 后启用,并持续 <gold>%DURATION%<gray>."
|
||||
singleMaintenanceKick: "<prefix><red>服务器%SERVER%正在维护!请稍后再试!"
|
||||
singleMaintenanceKickComplete: "<red>服务器%SERVER%正在维护!<br>你可以尝试重新加入另一个服务器!"
|
||||
singleMaintenanceActivated: "<prefix><gold>服务器<yellow>%SERVER%<gold>的维护模式已启用。"
|
||||
singleMaintenanceDeactivated: "<prefix><gold>服务器<yellow>%SERVER%<gold>的维护模式已停用。"
|
||||
singleServerAlreadyEnabled: "<prefix><red>服务器<yellow>%SERVER%<red>的维护模式已开启!"
|
||||
singleServerAlreadyDisabled: "<prefix><red>服务器<yellow>%SERVER%<red>的维护模式已关闭!"
|
||||
singleServerMaintenanceList: "<prefix><gray>已开启维护的服务器有:"
|
||||
singleServerMaintenanceListEmpty: "<prefix><gray>没有正在维护的服务器"
|
||||
singleServerMaintenanceListEntry: "<dark_grey>- <aqua>%SERVER%"
|
||||
second: "秒"
|
||||
seconds: "秒"
|
||||
minute: "分钟"
|
||||
minutes: "分钟"
|
||||
hour: "小时"
|
||||
hours: "小时"
|
||||
helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MAX% <dark_gray>]========"
|
||||
helpPageNotFound: "<prefix><red>没有此页码的帮助页!"
|
||||
helpNextPage: "<gray>使用<aqua>/maintenance help %PAGE% <gray>切换到下一帮助页"
|
||||
helpAbortTimer: "<gold>/maintenance aborttimer <gray>(中止当前开启的计时器)"
|
||||
helpEndtimer: "<gold>/maintenance endtimer <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpStarttimer: "<gold>/maintenance starttimer <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpScheduleTimer: "<gold>/maintenance scheduletimer <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpDebug: "<gold>/maintenance debug <gray>(Enables some debug logging)"
|
||||
helpDump: "<gold>/maintenance dump <gray>(转储一些服务器信息,用于错误报告)"
|
||||
helpHelp: "<gold>/maintenance help [page] <gray>(显示帮助信息)"
|
||||
helpMotd: "<gold>/maintenance motd [timer] <gray>(显示当前设置的维护模式MOTD。如果指定'timer',则显示计时器MOTD)"
|
||||
helpRemoveMotd: "<gold>/maintenance removemotd [timer] <index> <gray>(删除维护模式的MOTD。如果使用'timer'参数,将设置计时器特定的Ping消息)"
|
||||
helpSetMotd: "<gold>/maintenance setmotd [timer] <index> <1/2> <message> <gray>(设置维护模式的MOTD。如果使用'timer'参数,将设置计时器特定的Ping消息)"
|
||||
helpReload: "<gold>/maintenance reload <gray>(重新加载配置、维护玩家白名单、语言文件和维护图标)"
|
||||
helpToggle: "<gold>/maintenance <on/off> <gray>(开启/关闭维护模式)"
|
||||
helpUpdate: "<gold>/maintenance update <gray>(远程下载最新版本插件到服务器)"
|
||||
helpWhitelist: "<gold>/maintenance whitelist <gray>(显示所有维护玩家白名单)"
|
||||
helpWhitelistAdd: "<gold>/maintenance add <name/uuid> <gray>(将玩家加入维护玩家白名单,这样即使开启了维护,他们也能加入服务器)"
|
||||
helpWhitelistRemove: "<gold>/maintenance remove <name/uuid> <gray>(将玩家从维护玩家白名单中移除)"
|
||||
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
|
||||
helpAbortSingleTimer: "<gold>/maintenance aborttimer [server] <gray>(中止指定服务器开启的计时器)"
|
||||
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <disable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be disabled)"
|
||||
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <enable in> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <enable in> <maintenance duration> <gray>(After the given time, e.g. 1h5m, maintenance mode will be enabled)"
|
||||
helpSingleToggle: "<gold>/maintenance <on/off> [server] <gray>(开启/关闭指定服务器的维护模式)"
|
||||
helpStatus: "<gold>/maintenance status <gray>(列出当前正在维护的所有服务器)"
|
||||
#Used for autoupdating the language file, do not change this value.
|
||||
language-version: 2
|
||||
@@ -1,158 +0,0 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2021 kennytv (https://github.com/kennytv)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core.config;
|
||||
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestInstance;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
// I'm sorry in advance
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
class ConfigTest {
|
||||
|
||||
@BeforeAll
|
||||
void initAll() {
|
||||
delete("config.yml");
|
||||
delete("config-saved.yml");
|
||||
delete("config-set.yml");
|
||||
delete("dirty-config-saved.yml");
|
||||
delete("dirty-config-upgraded.yml");
|
||||
copyOriginalToTest("config.yml", "config.yml");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testHeader() throws Exception {
|
||||
final Config config = new Config(getTestFile("config.yml"));
|
||||
config.load();
|
||||
|
||||
final String header = config.getHeader();
|
||||
config.resetAwesomeHeader();
|
||||
assertTrue(config.getHeader().endsWith("\n"), "Header needs to end with a new line");
|
||||
assertEquals(config.getHeader(), header);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testDeep() throws IOException {
|
||||
final Config config = new Config(getTestFile("config.yml"));
|
||||
config.load();
|
||||
assertEquals(3306, config.getInt("mysql.port"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSaveConsistency() throws IOException {
|
||||
final Config config = new Config(getTestFile("config.yml"));
|
||||
config.load();
|
||||
|
||||
final File saveTo = getTestFile("config-saved.yml");
|
||||
config.saveTo(saveTo);
|
||||
|
||||
final Config newlyLoaded = new Config(saveTo);
|
||||
newlyLoaded.load();
|
||||
|
||||
assertEquals(config.toString(), newlyLoaded.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
void testParsing() throws IOException {
|
||||
final Config config = new Config(getTestFile("dirty-config.yml"));
|
||||
config.load();
|
||||
final File saveTo = getTestFile("dirty-config-saved.yml");
|
||||
config.saveTo(saveTo);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testUpgrading() throws IOException {
|
||||
final Config config = new Config(getTestFile("dirty-config.yml"));
|
||||
config.load();
|
||||
|
||||
final Config newestConfig = new Config(getTestFile("config.yml"));
|
||||
newestConfig.load();
|
||||
|
||||
config.addMissingFields(newestConfig);
|
||||
config.replaceComments(newestConfig);
|
||||
config.set("config-version", 4);
|
||||
final File saveTo = getTestFile("dirty-config-upgraded.yml");
|
||||
config.resetAwesomeHeader();
|
||||
config.saveTo(saveTo);
|
||||
|
||||
final Config newlyLoaded = new Config(saveTo);
|
||||
newlyLoaded.load();
|
||||
|
||||
assertTrue(newestConfig.contains("waiting-server"));
|
||||
assertNotNull(newestConfig.getComments().get("maintenance-enabled"));
|
||||
assertNotNull(newestConfig.getComments().get("mysql.use-ssl"));
|
||||
assertNotNull(newestConfig.getComments().get("update-checks"));
|
||||
assertEquals(newlyLoaded.getHeader(), newestConfig.getHeader());
|
||||
assertEquals("useer", newlyLoaded.getSection("mysql").getString("username"));
|
||||
assertEquals(4, newlyLoaded.getInt("config-version"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSetAndContains() throws IOException {
|
||||
final Config config = new Config(getTestFile("config.yml"));
|
||||
config.load();
|
||||
|
||||
// Test for pre-existing values
|
||||
assertTrue(config.contains("fallback"));
|
||||
assertTrue(config.contains("mysql.password"));
|
||||
assertFalse(config.contains("test"));
|
||||
assertTrue(config.getComments().containsKey("fallback"));
|
||||
assertTrue(config.getComments().containsKey("mysql.use-ssl"));
|
||||
|
||||
config.set("test", "abc");
|
||||
config.remove("fallback");
|
||||
final ConfigSection section = config.getSection("mysql");
|
||||
section.set("port", 1000);
|
||||
section.remove("use-ssl");
|
||||
|
||||
assertTrue(config.contains("test"));
|
||||
assertEquals("abc", config.getString("test"));
|
||||
assertEquals(1000, config.getInt("mysql.port"));
|
||||
assertFalse(config.contains("mysql.use-ssl"));
|
||||
assertFalse(config.getSection("mysql").contains("use-ssl"));
|
||||
assertFalse(config.contains("fallback"));
|
||||
assertFalse(config.getComments().containsKey("fallback"));
|
||||
assertFalse(config.getComments().containsKey("mysql.use-ssl"));
|
||||
}
|
||||
|
||||
private File getTestFile(final String path) {
|
||||
return new File("src/test/resources/" + path);
|
||||
}
|
||||
|
||||
private void copyOriginalToTest(final String from, final String to) {
|
||||
final File file = new File("src/main/resources/" + from);
|
||||
try {
|
||||
Files.copy(file.toPath(), getTestFile(to).toPath());
|
||||
} catch (final IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private void delete(final String path) {
|
||||
final File file = getTestFile(path);
|
||||
if (file.exists()) {
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
# Enables maintenance mode.
|
||||
maintenance-enabled: true
|
||||
|
||||
# Enables maintenance on certain servers managed by your Bungee instance(s).
|
||||
proxied-maintenance-servers:
|
||||
- SpigotServer1
|
||||
# - AnotherServer
|
||||
|
||||
# If maintenance is enabled on a proxied server with players on it,
|
||||
# they will be sent to the fallback server instead of being kicked off the network.
|
||||
# If the fallback server is not reachable/not set, they will just be kicked off the network.
|
||||
fallback: ''
|
||||
|
||||
# The message shown in the multiplayer server list motd when maintenance is enabled.
|
||||
# If you put in multiple entries, one of them will be chosen randomly on every ping.
|
||||
# If running an endtimer, the time left can be displayed by including '%TIMER%' in a pingmessage (also works in playercount(-hover) message).
|
||||
pingmessages:
|
||||
- |2-
|
||||
&2&lX's &b&lServer &f- &7&l(1.12.2-1.15.2)
|
||||
&4&n&lMANUTENZIONE!
|
||||
enable-timerspecific-messages: true
|
||||
timerspecific-pingmessages:
|
||||
- |2-
|
||||
&2&lX's &b&lServer &f- &7&l(1.12.2-1.15.2)
|
||||
&4&n&lMANUTENZIONE! Torneremo tra %TIMER%
|
||||
enable-playercountmessage: true
|
||||
playercountmessage: '&41.12.2-1.15.2'
|
||||
playercounthovermessage: '&n&lStato server: In manutenzione'
|
||||
custom-maintenance-icon: false
|
||||
send-join-notification: false
|
||||
kick-online-players: true
|
||||
language: de
|
||||
mysql:
|
||||
use-mysql: false
|
||||
host: host
|
||||
port: 3306
|
||||
database: database
|
||||
username: useer
|
||||
password: password
|
||||
update-interval: 15
|
||||
use-ssl: true
|
||||
continue-endtimer-after-restart:
|
||||
enabled: false
|
||||
end: 0
|
||||
timer-broadcast-for-seconds:
|
||||
- 1200
|
||||
- 900
|
||||
- 600
|
||||
- 300
|
||||
- 120
|
||||
- 60
|
||||
- 30
|
||||
- 20
|
||||
- 10
|
||||
- 5
|
||||
- 4
|
||||
- 3
|
||||
- 2
|
||||
- 1
|
||||
update-checks: true
|
||||
config-version: 3
|
||||
@@ -1,3 +0,0 @@
|
||||
files:
|
||||
- source: /core/src/main/resources/language-en.yml
|
||||
translation: /core/src/main/resources/language-%two_letters_code%.yml
|
||||
@@ -1,7 +0,0 @@
|
||||
projectVersion=4.2.1
|
||||
|
||||
# Gradle properties
|
||||
org.gradle.daemon=true
|
||||
org.gradle.configureondemand=true
|
||||
org.gradle.parallel=true
|
||||
org.gradle.configuration-cache=true
|
||||
@@ -1,70 +0,0 @@
|
||||
metadata.format.version = "1.1"
|
||||
|
||||
[versions]
|
||||
|
||||
# Shaded
|
||||
adventure = "4.17.0"
|
||||
adventurePlatform = "4.3.4"
|
||||
mysqlConnector = "8.0.33"
|
||||
hikariCP = "4.0.3"
|
||||
bstats = "3.0.3"
|
||||
|
||||
# Provided
|
||||
gson = "2.8.8"
|
||||
guava = "29.0-jre"
|
||||
snakeyaml = "1.23"
|
||||
jetbrainsAnnotations = "24.0.1"
|
||||
|
||||
protocollib = "5.0.0"
|
||||
authlib = "1.5.25"
|
||||
luckperms = "5.3"
|
||||
serverlistplus = "3.5.0"
|
||||
|
||||
paper = "1.16.5-R0.1-SNAPSHOT"
|
||||
bungee = "1.19.4-R0.1-SNAPSHOT"
|
||||
sponge = "8.0.0"
|
||||
velocity = "3.1.0"
|
||||
|
||||
junitVer = "5.11.0"
|
||||
protocollibJarPath = "libs/ProtocolLib-5.0.jar"
|
||||
|
||||
|
||||
[libraries]
|
||||
|
||||
adventureApi = { group = "net.kyori", name = "adventure-api", version.ref = "adventure" }
|
||||
adventureTextMinimessage = { group = "net.kyori", name = "adventure-text-minimessage", version.ref = "adventure" }
|
||||
adventureTextSerializerGson = { group = "net.kyori", name = "adventure-text-serializer-gson", version.ref = "adventure" }
|
||||
adventureTextSerializerLegacy = { group = "net.kyori", name = "adventure-text-serializer-legacy", version.ref = "adventure" }
|
||||
adventurePlatformBukkit = { group = "net.kyori", name = "adventure-platform-bukkit", version.ref = "adventurePlatform" }
|
||||
adventurePlatformBungee = { group = "net.kyori", name = "adventure-platform-bungeecord", version.ref = "adventurePlatform" }
|
||||
|
||||
mysqlConnector = { group = "com.mysql", name = "mysql-connector-j", version.ref = "mysqlConnector" }
|
||||
jetbrainsAnnotations = { group = "org.jetbrains", name = "annotations", version.ref = "jetbrainsAnnotations" }
|
||||
gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
|
||||
guava = { group = "com.google.guava", name = "guava", version.ref = "guava" }
|
||||
bstatsBukkit = { group = "org.bstats", name = "bstats-bukkit", version.ref = "bstats" }
|
||||
bstatsBungee = { group = "org.bstats", name = "bstats-bungeecord", version.ref = "bstats" }
|
||||
bstatsSponge = { group = "org.bstats", name = "bstats-sponge", version.ref = "bstats" }
|
||||
bstatsVelocity = { group = "org.bstats", name = "bstats-velocity", version.ref = "bstats" }
|
||||
|
||||
authlib = { group = "com.mojang", name = "authlib", version.ref = "authlib" }
|
||||
protocollib = { group = "com.comphenix.protocol", name = "ProtocolLib", version.ref = "protocollib" }
|
||||
hikariCP = { group = "com.zaxxer", name = "HikariCP", version.ref = "hikariCP" }
|
||||
luckperms = { group = "net.luckperms", name = "api", version.ref = "luckperms" }
|
||||
snakeyaml = { group = "org.yaml", name = "snakeyaml", version.ref = "snakeyaml" }
|
||||
serverlistplus = { group = "net.minecrell", name = "ServerListPlus", version.ref = "serverlistplus" }
|
||||
|
||||
paper = { group = "com.destroystokyo.paper", name = "paper-api", version.ref = "paper" }
|
||||
bungee = { group = "net.md-5", name = "bungeecord-api", version.ref = "bungee" }
|
||||
sponge = { group = "org.spongepowered", name = "spongeapi", version.ref = "sponge" }
|
||||
velocity = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocity" }
|
||||
|
||||
jupiterApi = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junitVer" }
|
||||
jupiterEngine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junitVer" }
|
||||
|
||||
|
||||
[bundles]
|
||||
|
||||
adventure = ["adventureApi", "adventureTextMinimessage", "adventureTextSerializerGson", "adventureTextSerializerLegacy"]
|
||||
junit = ["jupiterApi", "jupiterEngine"]
|
||||
|
||||
Vendored
BIN
Binary file not shown.
-7
@@ -1,7 +0,0 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -1,251 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
Vendored
-94
@@ -1,94 +0,0 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
Binary file not shown.
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>eu.kennytv</groupId>
|
||||
<artifactId>maintenance-parent</artifactId>
|
||||
<version>3.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>maintenance-api</artifactId>
|
||||
<name>MaintenanceAPI</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>net.md-5</groupId>
|
||||
<artifactId>bungeecord-api</artifactId>
|
||||
<version>1.13-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.13.2-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.spongepowered</groupId>
|
||||
<artifactId>spongeapi</artifactId>
|
||||
<version>7.1.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
+11
-27
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
* Maintenance - https://git.io/maintenancemode
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -15,11 +15,14 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eu.kennytv.maintenance.api;
|
||||
|
||||
import eu.kennytv.maintenance.api.event.manager.EventManager;
|
||||
|
||||
public interface Maintenance {
|
||||
/**
|
||||
* @author KennyTV
|
||||
* @since 2.1
|
||||
*/
|
||||
public interface IMaintenance {
|
||||
|
||||
/**
|
||||
* Enables/disables maintenance mode.
|
||||
@@ -49,28 +52,9 @@ public interface Maintenance {
|
||||
String getVersion();
|
||||
|
||||
/**
|
||||
* Returns the {@link Settings} instance, which gives further insight into settings set in the config files.
|
||||
* Returns the {@link ISettings} instance, which gives further insight into settings set in the config files.
|
||||
*
|
||||
* @return {@link Settings} instance
|
||||
* @return {@link ISettings} instance
|
||||
*/
|
||||
Settings getSettings();
|
||||
|
||||
/**
|
||||
* Returns the {@link EventManager} instance to register listeners to maintenance events.
|
||||
*
|
||||
* @return {@link EventManager} instance
|
||||
*/
|
||||
EventManager getEventManager();
|
||||
|
||||
/**
|
||||
* @return true if debug mode is enabled, currently only implemented on Bungee
|
||||
*/
|
||||
boolean isDebug();
|
||||
|
||||
/**
|
||||
* Sets the debug mode.
|
||||
*
|
||||
* @param debug debug state
|
||||
*/
|
||||
void setDebug(boolean debug);
|
||||
ISettings getSettings();
|
||||
}
|
||||
+10
-8
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
* Maintenance - https://git.io/maintenancemode
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -15,17 +15,19 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.core;
|
||||
|
||||
import eu.kennytv.maintenance.api.Maintenance;
|
||||
package eu.kennytv.maintenance.api;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface MaintenanceBase {
|
||||
/**
|
||||
* @author KennyTV
|
||||
* @since 2.2.2
|
||||
*/
|
||||
public interface IMaintenanceBase {
|
||||
|
||||
/**
|
||||
* This method is used internally when getting the api instance.
|
||||
*
|
||||
* @return {@link Maintenance} instance
|
||||
* @return {@link IMaintenance} instance
|
||||
*/
|
||||
Maintenance getApi();
|
||||
IMaintenance getApi();
|
||||
}
|
||||
+9
-17
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
* Maintenance - https://git.io/maintenancemode
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -15,12 +15,17 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eu.kennytv.maintenance.api;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
public interface Settings {
|
||||
/**
|
||||
* @author KennyTV
|
||||
* @since 2.1
|
||||
*/
|
||||
public interface ISettings {
|
||||
|
||||
/**
|
||||
* Note that the value might need a few seconds to update, if you're on BungeeCord with MySQL enabled
|
||||
@@ -29,11 +34,6 @@ public interface Settings {
|
||||
*/
|
||||
boolean isMaintenance();
|
||||
|
||||
/**
|
||||
* @return true if custom ping messages during maintenance should be used
|
||||
*/
|
||||
boolean isEnablePingMessages();
|
||||
|
||||
/**
|
||||
* @return value of the 'send-join-notification' config field
|
||||
*/
|
||||
@@ -52,14 +52,6 @@ public interface Settings {
|
||||
*/
|
||||
Map<UUID, String> getWhitelistedPlayers();
|
||||
|
||||
/**
|
||||
* Returns whether the uuid is whitelisted.
|
||||
*
|
||||
* @param uuid uuid of the player to check
|
||||
* @return true if the uuid is whitelisted
|
||||
*/
|
||||
boolean isWhitelisted(UUID uuid);
|
||||
|
||||
/**
|
||||
* Removes a player from the maintenance whitelist.
|
||||
*
|
||||
@@ -84,7 +76,7 @@ public interface Settings {
|
||||
*
|
||||
* @param uuid uuid of the player to add
|
||||
* @param name of the player to add
|
||||
* @return true if adding the player was successful, false if already on the whitelist
|
||||
* @return true if adding the player was successful
|
||||
*/
|
||||
boolean addWhitelistedPlayer(UUID uuid, String name);
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Maintenance - https://git.io/maintenancemode
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eu.kennytv.maintenance.api.bungee;
|
||||
|
||||
import eu.kennytv.maintenance.api.IMaintenanceBase;
|
||||
import eu.kennytv.maintenance.api.proxy.IMaintenanceProxy;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
import net.md_5.bungee.api.plugin.Plugin;
|
||||
|
||||
/**
|
||||
* Utility class to get the {@link IMaintenanceProxy} instance for the BungeeCord version of the plugin.
|
||||
* <p>
|
||||
* Only access this class if you're running the plugin on a BungeeCord server!
|
||||
* </p>
|
||||
*
|
||||
* @author KennyTV
|
||||
* @since 2.5
|
||||
*/
|
||||
public final class MaintenanceBungeeAPI {
|
||||
|
||||
/**
|
||||
* Returns API instance of the Maintenance plugin.
|
||||
*
|
||||
* @return {@link IMaintenanceProxy} instance
|
||||
* @throws IllegalArgumentException if using a custom (or broken?) version of the plugin, that can't be identified
|
||||
*/
|
||||
public static IMaintenanceProxy getAPI() {
|
||||
final Plugin maintenance = ProxyServer.getInstance().getPluginManager().getPlugin("MaintenanceBungee");
|
||||
if (maintenance == null)
|
||||
throw new IllegalArgumentException("Could not get instance of MaintenanceBungee! Broken/custom build of the plugin?");
|
||||
return (IMaintenanceProxy) ((IMaintenanceBase) maintenance).getApi();
|
||||
}
|
||||
}
|
||||
+9
-20
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
* Maintenance - https://git.io/maintenancemode
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -15,14 +15,16 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eu.kennytv.maintenance.api.proxy;
|
||||
|
||||
import eu.kennytv.maintenance.api.Maintenance;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import eu.kennytv.maintenance.api.IMaintenance;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public interface MaintenanceProxy extends Maintenance {
|
||||
/**
|
||||
* @author KennyTV
|
||||
* @since 3.0
|
||||
*/
|
||||
public interface IMaintenanceProxy extends IMaintenance {
|
||||
|
||||
/**
|
||||
* Enables/disables maintenance mode on a proxied server.
|
||||
@@ -56,18 +58,5 @@ public interface MaintenanceProxy extends Maintenance {
|
||||
* @param server name of the proxied server
|
||||
* @return wrapped server object if present, else null
|
||||
*/
|
||||
@Nullable
|
||||
Server getServer(String server);
|
||||
|
||||
/**
|
||||
* Returns the currently registered proxied servers.
|
||||
*
|
||||
* @return set of proxied servers
|
||||
*/
|
||||
Set<String> getServers();
|
||||
|
||||
/**
|
||||
* @return immutable set with names of all proxied server that are currently under maintenance
|
||||
*/
|
||||
Set<String> getMaintenanceServers();
|
||||
}
|
||||
+9
-15
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
* Maintenance - https://git.io/maintenancemode
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -15,13 +15,15 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.api.proxy;
|
||||
|
||||
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
|
||||
package eu.kennytv.maintenance.api.proxy;
|
||||
|
||||
/**
|
||||
* Wrapper for a proxied server.
|
||||
* Use {@link MaintenanceProxy#getServer(String)} to get a server instance.
|
||||
* Use {@link IMaintenanceProxy#getServer(String)} to get a server instance.
|
||||
*
|
||||
* @author KennyTV
|
||||
* @since 3.0
|
||||
*/
|
||||
public interface Server {
|
||||
|
||||
@@ -38,15 +40,7 @@ public interface Server {
|
||||
/**
|
||||
* Sends a message to all players on the server.
|
||||
*
|
||||
* @param component message to be broadcasted
|
||||
* @param message message to be broadcasted
|
||||
*/
|
||||
void broadcast(Component component);
|
||||
|
||||
/**
|
||||
* Returns whether the server is registered under the proxy.
|
||||
* This will only ever be false if maintenance is disabled on a *previously* registered server.
|
||||
*
|
||||
* @return whether the server is registered under the proxy
|
||||
*/
|
||||
boolean isRegisteredServer();
|
||||
void broadcast(String message);
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Maintenance - https://git.io/maintenancemode
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eu.kennytv.maintenance.api.spigot;
|
||||
|
||||
import eu.kennytv.maintenance.api.IMaintenance;
|
||||
import eu.kennytv.maintenance.api.IMaintenanceBase;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
/**
|
||||
* Utility class to get the {@link IMaintenance} instance for the Spigot version of the plugin.
|
||||
* <p>
|
||||
* Only access this class if you're running the plugin on a Spigot server!
|
||||
* </p>
|
||||
*
|
||||
* @author KennyTV
|
||||
* @since 2.5
|
||||
*/
|
||||
public final class MaintenanceSpigotAPI {
|
||||
|
||||
/**
|
||||
* Returns API instance of the Maintenance plugin.
|
||||
*
|
||||
* @return {@link IMaintenance} instance
|
||||
* @throws IllegalArgumentException if using a custom (or broken?) version of the plugin, that can't be identified
|
||||
*/
|
||||
public static IMaintenance getAPI() {
|
||||
final Plugin maintenance = Bukkit.getPluginManager().getPlugin("MaintenanceSpigot");
|
||||
if (maintenance == null)
|
||||
throw new IllegalArgumentException("Could not get instance of MaintenanceSpigot! Broken/custom build of the plugin?");
|
||||
return ((IMaintenanceBase) maintenance).getApi();
|
||||
}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Maintenance - https://git.io/maintenancemode
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eu.kennytv.maintenance.api.sponge;
|
||||
|
||||
import eu.kennytv.maintenance.api.IMaintenance;
|
||||
import org.spongepowered.api.Sponge;
|
||||
import org.spongepowered.api.plugin.PluginContainer;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* Utility class to get the {@link IMaintenance} instance for the Sponge version of the plugin.
|
||||
* <p>
|
||||
* Only access this class if you're running the plugin on a Sponge server!
|
||||
* </p>
|
||||
*
|
||||
* @author KennyTV
|
||||
* @since 3.0
|
||||
*/
|
||||
public final class MaintenanceSpongeAPI {
|
||||
|
||||
/**
|
||||
* Returns API instance of the Maintenance plugin.
|
||||
*
|
||||
* @return {@link IMaintenance} instance
|
||||
* @throws IllegalArgumentException if using a custom (or broken?) version of the plugin, that can't be identified
|
||||
*/
|
||||
public static IMaintenance getAPI() {
|
||||
final Optional<PluginContainer> container = Sponge.getPluginManager().getPlugin("maintenancesponge");
|
||||
if (!container.isPresent() || !container.get().getInstance().isPresent())
|
||||
throw new IllegalArgumentException("Could not get instance of MaintenanceSponge! Broken/custom build of the plugin?");
|
||||
return (IMaintenance) container.get().getInstance().get();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>eu.kennytv</groupId>
|
||||
<artifactId>maintenance-parent</artifactId>
|
||||
<version>3.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>maintenance-build</artifactId>
|
||||
<name>Maintenance</name>
|
||||
|
||||
<dependencies>
|
||||
<!-- Also includes maintenance-core and maintenance-core-proxy modules -->
|
||||
<dependency>
|
||||
<groupId>eu.kennytv</groupId>
|
||||
<artifactId>maintenance-bungee</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>eu.kennytv</groupId>
|
||||
<artifactId>maintenance-spigot</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>eu.kennytv</groupId>
|
||||
<artifactId>maintenance-sponge</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>eu.kennytv</groupId>
|
||||
<artifactId>maintenance-velocity</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>eu.kennytv</groupId>
|
||||
<artifactId>maintenance-parent</artifactId>
|
||||
<version>3.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>maintenance-bungee</artifactId>
|
||||
<name>MaintenanceBungee</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>eu.kennytv</groupId>
|
||||
<artifactId>maintenance-core-proxy</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.md-5</groupId>
|
||||
<artifactId>bungeecord-api</artifactId>
|
||||
<version>1.13-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
+20
-15
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of Maintenance - https://github.com/kennytv/Maintenance
|
||||
* Copyright (C) 2018-2024 kennytv (https://github.com/kennytv)
|
||||
* Maintenance - https://git.io/maintenancemode
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -15,24 +15,29 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package eu.kennytv.maintenance.api.event;
|
||||
|
||||
import eu.kennytv.maintenance.api.event.manager.MaintenanceEvent;
|
||||
package eu.kennytv.maintenance.bungee;
|
||||
|
||||
/**
|
||||
* Notification event fired when maintenance mode has been changed.
|
||||
*/
|
||||
public final class MaintenanceChangedEvent implements MaintenanceEvent {
|
||||
private final boolean maintenance;
|
||||
import eu.kennytv.maintenance.api.IMaintenance;
|
||||
import eu.kennytv.maintenance.api.IMaintenanceBase;
|
||||
import net.md_5.bungee.api.plugin.Plugin;
|
||||
|
||||
public MaintenanceChangedEvent(final boolean maintenance) {
|
||||
this.maintenance = maintenance;
|
||||
import java.io.File;
|
||||
|
||||
public final class MaintenanceBungeeBase extends Plugin implements IMaintenanceBase {
|
||||
private IMaintenance maintenance;
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
maintenance = new MaintenanceBungeePlugin(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if maintenance has been enabled, false otherwise
|
||||
*/
|
||||
public boolean isMaintenance() {
|
||||
@Override
|
||||
public IMaintenance getApi() {
|
||||
return maintenance;
|
||||
}
|
||||
|
||||
File getPluginFile() {
|
||||
return getFile();
|
||||
}
|
||||
}
|
||||
+228
@@ -0,0 +1,228 @@
|
||||
/*
|
||||
* Maintenance - https://git.io/maintenancemode
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eu.kennytv.maintenance.bungee;
|
||||
|
||||
import eu.kennytv.maintenance.api.bungee.MaintenanceBungeeAPI;
|
||||
import eu.kennytv.maintenance.api.proxy.IMaintenanceProxy;
|
||||
import eu.kennytv.maintenance.api.proxy.Server;
|
||||
import eu.kennytv.maintenance.bungee.command.MaintenanceBungeeCommand;
|
||||
import eu.kennytv.maintenance.bungee.command.MaintenanceBungeeCommandBase;
|
||||
import eu.kennytv.maintenance.bungee.listener.PostLoginListener;
|
||||
import eu.kennytv.maintenance.bungee.listener.ProxyPingListener;
|
||||
import eu.kennytv.maintenance.bungee.listener.ServerConnectListener;
|
||||
import eu.kennytv.maintenance.bungee.metrics.MetricsLite;
|
||||
import eu.kennytv.maintenance.bungee.util.BungeeSenderInfo;
|
||||
import eu.kennytv.maintenance.bungee.util.BungeeServer;
|
||||
import eu.kennytv.maintenance.bungee.util.BungeeTask;
|
||||
import eu.kennytv.maintenance.core.dump.PluginDump;
|
||||
import eu.kennytv.maintenance.core.hook.ServerListPlusHook;
|
||||
import eu.kennytv.maintenance.core.proxy.MaintenanceProxyPlugin;
|
||||
import eu.kennytv.maintenance.core.proxy.SettingsProxy;
|
||||
import eu.kennytv.maintenance.core.util.SenderInfo;
|
||||
import eu.kennytv.maintenance.core.util.ServerType;
|
||||
import eu.kennytv.maintenance.core.util.Task;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.Favicon;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
import net.md_5.bungee.api.chat.ClickEvent;
|
||||
import net.md_5.bungee.api.chat.ComponentBuilder;
|
||||
import net.md_5.bungee.api.chat.HoverEvent;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import net.md_5.bungee.api.config.ServerInfo;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import net.md_5.bungee.api.plugin.Plugin;
|
||||
import net.md_5.bungee.api.plugin.PluginManager;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author KennyTV
|
||||
* @since 1.0
|
||||
*/
|
||||
public final class MaintenanceBungeePlugin extends MaintenanceProxyPlugin {
|
||||
private final MaintenanceBungeeBase plugin;
|
||||
private Favicon favicon;
|
||||
|
||||
MaintenanceBungeePlugin(final MaintenanceBungeeBase plugin) {
|
||||
super(plugin.getDescription().getVersion(), ServerType.BUNGEE);
|
||||
this.plugin = plugin;
|
||||
|
||||
settingsProxy = new SettingsProxy(this);
|
||||
settings = settingsProxy;
|
||||
|
||||
sendEnableMessage();
|
||||
|
||||
final PluginManager pm = getProxy().getPluginManager();
|
||||
pm.registerListener(plugin, new PostLoginListener(this, settingsProxy));
|
||||
pm.registerListener(plugin, new ProxyPingListener(this, settingsProxy));
|
||||
pm.registerListener(plugin, new ServerConnectListener(this, settingsProxy));
|
||||
commandManager = new MaintenanceBungeeCommand(this, settingsProxy);
|
||||
pm.registerCommand(plugin, new MaintenanceBungeeCommandBase(commandManager));
|
||||
|
||||
new MetricsLite(plugin);
|
||||
|
||||
// ServerListPlus integration
|
||||
final Plugin serverListPlus = pm.getPlugin("ServerListPlus");
|
||||
if (serverListPlus != null) {
|
||||
serverListPlusHook = new ServerListPlusHook(serverListPlus);
|
||||
serverListPlusHook.setEnabled(!settingsProxy.isMaintenance());
|
||||
plugin.getLogger().info("Enabled ServerListPlus integration!");
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static IMaintenanceProxy getAPI() {
|
||||
return MaintenanceBungeeAPI.getAPI();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendUpdateNotification(final SenderInfo sender) {
|
||||
final TextComponent tc1 = new TextComponent(TextComponent.fromLegacyText(getPrefix()));
|
||||
final TextComponent tc2 = new TextComponent(TextComponent.fromLegacyText("§cDownload it at: §6https://www.spigotmc.org/resources/maintenance.40699/"));
|
||||
final TextComponent click = new TextComponent(TextComponent.fromLegacyText(" §7§l§o(CLICK ME)"));
|
||||
click.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://www.spigotmc.org/resources/maintenance.40699/"));
|
||||
click.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§aDownload the latest version").create()));
|
||||
tc1.addExtra(tc2);
|
||||
tc1.addExtra(click);
|
||||
((BungeeSenderInfo) sender).sendMessage(tc1);
|
||||
}
|
||||
|
||||
public boolean isMaintenance(final ServerInfo serverInfo) {
|
||||
return settingsProxy.isMaintenance(new BungeeServer(serverInfo));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void kickPlayers() {
|
||||
getProxy().getPlayers().stream()
|
||||
.filter(p -> !hasPermission(p, "bypass") && !settingsProxy.getWhitelistedPlayers().containsKey(p.getUniqueId()))
|
||||
.forEach(p -> p.disconnect(settingsProxy.getKickMessage()));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void kickPlayers(final Server server, final Server fallback) {
|
||||
final ServerInfo fallbackServer = fallback != null ? ((BungeeServer) fallback).getServer() : null;
|
||||
((BungeeServer) server).getServer().getPlayers().forEach(p -> {
|
||||
if (!hasPermission(p, "bypass") && !settingsProxy.getWhitelistedPlayers().containsKey(p.getUniqueId())) {
|
||||
if (fallbackServer != null && fallbackServer.canAccess(p) && !isMaintenance(fallback)) {
|
||||
p.sendMessage(settingsProxy.getMessage("singleMaintenanceActivated").replace("%SERVER%", server.getName()));
|
||||
p.connect(fallbackServer);
|
||||
} else
|
||||
p.disconnect(settingsProxy.getMessage("singleMaintenanceKickComplete").replace("%NEWLINE%", "\n").replace("%SERVER%", server.getName()));
|
||||
} else {
|
||||
p.sendMessage(settingsProxy.getMessage("singleMaintenanceActivated").replace("%SERVER%", server.getName()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Task startMaintenanceRunnable(final Runnable runnable) {
|
||||
return new BungeeTask(getProxy().getScheduler().schedule(plugin, runnable, 0, 1, TimeUnit.SECONDS).getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Server getServer(final String server) {
|
||||
final ServerInfo serverInfo = getProxy().getServerInfo(server);
|
||||
return serverInfo != null ? new BungeeServer(serverInfo) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SenderInfo getOfflinePlayer(final String name) {
|
||||
final ProxiedPlayer player = getProxy().getPlayer(name);
|
||||
return player != null ? new BungeeSenderInfo(player) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SenderInfo getOfflinePlayer(final UUID uuid) {
|
||||
final ProxiedPlayer player = getProxy().getPlayer(uuid);
|
||||
return player != null ? new BungeeSenderInfo(player) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getServer(final SenderInfo sender) {
|
||||
final ProxiedPlayer player = getProxy().getPlayer(sender.getUuid());
|
||||
return player != null ? player.getServer().getInfo().getName() : "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void async(final Runnable runnable) {
|
||||
getProxy().getScheduler().runAsync(plugin, runnable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void broadcast(final String message) {
|
||||
getProxy().broadcast(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getDataFolder() {
|
||||
return plugin.getDataFolder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getPluginFile() {
|
||||
return plugin.getPluginFile();
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream getResource(final String name) {
|
||||
return plugin.getResourceAsStream(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Logger getLogger() {
|
||||
return plugin.getLogger();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getServerVersion() {
|
||||
return getProxy().getVersion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PluginDump> getPlugins() {
|
||||
return getProxy().getPluginManager().getPlugins().stream().map(plugin ->
|
||||
new PluginDump(plugin.getDescription().getName(), plugin.getDescription().getVersion(), Arrays.asList(plugin.getDescription().getAuthor()))).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadIcon(final File file) throws IOException {
|
||||
favicon = Favicon.create(ImageIO.read(file));
|
||||
}
|
||||
|
||||
public boolean hasPermission(final CommandSender sender, final String permission) {
|
||||
return sender.hasPermission("maintenance." + permission) || sender.hasPermission("maintenance.admin");
|
||||
}
|
||||
|
||||
public ProxyServer getProxy() {
|
||||
return plugin.getProxy();
|
||||
}
|
||||
|
||||
public Favicon getFavicon() {
|
||||
return favicon;
|
||||
}
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Maintenance - https://git.io/maintenancemode
|
||||
* Copyright (C) 2018 KennyTV (https://github.com/KennyTV)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package eu.kennytv.maintenance.bungee.command;
|
||||
|
||||
import eu.kennytv.maintenance.bungee.MaintenanceBungeePlugin;
|
||||
import eu.kennytv.maintenance.bungee.util.BungeeSenderInfo;
|
||||
import eu.kennytv.maintenance.core.proxy.SettingsProxy;
|
||||
import eu.kennytv.maintenance.core.proxy.command.MaintenanceProxyCommand;
|
||||
import eu.kennytv.maintenance.core.util.SenderInfo;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.chat.ClickEvent;
|
||||
import net.md_5.bungee.api.chat.HoverEvent;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public final class MaintenanceBungeeCommand extends MaintenanceProxyCommand {
|
||||
private final MaintenanceBungeePlugin plugin;
|
||||
|
||||
public MaintenanceBungeeCommand(final MaintenanceBungeePlugin plugin, final SettingsProxy settings) {
|
||||
super(plugin, settings);
|
||||
this.plugin = plugin;
|
||||
registerCommands();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void sendUpdateMessage(final SenderInfo sender) {
|
||||
final TextComponent tc = new TextComponent("§6× §8[§aUpdate§8]");
|
||||
tc.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/maintenance forceupdate"));
|
||||
tc.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText("§aClick here to update the plugin")));
|
||||
tc.addExtra(" §8< §7Or use the command §c/maintenance forceupdate");
|
||||
((BungeeSenderInfo) sender).sendMessage(tc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getServersCompletion(final String s) {
|
||||
return plugin.getProxy().getServers().entrySet().stream().filter(entry -> entry.getKey().toLowerCase().startsWith(s))
|
||||
.filter(entry -> !plugin.getSettingsProxy().getMaintenanceServers().contains(entry.getValue().getName()))
|
||||
.map(entry -> entry.getValue().getName()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendDumpMessage(final SenderInfo sender, final String url) {
|
||||
final BungeeSenderInfo bungeeSender = ((BungeeSenderInfo) sender);
|
||||
final TextComponent clickText = new TextComponent(plugin.getPrefix() + "§7Click here to copy the link");
|
||||
clickText.setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, url));
|
||||
clickText.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText("§aClick here to copy the link")));
|
||||
bungeeSender.sendMessage(clickText);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getPlayersCompletion() {
|
||||
return plugin.getProxy().getPlayers().stream().map(CommandSender::getName).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
Loaded 100 of 215 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user