Compare commits

..
595 Commits
Author SHA1 Message Date
Nassim Jahnke 864fee66fa 4.2.1 Release 2024-05-17 15:39:28 +02:00
Maintenancer 3c810d7ed3 New Crowdin updates (#120)
* New translations language-en.yml (Chinese Simplified)

* New translations language-en.yml (Russian)
2024-05-17 15:25:26 +02:00
Maintenancer e24806694e New Crowdin updates (#119) 2024-04-30 00:10:43 +02:00
Nassim Jahnke fa7effe8f3 Add paperweight-mappings-namespace attribute 2024-04-28 03:53:56 +02:00
EpicPlayerA10 26802cbe1a Offline player fetching improvements (#117) 2024-03-24 18:40:20 +01:00
Alec Jensen 1cb35abccb Show proxied maintenance status in ping for forced hosts (#118) 2024-03-24 10:57:56 +01:00
Nassim Jahnke 1f2d0bba2a Update Gradle wrapper 2024-03-24 10:30:34 +01:00
Maintenancer a7e577554c New Crowdin updates (#114)
* New translations language-en.yml (Russian)

* New translations language-en.yml (Chinese Simplified)
2024-03-02 20:35:26 +01:00
Maintenancer c0b3ea22b9 New Crowdin updates (#113) 2024-02-04 17:25:28 +01:00
Maintenancer 0adf767b5e New translations language-en.yml (French) by Kertie2_ (#112) 2024-01-14 17:45:55 +01:00
Maintenancer 3cc21504f0 New Crowdin updates (#110)
* New translations language-en.yml (Italian)

* New translations language-en.yml (Hungarian)

* New translations language-en.yml (Chinese Simplified)

* New translations language-en.yml (Spanish)

* New translations language-en.yml (Turkish)

* New translations language-en.yml (German)

* New translations language-en.yml (Russian)
2024-01-14 17:39:41 +01:00
Nassim Jahnke cdebac351f Update copyright headers 2024-01-01 21:45:25 +01:00
Nassim Jahnke 8941b55362 Don't keep converting player count and count hover messages 2024-01-01 21:44:08 +01:00
Nassim Jahnke fa225ad5f0 Bump version to 4.2.1-SNAPSHOT 2023-12-31 16:26:22 +01:00
Nassim Jahnke dea7fc9032 Update Gradle wrapper 2023-12-13 22:47:27 +01:00
Nassim Jahnke ced1651c05 Update changelog title 2023-09-17 19:43:53 +10:00
Nassim Jahnke 6be27d05bb 4.2.0 Release 2023-09-17 18:31:33 +10:00
Maintenancer c39bb44e42 New Crowdin updates (#109) 2023-09-17 18:19:30 +10:00
Nassim Jahnke b71e1ce25d Add server specific timer command messages 2023-09-17 13:25:38 +10:00
Nassim Jahnke b5cfc47524 Update Blossom 2023-09-17 12:50:37 +10:00
Nassim Jahnke c32698fc76 Update maven repo for SLP and readd hook 2023-09-11 13:35:19 +10:00
Nassim Jahnke b177c5e2f8 Don't publish adventure modules 2023-09-10 15:14:57 +10:00
Nassim Jahnke d0e0aff78e Configure (manual) publishing 2023-09-10 14:47:48 +10:00
Nassim Jahnke 9f5ecd590e Remove SLP dependency for now
The repository is not available and thus breaks building...
2023-09-10 14:11:41 +10:00
Nassim Jahnke bc93f1f36d Update Gradle wrapper 2023-09-10 13:44:08 +10:00
Maintenancer 3c1c1e48fb New translations language-en.yml (Japanese) (#108) 2023-09-08 11:05:24 +10:00
c8e14e1d74 New Crowdin updates (#105)
* New translations language-en.yml (Portuguese)

* New translations language-en.yml (Danish)

* New translations language-en.yml (Korean)

Co-authored-by: JaeWoong Suh <90325840+SuhJae@users.noreply.github.com>
Co-authored-by: Jan CHristensen <skrivtiljan@gmail.com>
2023-08-08 17:04:49 +10:00
Maintenancer 29300d5fe2 Hungarian translation file (thanks to Kende) 2023-06-26 11:46:40 +02:00
Nassim Jahnke 7da9365e23 Add config options for commands on single server maintenance enable/disable 2023-06-15 13:08:28 +02:00
Nassim Jahnke ded84cd1c9 Update gradle wrapper 2023-06-15 12:30:01 +02:00
Maintenancer 62cc71675b New Crowdin updates (#99) 2023-06-15 11:41:00 +02:00
Nassim Jahnke 0752d3dc93 Update dependencies 2023-06-15 11:39:38 +02:00
Nassim Jahnke d352e44e50 Send user-agent to Hangar API 2023-06-15 11:36:28 +02:00
Nassim Jahnke 83877a6c3a Bump version to 4.2.0-SNAPSHOT 2023-06-15 11:34:24 +02:00
Nassim Jahnke 199eb2e67d 4.1.0 Release 2023-04-17 09:57:04 +02:00
Nassim Jahnke 0683450c2d Update version checker endpoint to Hangar 2023-04-17 09:57:04 +02:00
Nassim Jahnke dbdd7d18d0 Update Gradle wrapper 2023-04-15 11:17:25 +02:00
Maintenancer cf4ae33ca7 New translations language-en.yml (Japanese) (#98)
Thanks to yu-solt
2023-04-15 11:15:24 +02:00
Nassim Jahnke ba8c574e79 Update Folia class check 2023-03-30 08:45:52 +02:00
Nassim Jahnke 225fe4b15a Add preliminary Folia support 2023-03-10 12:53:44 +01:00
Nassim Jahnke de203244c3 Add enable-playercounthovermessage option, don't disable playercount messages when disabling pingmessages 2023-03-08 15:01:12 +01:00
Nassim Jahnke 167065eef5 Update Gradle wrapper and shadow 2023-03-08 15:00:25 +01:00
Maintenancer 25503f6196 New Crowdin updates (#95)
* New translations language-en.yml (Spanish)

* New translations language-en.yml (Polish)

* New translations language-en.yml (Russian)
2023-03-08 14:54:39 +01:00
Nassim Jahnke 23bfe7ef8f Small cleanup 2023-02-25 11:44:13 +01:00
Nassim Jahnke 31e721f443 Fix variable replacement with gradients 2023-02-25 10:42:24 +01:00
Nassim Jahnke 158680e6ca Update Gradle wrapper, dependencies 2023-02-25 10:41:10 +01:00
Nassim Jahnke b6c9c1bd5e Update workflow 2023-02-22 16:36:59 +01:00
Maintenancer 370b9d9eb8 New Crowdin updates (#94) 2023-02-07 13:33:40 +01:00
Nassim Jahnke 339136c1f2 New Crowdin updates (#93) 2023-02-07 13:24:49 +01:00
Nassim Jahnke 4f0e158435 Update README 2023-02-07 13:06:58 +01:00
Nassim Jahnke c6efc58242 New Crowdin updates (#91) 2023-02-07 12:39:00 +01:00
Nassim Jahnke 6aed091356 Update Crowdin configuration file 2023-02-07 12:01:13 +01:00
Nassim Jahnke d343c75eb6 Remove platform specific aliases 2023-02-07 09:24:48 +01:00
Nassim Jahnke 9cbe2597d0 Update download url 2023-01-28 12:06:20 +01:00
Nassim Jahnke 912d094d6d Add Ukrainian translation file (thanks to Mrlucke) 2023-01-01 13:52:19 +01:00
Nassim Jahnke 6d942f87ce Fix Velocity startup
Closes #87
2022-12-19 17:26:35 +01:00
Nassim Jahnke 30380604da Thank you gradle, very cool 2022-12-09 11:20:06 +01:00
Nassim Jahnke f2c07f1fd4 Update Gradle wrapper 2022-12-08 10:36:29 +01:00
Nassim Jahnke 36f14a6b30 Relocate bstats 2022-10-01 13:43:12 +02:00
Nassim Jahnke 871bd0882c Fix the message for cancelling proxied server timers not replacing the server argument 2022-10-01 13:41:28 +02:00
Nassim Jahnke fbc9fc47e2 Update deps, add bstats to Velocity and Sponge modules 2022-09-25 12:18:55 +02:00
Super ccd5eab475 Create language-se.yml (#84) 2022-08-30 15:46:49 +02:00
Nassim Jahnke 5d0fbb310e Add turkish translation file 2022-08-05 09:48:36 +02:00
Nassim Jahnke 09d2e03c0c Fix disabling enable-pingmessages not being respected on Paper servers 2022-04-27 16:40:01 +02:00
Nassim Jahnke 57da60a669 Bump version to 4.0.2-SNAPSHOT 2022-04-27 16:39:48 +02:00
original-codematrix 63dafb05b6 Switch from assert to Assertions class from JUnit (#77) 2022-04-27 16:06:16 +02:00
Nassim Jahnke d8e36d7ff6 4.0.1 Release 2022-04-16 18:40:34 +02:00
Nassim Jahnke 39f966ba5d Update dependencies, actually fix tests 2022-04-15 21:51:29 +02:00
Nassim Jahnke 879f07e3e7 Fix tests 2022-04-15 20:08:13 +02:00
Nassim Jahnke 9cbead310a Fix config header saving 2022-03-23 09:27:43 +01:00
Nassim Jahnke 25375b184d Update workflow 2022-03-23 09:26:53 +01:00
Nassim Jahnke eec5acd0ce Bump version to 4.0.1-SNAPSHOT 2022-03-23 09:20:09 +01:00
Nassim Jahnke 14cef4d53b Fix Sponge metadata replacement 2022-03-17 10:50:56 +01:00
Nassim Jahnke 4d06d0f6b8 4.0.0 Release 2022-03-17 10:07:29 +01:00
Nassim Jahnke 5e22098023 Update adventure, update changelog, fix publishing 2022-03-15 10:44:21 +01:00
Nassim Jahnke 80cc51e48e Update gradle wrapper to 7.4.1 2022-03-09 18:52:43 +01:00
Nassim Jahnke 15ebe045f6 Update language files 2022-03-08 21:47:20 +01:00
Nassim Jahnke be39524717 Minor cleanup 2022-03-08 19:39:36 +01:00
Nassim Jahnke b8616d84c8 Update Gradle wrapper to 7.4, adventure to 4.10.0 2022-03-05 12:14:01 +01:00
Nassim Jahnke 7515d95b82 Merge remote-tracking branch 'origin/dev' into adventure-support
# Conflicts:
#	maintenance-core/src/main/resources/language-de.yml
2022-02-21 09:21:31 +01:00
Ceddix 2c0172d11e fixed spelling issue that caused a message not to work (#75) 2022-02-19 09:32:24 +01:00
Nassim Jahnke 920e3477ee Update default config values 2022-01-19 18:59:21 +01:00
Nassim Jahnke d8e0b6497a Cleanup a bit of language file updating 2022-01-16 19:16:45 +01:00
Nassim Jahnke 113895b564 Fix multiline playercount hover 2022-01-16 16:49:07 +01:00
Nassim Jahnke 99fffb5056 Configurable singleServerMaintenanceListEntry, remove LuckPerm context for now 2022-01-16 15:50:29 +01:00
Nassim Jahnke 3d2aa0ba9c Update language files, update config header 2022-01-16 15:01:04 +01:00
Nassim Jahnke 5486b9542a Update copyright header 2022-01-09 22:31:16 +01:00
Nassim Jahnke 5c2ff9588f Update Sponge module to API v8 2022-01-09 22:27:56 +01:00
Nassim Jahnke 3bcce2dfb9 Fixup dependencies 2022-01-01 14:58:27 +01:00
Nassim Jahnke 0db0d608e5 Improve language updating, add <prefix> placeholder 2021-12-31 16:43:40 +01:00
Nassim Jahnke ae895f4db5 Update workflow 2021-12-28 18:14:43 +01:00
Nassim Jahnke 351d842f3a Major version bump
Convert project to Gradle
Change API class names and split module into two
Add adventure component support
2021-12-28 18:03:34 +01:00
Nassim Jahnke 44dc76f381 WIP LuckPerms contexts 2021-12-28 09:40:29 +01:00
Nassim Jahnke 48792413f7 Update dependencies 2021-12-27 12:12:24 +01:00
Slasherss a81ea8d87d Add polish translations (#73) 2021-12-22 09:45:42 +01:00
Nassim Jahnke ba142a1c31 Update language-es.yml (thanks to Jaximo) 2021-12-07 08:59:31 +01:00
Aurélien f849724a8c Remove extra point (#70) 2021-08-19 22:18:25 +02:00
Aurélien 5e17e60921 Update language-fr.yml (#69) 2021-08-19 22:13:55 +02:00
kennytv fad98d7a14 Update language-pt.yml (thanks to JoaoPinto) 2021-08-18 17:37:25 +02:00
kennytv 31da57c9b2 Bump version to 3.0.8-SNAPSHOT, fix missing scheduletimer keys 2021-08-18 12:54:18 +02:00
Nassim Jahnke c1a03a6733 3.0.7 Release 2021-08-17 12:58:42 +02:00
kennytv 92ab4574e8 Prepare for 3.0.7 Release 2021-08-17 12:57:36 +02:00
kennytv f81851ad9a Update copyright header, readme, and license format 2021-08-12 10:43:10 +02:00
kennytv 6fb153eb9c Remove debug command from help list 2021-08-08 12:54:57 +02:00
kennytv a6e7bfa793 Update workflow and dependencies 2021-08-07 12:37:18 +02:00
kennytv 75656be4f5 Add helpDump to language files 2021-07-23 10:26:44 +02:00
KennyTV f09f95549a Fix Velocity update message, update depend to 3.0.0-SNAPSHOT 2021-05-27 22:25:58 +02:00
KennyTV 78dc87e74a Remove that 2021-05-23 14:23:33 +02:00
KennyTV 3503d02501 Shade mysql connector in Velocity module
Fixes #61
2021-05-22 19:24:38 +02:00
KennyTV f8ea89b0b9 Update ProtocolLib Maven repo 2021-05-10 08:48:02 +02:00
KennyTV d0d672b76b Do offline web lookup in whitelist add on proxies 2021-05-08 09:49:23 +02:00
KennyTV 616d4c7aba Update changelog, update sponge repo url 2021-03-06 18:25:01 +01:00
KennyTV 4415d036a2 Have an extra broadcast key for schedule starts
Closes #58
2021-03-06 16:44:58 +01:00
KennyTV 1f70247c1d Add config options to dispatch commands on maintenance toggle 2021-03-06 16:02:09 +01:00
KennyTV 02ed575e3c Fix inverted if condition 2021-02-18 09:15:33 +01:00
KennyTV 4e005bca17 Add "enable-pingmessages" config option
Closes #57
2021-02-18 09:14:48 +01:00
Aurélien dcf61a4036 Update language-fr.yml (#56) 2021-02-17 10:48:35 +01:00
KennyTV 8e7b80bddf Bump version 3.0.7-SNAPSHOT 2021-02-17 10:47:56 +01:00
KennyTV 16775bda54 Update changelog 2021-02-17 10:30:28 +01:00
Nassim 29d9fa2ec8 3.0.6 Release 2021-02-17 10:25:23 +01:00
KennyTV ef2ce99746 Prepare for 3.0.6 Release 2021-02-17 10:24:56 +01:00
KennyTV aa5437605f Actually fire the MaintenanceReloadedEvent 2021-02-07 11:40:41 +01:00
KennyTV 22e1d53f81 Update copyright header 2021-02-07 11:32:00 +01:00
KennyTV 1359684c72 Add "maintenance schedule" command 2021-02-07 11:30:20 +01:00
KennyTV 22c53bd4ff Add primitive debug mode (only implemented on Bungee) 2020-12-31 12:59:31 +01:00
KennyTV c0e2586684 Hotfix dumps
I will use paste.gg in the future, this is only to make it work at all again
2020-12-31 12:28:24 +01:00
KennyTV 2f095f32ca Also replace online and max variable in the hover message 2020-11-20 22:38:10 +01:00
KennyTV e1e4926f83 Properly register main command with permissions (instead of checking for them in the actual command) 2020-10-26 16:55:37 +01:00
KennyTV 55b5bf2714 Update Velocity API usage 2020-10-26 16:47:07 +01:00
KennyTV 5f8f885530 Update language-es.yml (thanks to Vixo_Ulises) 2020-10-26 16:38:38 +01:00
KennyTV fc40b0230d Rename GH build artifact 2020-10-01 09:40:29 +02:00
Nassim 6fb79d7051 Make artifacts work 😎 2020-08-25 14:55:20 +02:00
KennyTV 7bc522c1d3 Upload artifacts 2020-08-25 14:52:15 +02:00
Nassim 8d0d97c220 Create maven.yml 2020-08-25 14:14:56 +02:00
KennyTV e7c8430909 Fix NPE in null pings 2020-08-22 09:48:21 +02:00
KennyTV 1646d4e417 Update Velocity API usage to 1.1.0-SNAPSHOT 🎉 2020-08-21 20:26:39 +02:00
KennyTV f8384f4f99 Add whitelist add arg to manually add offline uuid+name 2020-08-19 09:44:57 +02:00
KennyTV 4fd6ba33ff Fix linebreaks on Bungee in playercount hovermessage 2020-07-30 12:04:05 +02:00
KennyTV 94c146d0e9 Add MaintenanceReloadedEvent, also fire changed event for unregistered proxy servers 2020-07-29 14:17:49 +02:00
dependabot-preview[bot] c624b18b8e Bump junit-jupiter-engine from 5.6.1 to 5.6.2
Bumps [junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.6.1 to 5.6.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.6.1...r5.6.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-27 18:39:05 +02:00
KennyTV 18a00f9054 Link to dev branch for Travis builds 2020-07-26 12:15:18 +02:00
KennyTV 9778a900a7 Add 'mt' command alias, add some braces 2020-07-26 11:08:25 +02:00
KennyTV 21fa6a3b7f Formatting fix in changelog 2020-07-14 12:10:34 +02:00
KennyTV c7980cbc86 Missing singleserver kick messages should not throw warnings 2020-06-25 11:28:36 +02:00
KennyTV cdb6715744 Implement new methods for dummyprofile 2020-06-25 09:12:24 +02:00
KennyTV d868f069cc Add translators to the individual language files 2020-06-21 09:26:59 +02:00
Aurélien c58b29a78f Fixes for French translation (#42) 2020-06-21 09:19:16 +02:00
KennyTV 5fb4f06f4c Rename method to get server name of player, cleanup config in test 2020-06-18 15:43:39 +02:00
KennyTV 8a3afdd1a8 Version increase to 3.0.6-SNAPSHOT 2020-06-18 15:26:39 +02:00
KennyTV 36e561c413 Sneak a mysql fix in 2020-06-17 14:09:02 +02:00
KennyTV 4739176e9b Update API jar to 3.0.5 2020-06-17 11:26:32 +02:00
Nassim 9546cc7b74 3.0.5 Release 2020-06-17 10:48:13 +02:00
KennyTV 740051dda5 Prepare for 3.0.5 release 2020-06-17 10:47:20 +02:00
KennyTV e53f4f2518 Config test additions 2020-06-17 09:31:49 +02:00
KennyTV 03390d7be9 Config set cleanup 2020-06-16 17:49:45 +02:00
KennyTV 039c5a3d04 Use precondition in api getter util 2020-06-16 16:39:23 +02:00
KennyTV 4360eb03e3 Wrong nullable annotation 2020-06-16 16:20:18 +02:00
KennyTV 89691e8064 Minor code cleanup to version checking 2020-06-16 16:19:20 +02:00
KennyTV 8f4860ad56 Update changelog, bump Guava provided version
Not that it matters, but want to get rid of the security alert
2020-06-16 09:51:25 +02:00
KennyTV b8b231ce78 Remove config updating from 2.x
See 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
2020-06-10 12:51:25 +02:00
KennyTV fd8b47a9f5 Automatically move files to new dir on updating 2020-06-09 19:25:21 +02:00
KennyTV 10c0b5bab3 Update README 2020-06-01 13:21:21 +02:00
KennyTV cece2b5813 Use higher proxy ping listener priority 2020-05-18 22:12:22 +02:00
KennyTV aa9a686b8a Replace newline variable in language file
Note on why this even exists: Yaml will force save all strings containing line breaks in this rather chunky format:
  key: |-
    First line text
     Second line text.
     ...

This also happens to string lists, making those practically unreadable, as well as confusing for most users in general.
Because of this, I replace %NEWLINE% manually, to spare users from these ugly breaks.
2020-05-15 13:38:41 +02:00
KennyTV f29b38989c Add option to set multiple fallback servers 2020-05-12 20:52:47 +02:00
KennyTV ad9c989213 Add secret language option for server specific kick messages
Closes #38
2020-05-12 20:27:59 +02:00
KennyTV f01e96a32a Implement deep get in config 2020-05-12 19:32:42 +02:00
KennyTV e247f4ef10 Remove platform suffix from plugin identifier 2020-04-22 10:59:27 +02:00
KennyTV b8e0f84d54 Don't hide playercount if custom playercount is disabled 2020-04-21 12:00:23 +02:00
KennyTV 424617c602 Respect custom playercount setting in Spigot ping 2020-04-21 08:36:28 +02:00
KennyTV 21ed266d3d Fix use-ssl option inversion 2020-04-13 09:29:22 +02:00
KennyTV a409ec5d66 Update copyright headers 2020-04-10 23:42:06 +02:00
KennyTV 66cba12fd3 Update Russian language file 2020-04-09 08:59:11 +02:00
KennyTV f6d178d8d1 Add placeholder link to readme 2020-04-06 22:34:04 +02:00
KennyTV d04749c835 Add Italian language file 2020-04-03 12:27:00 +02:00
KennyTV eebbc4d532 Fix config loading with multiline strings, add small tests
Fixes #37
2020-03-30 12:48:48 +02:00
KennyTV 335fe303b5 Throw around some nullable annotations 2020-03-30 11:02:35 +02:00
KennyTV 1c4b5e62a4 Add Chinese language file 2020-03-17 15:02:47 +01:00
KennyTV d41fa5ab24 Version increase to 3.0.5-SNAPSHOT 2020-03-17 11:57:12 +01:00
Nassim 7fd486ef40 3.0.4 Release 2020-03-17 11:01:41 +01:00
KennyTV d0b10f2524 Prepare for 3.0.4 release 2020-03-17 11:00:55 +01:00
KennyTV 865df5e20a Rearrange new language entries 2020-03-16 15:49:09 +01:00
KennyTV 469e8eb57b Fix join notifications with waiting servers enabled 2020-03-16 15:48:27 +01:00
KennyTV 368ac37099 Add waiting-server option for global proxy maintenance
Includes some other, minor fixes
Some proxy modules cleanup
2020-03-16 15:17:09 +01:00
KennyTV 0db4d77c10 Update missing pt messages (by JoaoPinto) 2020-03-16 11:16:46 +01:00
Max Kade ca4c711103 Fix single server timer accepting number as seconds and not minutes (#35) 2020-03-11 14:35:56 +01:00
KennyTV f4a5f288ca Fix singleserver timers broadcasting globally 2020-02-14 21:40:08 +01:00
KennyTV 0a37bfdefe Update bStats metrics 2020-02-12 17:20:37 +01:00
KennyTV 3a30dba011 Add option to disable sql ssl 2020-02-09 12:47:28 +01:00
KennyTV 111a229d48 Minor beauty changes 2020-01-29 15:11:01 +01:00
KennyTV 7e948fbe52 Forgot the return 2019-11-21 09:46:51 +01:00
KennyTV 355aa20244 Add Russian language file (thanks to En_0t_S) 2019-11-21 09:44:23 +01:00
KennyTV 6bc54d1812 Don't throw errors when failing the language update check because of custom langs 2019-11-21 09:41:42 +01:00
KennyTV 0042ce3ccd Version increase to 3.0.4-SNAPSHOT 2019-11-21 09:27:32 +01:00
KennyTV beb0e52371 Forgot to update the date in the changelog 2019-09-17 09:05:53 +02:00
Nassim 4774ec2f2a 3.0.3 Release 2019-09-17 09:02:27 +02:00
KennyTV 34115f443e Version increase to 3.0.3 2019-09-17 08:29:23 +02:00
KennyTV c8f0c1699e Update changelog, fix small oversight in the Bungee serverconnect 2019-09-13 10:30:53 +02:00
KennyTV f22be77023 Fix playercountmessage on Paper servers with Via 2019-09-09 08:35:53 +02:00
KennyTV 730a8dbeea Remove some old code 2019-08-24 18:55:30 +02:00
KennyTV 0548e0c447 Replace some streams with loops.. because why not
Not really that much of an improvement, but gotta strike those micro optimizations 🤷
2019-08-18 10:18:58 +02:00
KennyTV da0a757c5e Revert "Fix potential config deserialization error"
This reverts commit ac19bac1
2019-08-13 22:33:31 +02:00
KennyTV ac19bac11c Fix potential config deserialization error 2019-08-13 22:21:30 +02:00
KennyTV 1de926bb28 Minor pom changes 2019-08-13 22:21:11 +02:00
KennyTV 94308cde7c Fix some redundant config comment checks 2019-07-26 13:20:27 +02:00
KennyTV d863c709e1 Update bStats metrics 2019-07-26 12:29:34 +02:00
KennyTV 741914283a Minor config optimizations and cleanup 2019-07-22 09:28:53 +02:00
KennyTV 64902d90ff Language autoupdater, fix updating with broken texts 2019-07-21 15:49:10 +02:00
KennyTV d3b4c7c87b Add warning with PS 2019-07-20 09:58:00 +02:00
KennyTV 390b65a70e Add warning with PS 2019-07-20 09:49:00 +02:00
KennyTV 7cff908aae Switch to ProtocolLib/Spigot ping listener if PS is installed 2019-07-20 09:46:28 +02:00
KennyTV d1f049c3e5 Add help page header to language file 2019-06-28 21:43:27 +02:00
Nassim 8d552dbe33 Remove a space in language-es.yml 2019-06-27 10:34:36 +02:00
KennyTV d3a933d21d Add bypass permission for specific proxied servers 2019-06-27 10:05:57 +02:00
KennyTV a4d87dabf5 Update changelog 2019-06-09 09:53:04 +02:00
KennyTV c3b579e86c Update Spanish language (thanks to Vixo_Ulises) 2019-06-09 09:51:04 +02:00
KennyTV b75d2337df Update French language (thanks to Zendrique) 2019-05-31 21:26:58 +02:00
KennyTV b3e83c5c2e Language changes 2019-05-31 16:26:16 +02:00
KennyTV b6f447aded Update travis.yml 2019-05-31 15:45:35 +02:00
KennyTV 9febdfc140 Update travis.yml 2019-05-31 15:38:06 +02:00
KennyTV 90bc30d701 I'm a dumbo 2019-05-31 15:31:10 +02:00
KennyTV 843ba4ac86 Add help messages to language files 2019-05-31 15:30:03 +02:00
KennyTV 032fd7d582 Fix double messages in some server connections 2019-05-24 09:14:51 +02:00
KennyTV 9a0f680177 Kick connecting players before the connection succeeded, fix double join-notification (Bungee) 2019-05-23 22:18:05 +02:00
KennyTV 415d5f3807 Update config version 2019-05-20 15:28:06 +02:00
KennyTV 33c96de5fb Add option to not kick online players 2019-05-18 17:23:56 +02:00
KennyTV d141b40190 Version increase to 3.0.3-SNAPSHOT 2019-05-18 17:16:37 +02:00
KennyTV 77e1444dba 3.0.2 Release 2019-05-17 09:35:34 +02:00
KennyTV 915b43d897 👀 2019-05-17 09:35:14 +02:00
KennyTV adc06e3486 Update changelog 2019-05-17 09:31:17 +02:00
KennyTV cc7f5c2d11 Version increase to 3.0.2 2019-05-17 09:25:57 +02:00
KennyTV 0bb54ffc5d Finish timerspecific pingmessages 2019-05-17 09:21:35 +02:00
KennyTV 15ee2e6074 Update changelog, resort some config entries 2019-05-14 13:48:28 +02:00
KennyTV 89abab36f8 Timerspecific pingmessages 2019-05-14 09:07:23 +02:00
KennyTV e0bb1336b0 ‍Make setmotd command also set timerspecific messages 2019-05-13 22:53:04 +02:00
KennyTV 888ffd301a 🤦‍ 2019-05-13 15:30:40 +02:00
KennyTV 3a55dd3280 Make motd command display timerspecific ones 2019-05-13 15:30:00 +02:00
KennyTV 61c47ba2fa WIP: Timerspecific pingmessages 2019-05-13 11:02:13 +02:00
KennyTV b97e69a71f Make dumps prettier 2019-05-09 22:30:18 +02:00
KennyTV 75c940d089 Fix Sponge 8.0.0 compatibility 2019-05-09 21:53:30 +02:00
KennyTV 849fa2a720 Update to latest Velocity text api 2019-05-07 09:09:58 +02:00
KennyTV 7e249faa99 Update README.md 2019-04-27 15:34:07 +02:00
KennyTV c8272b39d5 Fix Velocity autoupdater 2019-04-17 15:38:51 +02:00
KennyTV b3c561ae26 Version increase to 3.0.2-SNAPSHOT 2019-04-17 15:38:33 +02:00
KennyTV af24c5a331 Update api, changelog and readme for latest release 2019-04-17 15:24:51 +02:00
KennyTV 4cc162f00d Merge pull request #29 from KennyTV/dev
3.0.1 Release
2019-04-17 14:38:55 +02:00
KennyTV 02610fd904 Version increase to 3.0.1 2019-04-17 14:36:56 +02:00
KennyTV bccd1bb936 Remove interface check 2019-04-17 14:36:47 +02:00
KennyTV c08dd5d430 Set group id to eu.kennytv.maintenance 2019-04-15 10:54:16 +02:00
KennyTV 1104a50882 Fix another potential error on startup 2019-04-14 13:07:01 +02:00
KennyTV 56898d7b40 Database sync fixes, adjustments to endtimer saving 2019-04-05 14:05:01 +02:00
KennyTV 4be31a6dd4 Update README 2019-04-05 14:04:45 +02:00
KennyTV 190a063d49 Add config updater + endtimer saving after restart 2019-04-03 14:22:06 +02:00
KennyTV 6e4591d45b Fix error printing in some cases, close hikari source on disable(/reload) 2019-04-03 11:15:30 +02:00
KennyTV 86c556e841 Hackily fix slf4j relocation and shorten jar sizes 2019-03-19 22:35:13 +01:00
KennyTV 404e14ee94 Revert "Only compile SnakeYaml in universal and Velocity file"
This reverts commit b8c0e3a7
2019-03-19 18:07:18 +01:00
KennyTV b8c0e3a799 Only compile SnakeYaml in universal and Velocity file 2019-03-19 18:04:05 +01:00
KennyTV 10d798acd4 Make ServerInfoPacketListener extend PacketAdapter instead of creating anonymous class 2019-03-19 17:04:08 +01:00
KennyTV be057f4b3b Don't register listener twice 2019-03-13 17:17:31 +01:00
KennyTV eea7a595c9 Add Ore url to plugin info 2019-03-13 10:21:29 +01:00
KennyTV bf4bf79b23 Readd update checking on Sponge, still disallow execution of update 2019-03-13 10:04:16 +01:00
KennyTV 686535228e Typo 👀 2019-03-11 13:24:33 +01:00
KennyTV 8b645b6f79 Fix Paper pinglistener and remove old code 2019-03-11 13:22:15 +01:00
KennyTV 4d97293a8c Rename dump variable 2019-03-11 13:00:43 +01:00
KennyTV c746a83f5f Use PaperServerListPingEvent if applicable 2019-03-11 12:48:10 +01:00
KennyTV eb7e6e3f0b Fix exception on ping that does not come from status packet 2019-03-10 19:08:08 +01:00
KennyTV f5ce41853f nooooo 2019-03-08 21:29:28 +01:00
KennyTV e67cde591c Try to please the beautiful people over at Ore (Sponge), attempt no 2 2019-03-08 21:28:35 +01:00
KennyTV 39682635c6 Try to please the beautiful people over at Ore (Sponge) 2019-03-08 21:18:21 +01:00
KennyTV efee532742 Make endtimer display format adjustable 2019-03-05 16:55:56 +01:00
KennyTV 0aee3a8fd6 Remove bStats from Sponge module
(Their beautiful repo is down and I don't really need it on Sponge anyways 🤔)
2019-02-21 17:22:29 +01:00
KennyTV f79b6caccb Minor maintenance event changes 2019-02-21 16:43:13 +01:00
KennyTV 73fd80b456 Some language changes 2019-02-21 15:35:52 +01:00
KennyTV ad1a7eb420 Make createFile method public 2019-02-19 17:30:58 +01:00
KennyTV bfa9b52497 Add api method to get a list of maintenance servers 2019-02-19 13:25:13 +01:00
KennyTV ff4b5b0d2e Custom maintenance events 2019-02-19 13:08:38 +01:00
KennyTV b8e73062fa Some language changes 2019-02-19 11:28:24 +01:00
KennyTV 863a9b3beb Version increase to 3.0.1-SNAPSHOT 2019-02-19 00:16:24 +01:00
KennyTV fe64936ddf Sneak Spanish language in 👀 2019-02-17 10:16:36 +01:00
KennyTV 0c524b227a 3.0 Release 2019-02-17 09:22:12 +01:00
KennyTV 35deabf5a3 Version increase to 3.0 2019-02-17 09:21:51 +01:00
KennyTV 694cbb729f Update README 2019-02-15 11:16:14 +01:00
KennyTV 57047c519e Some last refactoring/fixes 2019-02-14 10:25:52 +01:00
KennyTV fc8018c530 Fix velocity update/dump messages 2019-02-12 19:12:27 +01:00
KennyTV 73707e2c3a Merge remote-tracking branch 'origin/v3' into v3 2019-02-12 13:30:12 +01:00
KennyTV ac92851e3d Minor refactoring and message changes 2019-02-12 13:30:01 +01:00
KennyTV 4e29a98a32 Merge pull request #25 from PSandro/patch
Patch
2019-02-12 10:06:47 +01:00
Sandro Pischinger 54d1c90795 fix typo "seperator" 2019-02-11 22:32:29 +01:00
Sandro Pischinger 6780914550 fix typo 'Intervalls' 2019-02-11 21:09:54 +01:00
KennyTV 5ab5d11aed Some message changes 2019-02-11 15:01:11 +01:00
KennyTV 94378ca1fa SLP actually has a repo 👀 2019-02-11 10:35:36 +01:00
KennyTV 4c0c425ba0 Fix 2019-02-11 08:50:04 +01:00
KennyTV efea58e665 Rename status perm 2019-02-10 11:55:35 +01:00
KennyTV e15a7dd0ed Let maintenance servers be removed, even if they don't exist on the proxy 2019-02-10 11:17:07 +01:00
KennyTV 2f327b9ce9 whoops 2019-02-09 16:12:02 +01:00
KennyTV 38d0f9de6d Rename some perms 2019-02-09 15:37:21 +01:00
KennyTV 75f7330cc3 Use maintenance.dump perm for dumpcommand 2019-02-09 15:21:37 +01:00
KennyTV 25bf7a3747 Update changelog 2019-02-09 15:02:53 +01:00
KennyTV f8f0a23ede Update README 2019-02-09 12:41:45 +01:00
KennyTV b4d7ed59de Fix update messages in Sponge and Velocity 2019-02-08 17:24:52 +01:00
KennyTV f64d07c1e8 Update README 2019-02-08 15:09:40 +01:00
KennyTV 4dc31a4635 Add beautiful changelog file 2019-02-08 15:03:22 +01:00
KennyTV cb243e1c04 whoops 2019-02-08 11:48:54 +01:00
KennyTV bb5bdfe0c7 Some fixes and changes to subcommand system 2019-02-08 11:46:24 +01:00
KennyTV be144df5de Make subcommand system to finally have that 💩 readable again
* Though it adds 100kb lolz
2019-02-07 19:02:45 +01:00
KennyTV a6f68810fc Add option to disable update checks 2019-02-07 13:30:11 +01:00
KennyTV 3ac01c9f1b Maybe hopefully get rid of the sl4j problem garbage? 2019-02-07 12:48:43 +01:00
KennyTV c9d496e251 Final fixes! (hopefully 👀) 2019-02-07 12:12:06 +01:00
KennyTV be31fdeb0a Config comment change 2019-02-07 11:50:25 +01:00
KennyTV 1ced445742 Move fields from SpigotServers file to config (+ automigration) 2019-02-07 11:43:28 +01:00
KennyTV e52fffbe75 Fixes! 2019-02-07 11:15:18 +01:00
KennyTV 25b4cfe3f2 slf4j sad 2019-02-07 10:45:16 +01:00
KennyTV bc8453a96e Fixes to fallback handling 2019-02-07 10:37:55 +01:00
KennyTV 0379b0c62c Fix error when connecting to fallbackserver 2019-02-07 10:33:34 +01:00
KennyTV cdf34b76b8 Fix typo 2019-02-07 10:25:37 +01:00
KennyTV d3cc9eb989 Do version check on startup async 2019-02-06 13:55:24 +01:00
KennyTV 3048483b0c Rename MaintenanceModePlugin to MaintenancePlugin 2019-02-04 17:09:04 +01:00
KennyTV f16a5800e5 Minor change 2019-02-04 15:39:46 +01:00
KennyTV 672f1f0ff3 Always check for maintenance.admin perm as well 2019-02-04 15:22:36 +01:00
KennyTV a3ddfbefe3 Add some aliases 2019-02-04 10:04:55 +01:00
KennyTV e548a9a94b Fix typo 2019-02-03 17:48:37 +01:00
KennyTV 80d3069ffb Fixes, dump changes 2019-02-03 15:06:55 +01:00
KennyTV fad9824e4d Actually, noone likes hastebin 2019-02-03 14:24:44 +01:00
KennyTV 2bb7e3023d One might say dumping a database's password isn't nice 🤔 2019-02-03 14:03:43 +01:00
KennyTV 105f76d8f4 Changes to config + small help fix 2019-02-03 13:29:51 +01:00
KennyTV 8e7874b691 Auto config migration + fixes 2019-02-02 20:10:49 +01:00
KennyTV 710a69543a Beautiful new config system (💛 PSandro) 2019-02-02 15:18:22 +01:00
KennyTV 8b180342d0 Do update checks async 2019-02-01 13:23:25 +01:00
KennyTV 1a62c596cb Dump command response changes 2019-02-01 11:40:27 +01:00
KennyTV 2b8e2c90c3 Fixes + dump command 2019-02-01 11:21:38 +01:00
KennyTV dcb9c97d0a Update issue template 2019-02-01 10:26:20 +01:00
KennyTV 74ed8783a8 Merge pull request #24 from KennyTV/issue-template
Update issue templates
2019-02-01 10:24:41 +01:00
KennyTV 0d07e6aed3 Update issue templates 2019-02-01 10:24:05 +01:00
KennyTV 49fa7a6ff7 Delete old issue template 2019-02-01 10:23:09 +01:00
KennyTV f40df14d03 Merge pull request #23 from PSandro/patch-1
fix typo
2019-02-01 10:20:03 +01:00
Sandro 6bc63e3fde fix typo 2019-01-31 21:59:43 +01:00
KennyTV c0b6e8ff40 Minor change 2019-01-31 20:27:55 +01:00
KennyTV 0a4a1ce0cf Whoops 2019-01-31 10:43:53 +01:00
KennyTV 35fd75aebb Minor refactoring 2019-01-31 10:42:37 +01:00
KennyTV 59e8dc057a Minor refactoring 2019-01-31 10:36:55 +01:00
KennyTV 91cd767dd7 Load maintenance-icon from plugin folder, not server directory
Some minor refactoring
2019-01-30 15:12:51 +01:00
KennyTV 57ca1ff88c Fix database value loading 2019-01-30 14:23:46 +01:00
KennyTV 15dd00fdcc Velocity should be done (theoretically 🤔) 2019-01-29 10:33:42 +01:00
KennyTV 10b14de218 Fixes to Velocity and Sponge 2019-01-28 22:13:47 +01:00
KennyTV 66899564e8 Update README 2019-01-28 20:30:20 +01:00
KennyTV 6e8d8319f7 Merge remote-tracking branch 'origin/v3' into v3 2019-01-28 20:24:59 +01:00
KennyTV 3ad8be9d3e Update API jar 2019-01-28 20:24:41 +01:00
KennyTV b7c175060d Merge pull request #22 from PSandro/fix-script
Fix script
2019-01-28 18:15:17 +01:00
KennyTV ba6043e654 Update README 2019-01-28 18:11:01 +01:00
Sandro 4bfd3339a2 run install script with skip-input arg on travis 2019-01-28 18:03:36 +01:00
Sandro c03d8d45e0 add skip-input arg 2019-01-28 18:03:36 +01:00
KennyTV b150db8047 Update README 2019-01-28 17:59:28 +01:00
KennyTV 197ff4f813 Update README 2019-01-28 17:52:42 +01:00
KennyTV fc6a5f8747 travis integration 2019-01-28 16:27:41 +01:00
KennyTV a4a37b39e5 Travis very sad :(( 2019-01-28 16:18:31 +01:00
KennyTV b057b88e26 Travis sad :( 2019-01-28 16:15:24 +01:00
KennyTV 2dd383a640 Test Travis integration 2019-01-28 16:12:32 +01:00
KennyTV d6526ae64e Some refactoring 2019-01-28 15:35:42 +01:00
KennyTV 8be8b831ba Add Maintenance-API.jar to ignored 2019-01-28 14:29:36 +01:00
KennyTV ff1ded1fda Actually get offline Sponge user 2019-01-26 20:59:40 +01:00
KennyTV bcc77cf3e0 Listen to global reload event 2019-01-26 13:29:26 +01:00
KennyTV 4213d0824f Merge branch 'master' of https://github.com/KennyTV/Maintenance into v3 2019-01-26 12:45:38 +01:00
KennyTV 729722259a Fix colors in messages in Sponge 2019-01-26 12:37:54 +01:00
KennyTV 6c408d823a Merge branch dev into master 2019-01-26 11:16:12 +01:00
KennyTV 9b7ec9d8bf Velocity startup fix 2019-01-25 15:39:08 +01:00
KennyTV 3cce54a62d Final touches to Sponge 2019-01-25 15:16:52 +01:00
KennyTV 40119254a7 Properly do the uuid remove thingy 2019-01-25 13:44:56 +01:00
KennyTV 4b33e69d11 Command to remove whitelisted players via their uuid... except on Bungee ;( 2019-01-25 13:15:00 +01:00
KennyTV 90d08d651e Velocity command 2019-01-25 12:35:54 +01:00
KennyTV 11b73a05c8 Start velocity
Some refactoring and minor improvements
2019-01-24 21:05:42 +01:00
KennyTV b68c8dd0d8 Use proper id when getting api instance 2019-01-23 17:10:29 +01:00
KennyTV 8933caa51f Single jars now work on their own as well
Minor cleanup
2019-01-23 16:18:59 +01:00
KennyTV e82b1f760a Create CONTRIBUTING.md
Create CONTRIBUTING.md
2019-01-23 10:50:41 +01:00
KennyTV dc97079967 Create CONTRIBUTING.md 2019-01-22 22:46:57 +01:00
KennyTV 2e44decaa9 That was a space 2019-01-22 22:32:21 +01:00
KennyTV 244f7efe21 Remove licence notice 2019-01-22 22:31:43 +01:00
KennyTV d299db678d It works! 2019-01-22 18:07:58 +01:00
KennyTV 0e558af1f1 Add copyright notice for funzees 2019-01-22 13:52:14 +01:00
KennyTV a6cd5978e3 Use YamlConfig (of Bungee) in every module
Fix tabcompletion on Bungee
Even if set to 0, make database calls 'only' every 500 milliseconds

Note that the configuration stuff might completely change again
2019-01-22 13:48:06 +01:00
KennyTV 24c893bb1d Small message change + merge dev 2019-01-21 14:54:46 +01:00
KennyTV 8a80446c8c Merge branch 'dev' of https://github.com/KennyTV/Maintenance into 3.0 2019-01-21 14:51:17 +01:00
KennyTV a88cc02f9a Fix NPE 2019-01-21 14:46:31 +01:00
KennyTV df442063ea Don't create a random UUIDs on each ping (to test) 2019-01-21 14:36:24 +01:00
KennyTV 40c49ba3ee Tabcompletion 2019-01-18 15:19:26 +01:00
KennyTV 9135f817d1 Add a small but nice warning 2019-01-17 12:04:55 +01:00
KennyTV 07fc9894b1 Remove slp reference from main class 2019-01-15 16:17:55 +01:00
KennyTV 930612b5bb nevermind still dumb i guess i think maybe 2019-01-14 18:23:11 +01:00
KennyTV 29a87c831a Scheduler fix 2019-01-14 15:25:51 +01:00
KennyTV 722340140a Some minor additions/changes 2019-01-14 15:11:54 +01:00
KennyTV 96d4834f83 ... because I'm an idiot, obviously 2019-01-14 14:48:47 +01:00
KennyTV 308b42948a Small message fix 2019-01-14 14:36:35 +01:00
KennyTV 8e304bb09d Javadoc 2019-01-14 14:32:07 +01:00
KennyTV 7f2c23e69e Refactoring and more Sponge stuff 2019-01-14 14:27:26 +01:00
KennyTV 1d68c4fee0 Refactoring 2019-01-13 20:05:48 +01:00
KennyTV 3d808ea718 Some ground work for the Sponge part 2019-01-13 15:47:11 +01:00
KennyTV 79f1933b9a Version increase to 3.0-SNAPSHOT 2019-01-13 12:14:07 +01:00
KennyTV 4089e75f2d Merge remote-tracking branch 'origin/master' into dev 2019-01-13 12:12:53 +01:00
KennyTV a2d4e12ca6 Write plugin name without variable 2019-01-11 15:17:49 +01:00
KennyTV 72e5d596fc Set build name again 2019-01-11 15:14:45 +01:00
KennyTV 4f2dea5036 Improve updater methods 2019-01-11 15:08:11 +01:00
KennyTV 915dc25284 Update README 2019-01-11 15:04:32 +01:00
KennyTV 13e4468e93 Merge pull request #17 from PSandro/maven-clean-clean
More maven cleanup
2019-01-09 21:29:14 +01:00
Sandro ca23f0d546 change parent.version to project.parent.version 2019-01-09 21:18:04 +01:00
Sandro 53c450170a rename directories to fit maven module name 2019-01-09 21:17:15 +01:00
Sandro 348521cc3e remove custom module names 2019-01-09 21:15:48 +01:00
Sandro f4ce887d24 add script -> install ServerListPlus to local repository 2019-01-09 21:15:21 +01:00
KennyTV 5e176dc10e Some minor refactoring 2019-01-07 20:28:12 +01:00
KennyTV 00cd9a8bb1 Minor change 2019-01-04 11:04:05 +01:00
KennyTV 0166aeadb2 Minor improvement 2018-12-29 21:41:06 +01:00
KennyTV 864c22c3ed Update README 2018-12-28 19:49:07 +01:00
KennyTV 910b88d663 Fix a typo 2018-12-26 12:16:38 +01:00
KennyTV 4a56c28a0d Improve isNumeric method 2018-12-21 18:07:30 +01:00
KennyTV 1c13465bf4 Some javadoc changes 2018-12-21 15:00:14 +01:00
KennyTV f4d46f03aa Pom clean up 2018-12-21 14:43:53 +01:00
KennyTV 5b3e3ef179 Set api version in plugin.yml 2018-12-19 10:28:51 +01:00
KennyTV 392b12e592 Version increase to 2.5.3-SNAPSHOT 2018-12-19 10:21:38 +01:00
KennyTV e99f7772e6 Language fix 2018-12-17 18:26:07 +01:00
KennyTV 54d20e9e50 2.5.2 Release 2018-12-17 10:10:56 +01:00
KennyTV fd0e361474 Version increase to 2.5.2 2018-12-16 18:16:28 +01:00
KennyTV 551e38f882 Small fix, whoopsie? 2018-12-16 18:14:32 +01:00
KennyTV d18f04c010 Added last Portuguese messages 2018-12-16 18:06:23 +01:00
KennyTV 3b7f3043f1 Add Portuguese translations 2018-12-12 10:41:23 +01:00
KennyTV faf2a8d083 Kick non permitted players when detecting server change from MySQL 2018-12-10 19:33:55 +01:00
KennyTV 42071e3bad Fix maintenance value with MySQL enabled not loading until the first ping 2018-12-10 19:20:06 +01:00
KennyTV 978d32e947 Make experimental MySQL stuff not so experimental anymore 2018-12-09 10:49:06 +01:00
KennyTV fe670cb3e2 Fix maintenance icon for 1.13+ servers 2018-12-08 18:39:40 +01:00
KennyTV d2f4a7d9a5 Experimental single server database stuff 2018-12-06 17:38:57 +01:00
KennyTV b162ce1825 pom 2018-12-06 11:58:20 +01:00
KennyTV fbdcce3c3b pom 2018-12-06 11:57:34 +01:00
KennyTV 2d939f095c Experimental single server database stuff 2018-12-06 11:47:43 +01:00
KennyTV 034e2f2b98 Change config header 2018-12-06 10:37:59 +01:00
KennyTV f429ab0a60 Remove some more unnecessary reloads 2018-12-06 10:32:08 +01:00
KennyTV 5578d0879b Properly fix the last thingy 2018-12-06 10:22:02 +01:00
KennyTV 8b1e6244ea Fix 2018-12-05 07:03:26 +01:00
KennyTV 49c7b9c775 Don't reload files when toggling maintenance
Update bStats, optimize it a bit... and fix it forgetting some config values, I guess 🤔
2018-12-03 16:58:05 +01:00
KennyTV da1c724464 Add debug mode 2018-11-25 16:47:58 +01:00
KennyTV de15150a04 Minor message change 2018-11-25 16:35:09 +01:00
KennyTV 0d1fb2b260 More french translations, thanks to Spigot user Zendrique 2018-11-23 19:58:17 +01:00
KennyTV 55d0779a33 Some tweaks to messages 2018-11-23 18:39:59 +01:00
KennyTV 8f41d464e1 Partially include french translations!
Thanks to Spigot user Zendrique
Still relies on 2.4 format, so some messages are missing and unsorted
2018-11-23 13:34:07 +01:00
KennyTV 1db2b6c934 Version increase to 2.5.2-SNAPSHOT 2018-11-20 15:56:35 +01:00
KennyTV aa58f76057 Hotfix 2.5.1 2018-11-17 16:57:11 +01:00
KennyTV 1def0a1061 File loading fix 2018-11-17 16:55:17 +01:00
KennyTV 3b4a66b04e 2.5 Release 2018-11-17 11:46:04 +01:00
KennyTV 7384b2e55c 2.5 API 2018-11-17 11:44:28 +01:00
KennyTV f8eaed445a Version increase to 2.5 2018-11-17 11:43:43 +01:00
KennyTV dfef9190ca Some final fixes and changes 2018-11-17 11:41:51 +01:00
KennyTV 7ce61834c2 Check for other kick reasons 2018-11-16 22:23:58 +01:00
KennyTV 240a7ab242 Message changes 2018-11-16 22:08:35 +01:00
KennyTV b3de59bfba API change 2018-11-10 22:08:29 +01:00
KennyTV 5d5de39845 Make the help message a little fancier 2018-11-10 17:38:41 +01:00
KennyTV 59af774d09 Some more fixes 2018-11-10 16:50:10 +01:00
KennyTV 18828207c0 Maintenance status command + some more minor changes 2018-11-10 15:08:32 +01:00
KennyTV 5c67922996 Some fixes and changes 2018-11-09 23:20:34 +01:00
KennyTV af50a45e65 Command 2018-11-09 21:14:32 +01:00
KennyTV 7ccd265a30 pom changes 2018-11-07 21:36:29 +01:00
KennyTV e76f22f071 Timer commands for single server maintenance 2018-11-07 21:32:08 +01:00
KennyTV 3c03b719d2 API changes 2018-11-07 21:31:49 +01:00
KennyTV cd71531766 Timers for single server maintenance
Todo: Implementation in command
2018-11-07 20:02:59 +01:00
KennyTV 282c116d02 Some improvements to messages and message handling 2018-11-06 11:01:04 +01:00
KennyTV 820171916b Improve version check handling 2018-11-05 23:02:46 +01:00
KennyTV 136fbb0ba8 Improve version check handling 2018-11-05 22:58:12 +01:00
KennyTV 4f0c05c357 Further single server maintenance stuff 2018-11-05 21:24:56 +01:00
KennyTV 0377838a26 Dont save and get Spigot maintenance servers from sql for now 2018-11-04 14:43:47 +01:00
KennyTV b72ff1b772 Some message changes 2018-10-19 14:21:21 +02:00
KennyTV 287488f1b6 Some single server maintenance stuff I did during a course at university ¯\_(ツ)_/¯ 2018-10-19 12:08:37 +02:00
KennyTV 9ffb67db1f WIP: Add possibility to set single servers to maintenance 2018-10-12 23:17:46 +02:00
KennyTV a563c0a8a8 Restructured language files 2018-10-02 12:15:08 +02:00
KennyTV 234086444f WIP: Add possibility to set single servers to maintenance 2018-10-02 11:56:30 +02:00
KennyTV a93b0834a2 Remove more or less deprecated Guava usages 2018-09-30 11:29:48 +02:00
KennyTV b5550dfe82 Add multiple language support 2018-09-28 13:22:55 +02:00
KennyTV d99300ecac Version increase to 2.5-SNAPSHOT
Increase from 2.4.1-SNAPSHOT as bigger feature updates are planned
2018-09-28 12:42:06 +02:00
KennyTV 1c0688a172 Add language-de 2018-09-28 12:00:40 +02:00
KennyTV ff3b117189 Make SenderInfo an interface instead of an abstract class 2018-09-27 10:14:29 +02:00
KennyTV aaed1b32cd Fix starttimer command not working
Remove slf4j shade for now
2018-09-27 09:57:56 +02:00
KennyTV 38c8e1d2c3 Shade slf4j to fix compatibility with plugins using older Hikari dependencies 2018-09-26 11:11:56 +02:00
KennyTV 1e1792d132 Version increase to 2.4.1-SNAPSHOT
Update ProtocolLib dependency to newest release
2018-09-22 19:20:55 +02:00
KennyTV b29462a5cb 2.4 Release 2018-09-17 10:21:17 +02:00
KennyTV c9161ebe24 2.4 Release API 2018-09-17 10:17:44 +02:00
KennyTV 8441c6a8bf Prepare for 2.4 Release 2018-09-17 10:16:23 +02:00
KennyTV 72c2ba77ee Some final fixes and changes
Move kickmessage back to config
2018-09-16 22:36:12 +02:00
KennyTV a097790b76 Update dependencies 2018-09-13 10:43:09 +02:00
KennyTV b7129e8aa8 Fix raw color saving in config when upgrading from a version lower than 2.3 2018-09-08 12:29:10 +02:00
KennyTV ab9c2b8be1 Spigot Runnable fix 2018-09-08 12:13:47 +02:00
KennyTV a9a37b8fc8 Fix Bungee config not updating 2018-09-08 12:00:21 +02:00
KennyTV d50cb67a26 Add timer variable for the pingmessage
Have broadcasts for timers be set for seconds instead of just minutes + better formatting
Some language fixes
2018-09-07 22:52:20 +02:00
KennyTV 5e42500308 WIP: Add timer variable for the pingmessage
WIP: Have broadcasts for timers be set for seconds instead of just minutes + better formatting
2018-08-29 00:42:00 +02:00
KennyTV 50997a847f Language fixes and changes 2018-08-26 17:56:31 +02:00
KennyTV 2305d85c01 Switch messages to language file + small fixes 2018-08-26 12:34:28 +02:00
KennyTV 33bbc35d88 Change javadoc message to read the new config field 2018-08-26 11:50:08 +02:00
KennyTV 28b3e100fb Switch some more messages to language file 2018-08-26 11:49:13 +02:00
KennyTV edae2d699b Switch some messages to language file 2018-08-25 12:37:23 +02:00
KennyTV 0cc477a769 Prepare new language file 2018-08-25 12:19:01 +02:00
KennyTV 53b84a999f Change helpmessage 2018-08-25 11:41:33 +02:00
KennyTV 49487c11ff Don't enable/disable maintenance mode if it's already in the goal's state 2018-08-25 11:39:49 +02:00
KennyTV 0c4070b7a7 Add possibility to show the default playercount 2018-08-22 20:11:24 +02:00
KennyTV 67909a4862 Relocate HikariCP dependency 2018-08-22 19:08:20 +02:00
KennyTV 28ee563083 Don't spam update notifications on every single join
Also, minor cleanup #3
2018-08-21 21:05:48 +02:00
KennyTV 28b2b528c1 Minor cleanup #2 2018-08-21 21:01:12 +02:00
KennyTV a53d9d0850 Minor cleanup 2018-08-21 20:58:59 +02:00
KennyTV 873a8812aa Add variables to show normal playercount 2018-08-21 20:53:15 +02:00
KennyTV 19ebc90963 Whoops 2018-08-17 12:37:49 +02:00
KennyTV dfbd1381de Version increase to 2.4-SNAPSHOT 2018-08-17 12:36:08 +02:00
KennyTV c9fe48a067 2.3.1 Release
Hotfix before the release
2018-08-17 12:30:01 +02:00
KennyTV 49b022b665 Quick hotfix for the 2.3.1 Release
When enabling maintenance on one proxy with MySQL enabled, the other ones will now also kick all non permitted players and switch their ServerListPlus state
2018-08-17 11:29:28 +02:00
KennyTV 86be23ae5f Minor changes 2018-08-16 19:05:44 +02:00
KennyTV 420412978e 2.3.1 Release 2018-08-16 17:56:28 +02:00
KennyTV 25e2f4dae2 2.3.1 Release 2018-08-16 17:54:57 +02:00
KennyTV d767be96b5 Fix 2018-08-15 11:54:35 +02:00
KennyTV 6d73acca9b Only check the mysql delay if it's at least a second 2018-08-15 11:11:25 +02:00
KennyTV 1f116374ad Fix permission checks for help page 2018-08-11 11:10:25 +02:00
KennyTV d0b7d96208 Fix updated config being overwritten again 2018-08-08 11:56:32 +02:00
KennyTV 16285d7064 Change some javadocs 2018-08-07 23:31:02 +02:00
KennyTV 1f27084fe1 Return empty string for pingmessages if config list is empty 2018-08-07 23:04:09 +02:00
KennyTV 261aace0db Remove unnecessary (second) result closing 2018-08-07 22:58:06 +02:00
KennyTV 344b910214 Remove unused method 2018-08-07 22:49:22 +02:00
KennyTV fbaa4896e1 Replace deprecated ProtocolLib packet 2018-08-07 14:55:19 +02:00
KennyTV 2f93064f60 Some pom changes 2018-08-07 13:51:59 +02:00
KennyTV 65b47c5e07 Only show the commands you have the permission to execute in the helppage 2018-08-06 21:12:36 +02:00
KennyTV d70d01f2d3 Fix config updating unnecessary value in Spigot version 2018-07-27 12:34:09 +02:00
KennyTV 769d7d3bcd Minor improvement 2018-07-27 12:28:07 +02:00
KennyTV a5f47688e0 Minor improvement 2018-07-27 11:50:19 +02:00
KennyTV 7d2e6a25a4 Move license and whitelistedplayers file to core module 2018-07-25 00:29:06 +02:00
KennyTV 69999b3b7a Fix MySQL millisecondsToCheck variable 2018-07-24 22:29:03 +02:00
KennyTV 94d1bd4eb9 Only make a request to the database at least x seconds after the last one 2018-07-23 11:52:30 +02:00
KennyTV c18e8b7ab7 Add warning and backup string if config value is null 2018-07-23 11:10:16 +02:00
KennyTV 9f45187300 Add warning and backup string if config value is null 2018-07-23 11:09:08 +02:00
KennyTV 0c6ba8a9b7 Updated BungeeCord dependency to 1.13-SNAPSHOT 2018-07-21 11:02:55 +02:00
KennyTV 1af69f2e8b Version increase to 2.3.1-SNAPSHOT 2018-07-18 15:50:35 +02:00
KennyTV a3b836b1c5 2.3 Release 2018-07-17 11:45:43 +02:00
KennyTV 1eca6c81ad Version increase for the 2.3 Release 2018-07-17 11:41:03 +02:00
KennyTV b9b4a78b5c Minor cleanup 2018-07-16 21:52:27 +02:00
KennyTV fda23c5539 The whitelist command now also shows the UUID of the player 2018-07-16 20:25:05 +02:00
KennyTV 8297321971 Changed help message order 2018-07-16 18:04:14 +02:00
KennyTV cfeaf00f26 Fixed wrong command descriptions 2018-07-16 13:22:46 +02:00
KennyTV 5ee1b32249 Uncommented new help messages 2018-07-16 13:07:59 +02:00
KennyTV b69f0dc90e Added missing motd command permission 2018-07-14 22:27:20 +02:00
KennyTV fe6cae4e47 Added motdlist command 2018-07-09 16:33:51 +02:00
KennyTV b494b5c23c Reworked setmotd command 2018-07-09 15:49:54 +02:00
KennyTV 3bd3395128 Removed setmotd command 2018-07-08 11:29:20 +02:00
KennyTV 3e3f63220d Config fix 2018-07-08 11:25:47 +02:00
KennyTV ccba0f042f Version increase to 2.3-SNAPSHOT 2018-07-08 11:20:18 +02:00
KennyTV abdd89259d Added multiple pingmessages + minor improvements 2018-07-08 10:54:51 +02:00
KennyTV 256f203c48 Minor code change 2018-06-18 11:17:47 +02:00
KennyTV 205412b02c Minor improvement 2018-06-18 11:17:06 +02:00
KennyTV 990289feb2 Fixed a problem with the setmotd command 2018-06-17 20:57:50 +02:00
KennyTV 44b1ff1a1f Fixed a typo 2018-06-17 20:27:01 +02:00
KennyTV f9e11bb9e5 Removed unused method 2018-06-17 19:58:21 +02:00
KennyTV eef1584b1c Small logic change 2018-06-17 18:51:35 +02:00
KennyTV 937dd84d1c Added permission per subcommand 2018-06-17 18:40:47 +02:00
KennyTV 80b9fe280b Message change 2018-06-17 18:29:58 +02:00
KennyTV 3892892792 Version increase to 2.2.3-SNAPSHOT 2018-06-17 18:06:59 +02:00
KennyTV 519551e76c Removed Spigot dependency from Core module 2018-06-17 14:36:18 +02:00
KennyTV b30476ae3f 2.2.2 Release 2018-06-17 11:24:35 +02:00
KennyTV 9d417a12f1 2.2.2 Release 2018-06-17 11:22:43 +02:00
KennyTV fd5406b95d 2.2.2 Release 2018-06-17 11:21:10 +02:00
KennyTV 0ef59e557d Maintenance icon fix and reload command message change 2018-06-14 12:35:10 +02:00
KennyTV 15ed1db347 Made the loading of the maintenance icon more structured 2018-06-14 12:10:33 +02:00
KennyTV 429d5b90d4 Api fix 2018-06-10 10:44:42 +02:00
KennyTV b3ab931aca Removed old config comment 2018-06-09 11:26:58 +02:00
KennyTV 21b42d0c72 Version increase to 2.2.2-SNAPSHOT
Some minor pom changes
2018-06-09 10:14:21 +02:00
KennyTV 7b1e1a27ba Merge remote-tracking branch 'origin/master' 2018-04-23 11:39:04 +02:00
KennyTV fb7b1e791f Some javadoc and comment changes 2018-04-23 11:38:51 +02:00
KennyTV eecd59b387 2.2.1 release 2018-04-17 04:46:22 +02:00
KennyTV ff7d8e0293 Project/pom changes 2018-04-16 20:54:21 +02:00
KennyTV 19c6d77a2c Updated API 2018-04-16 19:50:50 +02:00
KennyTV e002aa34e9 Comment line change 2018-04-16 16:35:13 +02:00
KennyTV 865e53a4a8 MySQL change 2018-04-16 15:31:50 +02:00
KennyTV b8c652b7fb MySQL fix 2018-04-16 14:39:40 +02:00
KennyTV c4080f82dc More cleanup 2018-04-16 14:18:19 +02:00
KennyTV 1a33497e8f Fixed doc typo 2018-04-15 15:07:19 +02:00
KennyTV f8353b8eda Various stuff 2018-04-15 13:53:42 +02:00
KennyTV 4980ad54ec Setmotd fixes 2018-04-15 13:38:21 +02:00
KennyTV 5363305411 Setmotd fixes 2018-04-15 13:37:07 +02:00
KennyTV 6ff47619ad Added setmotd command 2018-04-15 13:17:58 +02:00
KennyTV 69315a3f74 Create ISSUE_TEMPLATE.md 2018-04-14 19:09:34 +02:00
KennyTV 8b1ddba672 Added import 2018-04-14 18:46:24 +02:00
KennyTV bf63f0e209 MySQL improvements 2018-04-14 12:25:57 +02:00
KennyTV 450c923d24 Fixes 2018-04-14 12:06:29 +02:00
KennyTV 9a922a6df5 Small ServerListPlus integration and command fix 2018-04-14 12:00:46 +02:00
KennyTV 08a5a9a021 Fixes 2018-04-13 23:28:15 +02:00
KennyTV 61ad7d8533 Code cleanup 2018-04-13 22:56:41 +02:00
KennyTV 52d2b3c096 Automatically create sql table if non existing 2018-04-13 20:12:32 +02:00
KennyTV b0a69cc048 Moved resources 2018-04-13 19:26:45 +02:00
KennyTV 74e445a62e Added license and bumped version to 2.2.1-SNAPSHOT 2018-04-13 19:24:16 +02:00
KennyTV 91219202b2 Updated README 2018-04-05 23:50:36 +02:00
KennyTV a3545c83a0 Removed first commit errors 2018-04-05 23:45:39 +02:00
KennyTV 31baf91e8f Code commit 2018-04-05 23:43:25 +02:00
KennyTV 214cd53751 Update README.md 2018-03-17 11:43:36 +01:00
KennyTV 2be16882c7 Update README.md 2018-03-17 10:30:46 +01:00
KennyTV 75e2264b44 Update README.md 2018-03-06 21:53:08 +01:00
KennyTV fd7a0eb6a5 Update README.md 2018-03-06 21:52:14 +01:00
KennyTV 177115f144 Add files via upload 2018-03-06 21:39:49 +01:00
KennyTV edbe31dc9c Create README.md 2018-03-06 21:39:02 +01:00
KennyTV 21a2f9ef2f Init 2018-02-16 18:39:21 +01:00
106 changed files with 1759 additions and 1219 deletions

No files matched your search

-1
View File
@@ -1 +0,0 @@
.gitea/CODEOWNERS linguist-detectable=false
-3
View File
@@ -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 -17
View File
@@ -1,22 +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
@@ -119,7 +103,7 @@ This file contains update logs for this project. The top may contain a `Unreleas
* 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
* Added Italian language file (thanks to @TheViperShow)
* 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
+1 -1
View File
@@ -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**
+6 -6
View File
@@ -7,20 +7,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 17
java-version: 11
distribution: 'temurin'
- name: Build with Gradle
run: ./gradlew build
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: Maintenance Files
path: build/libs
-1
View File
@@ -2,7 +2,6 @@
build/
.gradle
bin/
run/
tmp/
*.tmp
*.bak
+1 -1
View File
@@ -4,7 +4,7 @@
[![Crowdin](https://badges.crowdin.net/maintenance/localized.svg)](https://crowdin.com/project/maintenance)
[![Discord](https://img.shields.io/discord/489135856284729384.svg?label=Discord&logo=discord&logoColor=fff)](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 the most customizable free maintenance plugin for your Minecraft server you can find. It runs on Spigot, BungeeCord, Sponge, as well as Velocity.
Its features include:
* A custom motd as well as server icon, that will be shown during maintenance
+1 -1
View File
@@ -1,5 +1,5 @@
plugins {
id("com.gradleup.shadow")
id("com.github.johnrengelman.shadow")
}
// Shade and relocate adventure in an extra module, so that common/the rest can directly depend on a
@@ -1,5 +1,5 @@
plugins {
id("com.gradleup.shadow")
id("com.github.johnrengelman.shadow")
}
tasks {
@@ -1,5 +1,5 @@
plugins {
id("com.gradleup.shadow")
id("com.github.johnrengelman.shadow")
}
tasks {
View File
Whitespace-only changes.
+1 -1
View File
@@ -8,5 +8,5 @@ repositories {
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")
implementation("com.github.johnrengelman", "shadow", "8.1.1")
}
+6 -3
View File
@@ -30,11 +30,14 @@ private fun Project.configurePublication(configurer: MavenPublication.() -> Unit
}
fun Project.latestCommitHash(): String {
return providers.exec {
val byteOut = ByteArrayOutputStream()
exec {
commandLine = listOf("git", "rev-parse", "--short", "HEAD")
}.standardOutput.asBytes.get().toString(Charsets.UTF_8).trim()
standardOutput = byteOut
}
return byteOut.toString(Charsets.UTF_8.name()).trim()
}
fun JavaPluginExtension.javaTarget(version: Int) {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
toolchain.languageVersion.set(JavaLanguageVersion.of(version))
}
@@ -7,10 +7,8 @@ plugins {
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)
expand("version" to project.version, "description" to project.description)
}
}
javadoc {
@@ -4,7 +4,7 @@ import org.gradle.kotlin.dsl.named
plugins {
id("maintenance.base-conventions")
id("com.gradleup.shadow")
id("com.github.johnrengelman.shadow")
}
tasks {
+7 -6
View File
@@ -2,7 +2,6 @@ import org.gradle.api.plugins.JavaPlugin.TEST_IMPLEMENTATION_CONFIGURATION_NAME
plugins {
base
id("eclipse")
id("maintenance.build-logic")
}
@@ -13,10 +12,11 @@ allprojects {
}
val platforms = setOf(
projects.maintenancePaper,
projects.maintenanceSpigot,
projects.maintenanceBungee,
projects.maintenanceSponge,
projects.maintenanceVelocity
).map { it.path }
).map { it.dependencyProject }
val special = setOf(
projects.maintenance,
@@ -25,10 +25,11 @@ val special = setOf(
projects.adventure,
projects.adventure.adventureApi,
projects.adventure.adventurePlatformBukkit,
).map { it.path }
projects.adventure.adventurePlatformBungee,
).map { it.dependencyProject }
subprojects {
when (path) {
when (this) {
in platforms -> plugins.apply("maintenance.platform-conventions")
in special -> plugins.apply("maintenance.base-conventions")
else -> plugins.apply("maintenance.standard-conventions")
@@ -38,4 +39,4 @@ subprojects {
TEST_IMPLEMENTATION_CONFIGURATION_NAME(rootProject.libs.bundles.junit)
TEST_IMPLEMENTATION_CONFIGURATION_NAME(rootProject.libs.snakeyaml)
}
}
}
+8
View File
@@ -0,0 +1,8 @@
dependencies {
implementation(projects.maintenanceCoreProxy)
implementation(projects.adventure.adventurePlatformBungee) {
targetConfiguration = "shadow"
}
implementation(libs.bstatsBungee)
compileOnly(libs.bungee)
}
@@ -0,0 +1,47 @@
/*
* 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.bungee;
import eu.kennytv.maintenance.api.Maintenance;
import eu.kennytv.maintenance.core.MaintenanceBase;
import net.md_5.bungee.api.plugin.Plugin;
import java.io.File;
public final class MaintenanceBungeeBase extends Plugin implements MaintenanceBase {
private MaintenanceBungeePlugin maintenance;
@Override
public void onEnable() {
maintenance = new MaintenanceBungeePlugin(this);
}
@Override
public void onDisable() {
maintenance.disable();
}
@Override
public Maintenance getApi() {
return maintenance;
}
File getPluginFile() {
return getFile();
}
}
@@ -0,0 +1,297 @@
/*
* 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.bungee;
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.ProxyPingListener;
import eu.kennytv.maintenance.bungee.listener.ServerConnectListener;
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.bungee.util.ComponentUtil;
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.proxy.hook.LuckPermsProxyHook;
import eu.kennytv.maintenance.core.proxy.util.ProfileLookup;
import eu.kennytv.maintenance.core.proxy.util.ProxyOfflineSenderInfo;
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.lib.kyori.adventure.platform.bungeecord.BungeeAudiences;
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
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.chat.hover.content.Text;
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 org.bstats.bungeecord.Metrics;
import org.jetbrains.annotations.Nullable;
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.Set;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;
import java.util.stream.Collectors;
public final class MaintenanceBungeePlugin extends MaintenanceProxyPlugin {
private final MaintenanceBungeeBase plugin;
private final BungeeAudiences audiences;
private Favicon favicon;
MaintenanceBungeePlugin(final MaintenanceBungeeBase plugin) {
super(plugin.getDescription().getVersion(), ServerType.BUNGEE);
this.plugin = plugin;
this.audiences = BungeeAudiences.create(plugin);
settingsProxy = new SettingsProxy(this);
settings = settingsProxy;
sendEnableMessage();
final PluginManager pm = getProxy().getPluginManager();
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));
continueLastEndtimer();
new Metrics(plugin, 742);
final Plugin serverListPlus = pm.getPlugin("ServerListPlus");
if (serverListPlus != null) {
serverListPlusHook = new ServerListPlusHook(serverListPlus);
if (settings.isEnablePingMessages()) {
serverListPlusHook.setEnabled(!settingsProxy.isMaintenance());
}
plugin.getLogger().info("Enabled ServerListPlus integration!");
}
if (false && pm.getPlugin("LuckPerms") != null) {
LuckPermsProxyHook.<ProxiedPlayer>register(this, player -> {
final net.md_5.bungee.api.connection.Server server = player.getServer();
return server != null ? server.getInfo().getName() : null;
});
getLogger().info("Registered LuckPerms context");
}
}
@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: §6" + HANGAR_URL));
final TextComponent click = new TextComponent(TextComponent.fromLegacyText(" §7§l§o(CLICK ME)"));
click.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, HANGAR_URL));
click.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new 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(serverInfo.getName());
}
@Override
protected void kickPlayersFromProxy() {
for (final ProxiedPlayer player : getProxy().getPlayers()) {
if (!hasPermission(player, "bypass") && !settingsProxy.isWhitelisted(player.getUniqueId())) {
player.disconnect(ComponentUtil.toBadComponents(settingsProxy.getKickMessage()));
}
}
}
@Override
protected void kickPlayers(final Server server, final Server fallback) {
// Kick players from a proxied server
final ServerInfo fallbackServer = fallback != null ? ((BungeeServer) fallback).getServer() : null;
final boolean checkForFallback = fallbackServer != null && !isMaintenance(fallback);
for (final ProxiedPlayer player : ((BungeeServer) server).getServer().getPlayers()) {
if (!hasPermission(player, "bypass") && !settingsProxy.isWhitelisted(player.getUniqueId())) {
if (checkForFallback && fallbackServer.canAccess(player)) {
audiences.player(player).sendMessage(settingsProxy.getMessage("singleMaintenanceActivated", "%SERVER%", server.getName()));
player.connect(fallbackServer);
} else {
player.disconnect(ComponentUtil.toBadComponents(settingsProxy.getFullServerKickMessage(server.getName())));
}
} else {
audiences.player(player).sendMessage(settingsProxy.getMessage("singleMaintenanceActivated", "%SERVER%", server.getName()));
}
}
}
@Override
protected void kickPlayersTo(final Server server) {
// Kick all players to a single waiting server
final ServerInfo serverInfo = ((BungeeServer) server).getServer();
// Notifications done in global method
for (final ProxiedPlayer player : getProxy().getPlayers()) {
if (hasPermission(player, "bypass") || settingsProxy.isWhitelisted(player.getUniqueId())) continue;
if (player.getServer() != null && player.getServer().getInfo().getName().equals(serverInfo.getName()))
continue;
if (serverInfo.canAccess(player) && !isMaintenance(serverInfo)) {
audiences.player(player).sendMessage(settingsProxy.getMessage("sentToWaitingServer", "%SERVER%", server.getName()));
player.connect(serverInfo);
} else {
player.disconnect(ComponentUtil.toBadComponents(settingsProxy.getKickMessage()));
}
}
}
@Override
public Task startMaintenanceRunnable(final Runnable runnable) {
return new BungeeTask(getProxy().getScheduler().schedule(plugin, runnable, 0, 1, TimeUnit.SECONDS).getId());
}
@Override
public CompletableFuture<@Nullable SenderInfo> getOfflinePlayer(final String name) {
final ProxiedPlayer player = getProxy().getPlayer(name);
if (player != null) {
return CompletableFuture.completedFuture(new BungeeSenderInfo(player));
}
return CompletableFuture.supplyAsync(() -> {
try {
final ProfileLookup profile = doUUIDLookup(name);
return new ProxyOfflineSenderInfo(profile.getUuid(), profile.getName());
} catch (IOException e) {
throw new RuntimeException(e);
}
});
}
@Override
public CompletableFuture<@Nullable SenderInfo> getOfflinePlayer(final UUID uuid) {
final ProxiedPlayer player = getProxy().getPlayer(uuid);
return CompletableFuture.completedFuture(player != null ? new BungeeSenderInfo(player) : null);
}
@Override
@Nullable
public Server getServer(final String server) {
final ServerInfo serverInfo = getProxy().getServerInfo(server);
return serverInfo != null ? new BungeeServer(serverInfo) : null;
}
@Override
public Set<String> getServers() {
return getProxy().getServers().keySet();
}
@Override
@Nullable
public String getServerNameOf(final SenderInfo sender) {
final ProxiedPlayer player = getProxy().getPlayer(sender.getUuid());
if (player == null || player.getServer() == null) return null;
return player.getServer().getInfo().getName();
}
@Override
public void async(final Runnable runnable) {
getProxy().getScheduler().runAsync(plugin, runnable);
}
@Override
protected void executeConsoleCommand(final String command) {
getProxy().getPluginManager().dispatchCommand(getProxy().getConsole(), command);
}
@Override
public void broadcast(final Component component) {
audiences.all().sendMessage(component);
}
@Override
public File getDataFolder() {
return plugin.getDataFolder();
}
@Override
public File getPluginFile() {
return plugin.getPluginFile();
}
@Override
protected int getOnlinePlayers() {
return getProxy().getOnlineCount();
}
@Override
protected int getMaxPlayers() {
return getProxy().getConfig().getPlayerLimit();
}
@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;
}
public BungeeAudiences audiences() {
return audiences;
}
}
@@ -0,0 +1,82 @@
/*
* 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.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.chat.ClickEvent;
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 java.util.ArrayList;
import java.util.List;
import java.util.Map;
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) {
final List<String> list = new ArrayList<>();
for (final Map.Entry<String, ServerInfo> entry : plugin.getProxy().getServers().entrySet()) {
final String serverName = entry.getValue().getName();
if (entry.getKey().toLowerCase().startsWith(s) && !plugin.getSettingsProxy().getMaintenanceServers().contains(serverName)) {
list.add(serverName);
}
}
return list;
}
@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() {
final List<String> list = new ArrayList<>();
for (final ProxiedPlayer p : plugin.getProxy().getPlayers()) {
list.add(p.getName());
}
return list;
}
}
@@ -0,0 +1,48 @@
/*
* 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.bungee.command;
import eu.kennytv.maintenance.bungee.util.BungeeSenderInfo;
import eu.kennytv.maintenance.core.command.MaintenanceCommand;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.plugin.Command;
import net.md_5.bungee.api.plugin.TabExecutor;
public final class MaintenanceBungeeCommandBase extends Command implements TabExecutor {
private final MaintenanceCommand command;
public MaintenanceBungeeCommandBase(final MaintenanceCommand command) {
super("maintenance", "maintenance.command", "mt");
this.command = command;
}
@Override
public boolean hasPermission(final CommandSender sender) {
return sender.hasPermission("maintenance.admin") || sender.hasPermission("maintenance.command");
}
@Override
public void execute(final CommandSender sender, final String[] args) {
command.execute(new BungeeSenderInfo(sender), args);
}
@Override
public Iterable<String> onTabComplete(final CommandSender sender, final String[] args) {
return command.getSuggestions(new BungeeSenderInfo(sender), args);
}
}
@@ -0,0 +1,71 @@
/*
* 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.bungee.listener;
import eu.kennytv.maintenance.bungee.MaintenanceBungeePlugin;
import eu.kennytv.maintenance.bungee.util.ComponentUtil;
import eu.kennytv.maintenance.core.proxy.SettingsProxy;
import net.md_5.bungee.api.ServerPing;
import net.md_5.bungee.api.event.ProxyPingEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
public final class ProxyPingListener implements Listener {
private final MaintenanceBungeePlugin plugin;
private final SettingsProxy settings;
public ProxyPingListener(final MaintenanceBungeePlugin plugin, final SettingsProxy settings) {
this.plugin = plugin;
this.settings = settings;
}
@EventHandler(priority = 80)
public void proxyPing(final ProxyPingEvent event) {
if (!settings.isMaintenance()) {
return;
}
final ServerPing ping = event.getResponse();
if (settings.hasCustomPlayerCountMessage()) {
ping.setVersion(new ServerPing.Protocol(settings.getLegacyParsedPlayerCountMessage(), 1));
}
if (settings.isEnablePingMessages()) {
ping.setDescriptionComponent(ComponentUtil.toBadComponents(settings.getRandomPingMessage()));
}
if (settings.hasCustomPlayerCountHoverMessage()) {
ServerPing.Players players = ping.getPlayers();
if (players == null) {
players = new ServerPing.Players(0, 0, null);
ping.setPlayers(players);
}
final String[] lines = settings.getLegacyParsedPlayerCountHoverLines();
final ServerPing.PlayerInfo[] samplePlayers = new ServerPing.PlayerInfo[lines.length];
for (int i = 0; i < lines.length; i++) {
samplePlayers[i] = new ServerPing.PlayerInfo(lines[i], "");
}
players.setSample(samplePlayers);
}
if (settings.hasCustomIcon() && plugin.getFavicon() != null) {
ping.setFavicon(plugin.getFavicon());
}
}
}
@@ -0,0 +1,119 @@
/*
* 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.bungee.listener;
import eu.kennytv.maintenance.api.proxy.Server;
import eu.kennytv.maintenance.bungee.MaintenanceBungeePlugin;
import eu.kennytv.maintenance.bungee.util.BungeeSenderInfo;
import eu.kennytv.maintenance.bungee.util.BungeeServer;
import eu.kennytv.maintenance.core.proxy.SettingsProxy;
import eu.kennytv.maintenance.core.proxy.listener.ProxyJoinListenerBase;
import eu.kennytv.maintenance.core.proxy.util.ServerConnectResult;
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.event.ServerConnectEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
import net.md_5.bungee.event.EventPriority;
public final class ServerConnectListener extends ProxyJoinListenerBase implements Listener {
private final MaintenanceBungeePlugin plugin;
public ServerConnectListener(final MaintenanceBungeePlugin plugin, final SettingsProxy settings) {
super(plugin, settings);
this.plugin = plugin;
}
@EventHandler
public void initialServerConnect(final ServerConnectEvent event) {
// Global maintenance check
if (event.isCancelled() || event.getReason() != ServerConnectEvent.Reason.JOIN_PROXY) return;
final BungeeSenderInfo player = new BungeeSenderInfo(event.getPlayer());
if (plugin.isDebug()) {
plugin.getLogger().info("Join permission check for " + event.getPlayer().getName()
+ " - Permission: " + player.hasMaintenancePermission("bypass") + ", whitelist: " + settings.isWhitelisted(player.getUuid()));
}
if (shouldKick(player)) {
final Server waitingServer = shouldConnectToWaitingServer(player);
if (waitingServer != null) {
event.setTarget(((BungeeServer) waitingServer).getServer());
player.send(settings.getMessage("sentToWaitingServer"));
if (plugin.isDebug()) {
plugin.getLogger().info("Join to waiting server for " + event.getPlayer().getName());
}
return;
}
event.setCancelled(true);
player.disconnect(settings.getKickMessage());
if (settings.isJoinNotifications()) {
broadcastJoinNotification(player.getName());
}
}
}
@EventHandler(priority = EventPriority.HIGH)
public void serverConnect(final ServerConnectEvent event) {
// Server specific maintenance check
if (event.isCancelled()) return;
final ProxiedPlayer proxiedPlayer = event.getPlayer();
final boolean normalServerConnect = event.getReason() != ServerConnectEvent.Reason.JOIN_PROXY && event.getReason() != ServerConnectEvent.Reason.KICK_REDIRECT
&& event.getReason() != ServerConnectEvent.Reason.LOBBY_FALLBACK && event.getReason() != ServerConnectEvent.Reason.SERVER_DOWN_REDIRECT;
final BungeeSenderInfo player = new BungeeSenderInfo(proxiedPlayer);
final ServerConnectResult connectResult = serverConnect(player, new BungeeServer(event.getTarget()), normalServerConnect);
if (plugin.isDebug()) {
plugin.getLogger().info("Connectresult for " + player.getName() + " to " + event.getTarget().getName() + ": " + connectResult);
}
if (connectResult.isCancelled()) {
event.setCancelled(true);
// Player has no server to connect to
if (proxiedPlayer.getServer() == null) {
player.disconnect(settings.getKickMessage());
}
} else if (connectResult.getTarget() != null) {
event.setTarget(((BungeeServer) connectResult.getTarget()).getServer());
}
}
@Override
protected void broadcastJoinNotification(final String name) {
sendJoinMessage(ProxyServer.getInstance().getPlayers(), name);
}
@Override
protected void broadcastJoinNotification(final String name, final Server server) {
sendJoinMessage(((BungeeServer) server).getServer().getPlayers(), name);
}
private void sendJoinMessage(final Iterable<ProxiedPlayer> players, final String name) {
final Component component = settings.getMessage("joinNotification", "%PLAYER%", name);
for (final ProxiedPlayer player : players) {
if (plugin.hasPermission(player, "joinnotification")) {
plugin.audiences().player(player).sendMessage(component);
}
}
}
}
@@ -0,0 +1,85 @@
/*
* 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.bungee.util;
import eu.kennytv.maintenance.api.MaintenanceProvider;
import eu.kennytv.maintenance.api.proxy.Server;
import eu.kennytv.maintenance.bungee.MaintenanceBungeePlugin;
import eu.kennytv.maintenance.core.proxy.util.ProxySenderInfo;
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.connection.Connection;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import java.util.UUID;
public final class BungeeSenderInfo implements ProxySenderInfo {
private final CommandSender sender;
public BungeeSenderInfo(final CommandSender sender) {
this.sender = sender;
}
@Override
public UUID getUuid() {
return sender instanceof ProxiedPlayer ? ((ProxiedPlayer) sender).getUniqueId() : null;
}
@Override
public String getName() {
return sender.getName();
}
@Override
public boolean hasPermission(final String permission) {
return sender.hasPermission(permission);
}
@Override
@Deprecated
public void sendMessage(final String message) {
sender.sendMessage(message);
}
@Override
public void send(final Component component) {
((MaintenanceBungeePlugin) MaintenanceProvider.get()).audiences().sender(sender).sendMessage(component);
}
@Override
public boolean isPlayer() {
return sender instanceof ProxiedPlayer;
}
public void sendMessage(final TextComponent textComponent) {
sender.sendMessage(textComponent);
}
@Override
public boolean canAccess(final Server server) {
return ((BungeeServer) server).getServer().canAccess(sender);
}
@Override
public void disconnect(final Component component) {
if (sender instanceof Connection) {
((Connection) sender).disconnect(ComponentUtil.toBadComponent(component));
}
}
}
@@ -0,0 +1,59 @@
/*
* 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.bungee.util;
import eu.kennytv.maintenance.api.proxy.Server;
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.connection.ProxiedPlayer;
public final class BungeeServer implements Server {
private final ServerInfo server;
public BungeeServer(final ServerInfo server) {
this.server = server;
}
@Override
public String getName() {
return server.getName();
}
@Override
public boolean hasPlayers() {
return !server.getPlayers().isEmpty();
}
@Override
public void broadcast(final Component component) {
final BaseComponent[] components = ComponentUtil.toBadComponent(component);
for (final ProxiedPlayer player : server.getPlayers()) {
player.sendMessage(components);
}
}
@Override
public boolean isRegisteredServer() {
return true;
}
public ServerInfo getServer() {
return server;
}
}
@@ -0,0 +1,34 @@
/*
* 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.bungee.util;
import eu.kennytv.maintenance.core.util.Task;
import net.md_5.bungee.api.ProxyServer;
public final class BungeeTask implements Task {
private final int id;
public BungeeTask(final int id) {
this.id = id;
}
@Override
public void cancel() {
ProxyServer.getInstance().getScheduler().cancel(id);
}
}
@@ -0,0 +1,35 @@
/*
* 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.bungee.util;
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
import eu.kennytv.maintenance.lib.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.chat.ComponentSerializer;
public final class ComponentUtil {
public static BaseComponent[] toBadComponent(final Component component) {
return ComponentSerializer.parse(GsonComponentSerializer.gson().serialize(component));
}
public static BaseComponent toBadComponents(final Component component) {
return new TextComponent(ComponentSerializer.parse(GsonComponentSerializer.gson().serialize(component)));
}
}
+7
View File
@@ -0,0 +1,7 @@
name: Maintenance
version: ${version}
main: eu.kennytv.maintenance.bungee.MaintenanceBungeeBase
author: kennytv
description: ${description}
softDepends: [ServerListPlus, LuckPerms]
website: https://hangar.papermc.io/kennytv/Maintenance
@@ -32,13 +32,15 @@ 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 org.jetbrains.annotations.Blocking;
import org.jetbrains.annotations.Nullable;
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;
@@ -46,8 +48,7 @@ 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;
import java.util.concurrent.TimeUnit;
/**
* @author kennytv
@@ -145,15 +146,15 @@ public abstract class MaintenanceProxyPlugin extends MaintenancePlugin implement
}
}
public MaintenanceRunnableBase startSingleMaintenanceRunnable(final Server server, final Duration duration, final boolean enable) {
final MaintenanceRunnableBase runnable = new SingleMaintenanceRunnable(this, settingsProxy, (int) duration.getSeconds(), enable, server);
public MaintenanceRunnableBase startSingleMaintenanceRunnable(final Server server, final long duration, final TimeUnit unit, final boolean enable) {
final MaintenanceRunnableBase runnable = new SingleMaintenanceRunnable(this, settingsProxy, (int) unit.toSeconds(duration), enable, server);
serverTasks.put(server.getName(), runnable.getTask());
return runnable;
}
public MaintenanceRunnableBase scheduleSingleMaintenanceRunnable(final Server server, final Duration enableIn, final Duration maintenanceDuration) {
public MaintenanceRunnableBase scheduleSingleMaintenanceRunnable(final Server server, final long duration, final long maintenanceDuration, final TimeUnit unit) {
final MaintenanceRunnableBase runnable = new SingleMaintenanceScheduleRunnable(this, settingsProxy,
(int) enableIn.getSeconds(), (int) maintenanceDuration.getSeconds(), server);
(int) unit.toSeconds(duration), (int) unit.toSeconds(maintenanceDuration), server);
serverTasks.put(server.getName(), runnable.getTask());
return runnable;
}
@@ -261,9 +262,9 @@ public abstract class MaintenanceProxyPlugin extends MaintenancePlugin implement
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)
undashedUUID.substring(0, 8) + "-" + undashedUUID.substring(8, 12) + "-" +
undashedUUID.substring(12, 16) + "-" + undashedUUID.substring(16, 20) + "-" +
undashedUUID.substring(20, 32)
);
}
@@ -98,7 +98,7 @@ public final class SettingsProxy extends Settings {
}
final Object fallback = config.getObject("fallback");
fallbackServers = fallback instanceof String ? Collections.singletonList((String) fallback) : config.getStringList("fallback", Collections.emptyList());
fallbackServers = fallback instanceof String ? Collections.singletonList((String) fallback) : config.getStringList("fallback");
waitingServer = config.getString("waiting-server", "");
if (waitingServer.isEmpty() || waitingServer.equalsIgnoreCase("none")) {
@@ -22,9 +22,9 @@ 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;
import java.util.concurrent.TimeUnit;
public final class SingleEndtimerCommand extends ProxyCommandInfo {
@@ -41,9 +41,7 @@ public final class SingleEndtimerCommand extends ProxyCommandInfo {
public void execute(final SenderInfo sender, final String[] args) {
if (args.length == 2) {
if (checkPermission(sender, "timer")) return;
final Duration duration = plugin.getCommandManager().parseDurationAndCheckTask(sender, args[1]);
if (duration == null) {
if (plugin.getCommandManager().checkTimerArgs(sender, args[1])) {
sender.send(getHelpMessage());
return;
}
@@ -52,13 +50,11 @@ public final class SingleEndtimerCommand extends ProxyCommandInfo {
return;
}
plugin.startMaintenanceRunnable(duration, false);
plugin.startMaintenanceRunnable(Integer.parseInt(args[1]), TimeUnit.MINUTES, false);
sender.send(getMessage("endtimerStarted", "%TIME%", plugin.getRunnable().getTime()));
} else if (args.length == 3) {
if (checkPermission(sender, "singleserver.timer")) return;
final Duration duration = plugin.getCommandManager().parseDurationAndCheckTask(sender, args[2], false);
if (duration == null) {
if (plugin.getCommandManager().checkTimerArgs(sender, args[2], false)) {
sender.send(getHelpMessage());
return;
}
@@ -70,7 +66,7 @@ public final class SingleEndtimerCommand extends ProxyCommandInfo {
return;
}
final MaintenanceRunnableBase runnable = plugin.startSingleMaintenanceRunnable(server, duration, false);
final MaintenanceRunnableBase runnable = plugin.startSingleMaintenanceRunnable(server, Integer.parseInt(args[2]), TimeUnit.MINUTES, false);
sender.send(getMessage(
"singleEndtimerStarted",
"%TIME%", runnable.getTime(),
@@ -22,9 +22,9 @@ 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;
import java.util.concurrent.TimeUnit;
public final class SingleScheduleTimerCommand extends ProxyCommandInfo {
@@ -41,10 +41,8 @@ public final class SingleScheduleTimerCommand extends ProxyCommandInfo {
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) {
if (plugin.getCommandManager().checkTimerArgs(sender, args[1])
|| plugin.getCommandManager().checkTimerArgs(sender, args[2], false)) {
sender.send(getHelpMessage());
return;
}
@@ -53,18 +51,17 @@ public final class SingleScheduleTimerCommand extends ProxyCommandInfo {
return;
}
plugin.scheduleMaintenanceRunnable(duration, enableIn);
final int duration = Integer.parseInt(args[2]);
plugin.scheduleMaintenanceRunnable(Integer.parseInt(args[1]), duration, TimeUnit.MINUTES);
sender.send(getMessage(
"scheduletimerStarted",
"%TIME%", plugin.getRunnable().getTime(),
"%DURATION%", plugin.getFormattedTime((int) duration.getSeconds())
"%DURATION%", plugin.getFormattedTime(duration * 60)
));
} 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) {
if (plugin.getCommandManager().checkTimerArgs(sender, args[2], false)
|| plugin.getCommandManager().checkTimerArgs(sender, args[3], false)) {
sender.send(getHelpMessage());
return;
}
@@ -76,11 +73,12 @@ public final class SingleScheduleTimerCommand extends ProxyCommandInfo {
return;
}
final MaintenanceRunnableBase runnable = plugin.scheduleSingleMaintenanceRunnable(server, enableIn, duration);
final int duration = Integer.parseInt(args[3]);
final MaintenanceRunnableBase runnable = plugin.scheduleSingleMaintenanceRunnable(server, Integer.parseInt(args[2]), duration, TimeUnit.MINUTES);
sender.send(getMessage(
"singleScheduletimerStarted",
"%TIME%", runnable.getTime(),
"%DURATION%", plugin.getFormattedTime((int) duration.getSeconds()),
"%DURATION%", plugin.getFormattedTime(duration * 60),
"%SERVER%", server.getName()
));
} else {
@@ -22,9 +22,9 @@ 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;
import java.util.concurrent.TimeUnit;
public final class SingleStarttimerCommand extends ProxyCommandInfo {
@@ -41,9 +41,7 @@ public final class SingleStarttimerCommand extends ProxyCommandInfo {
public void execute(final SenderInfo sender, final String[] args) {
if (args.length == 2) {
if (checkPermission(sender, "timer")) return;
final Duration duration = plugin.getCommandManager().parseDurationAndCheckTask(sender, args[1]);
if (duration == null) {
if (plugin.getCommandManager().checkTimerArgs(sender, args[1])) {
sender.send(getHelpMessage());
return;
}
@@ -52,13 +50,11 @@ public final class SingleStarttimerCommand extends ProxyCommandInfo {
return;
}
plugin.startMaintenanceRunnable(duration, true);
plugin.startMaintenanceRunnable(Integer.parseInt(args[1]), TimeUnit.MINUTES, true);
sender.send(getMessage("starttimerStarted", "%TIME%", plugin.getRunnable().getTime()));
} else if (args.length == 3) {
if (checkPermission(sender, "singleserver.timer")) return;
final Duration duration = plugin.getCommandManager().parseDurationAndCheckTask(sender, args[2], false);
if (duration == null) {
if (plugin.getCommandManager().checkTimerArgs(sender, args[2], false)) {
sender.send(getHelpMessage());
return;
}
@@ -70,7 +66,7 @@ public final class SingleStarttimerCommand extends ProxyCommandInfo {
return;
}
final MaintenanceRunnableBase runnable = plugin.startSingleMaintenanceRunnable(server, duration, true);
final MaintenanceRunnableBase runnable = plugin.startSingleMaintenanceRunnable(server, Integer.parseInt(args[2]), TimeUnit.MINUTES, true);
sender.send(getMessage(
"singleStarttimerStarted",
"%TIME%", runnable.getTime(),
@@ -22,26 +22,27 @@ 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;
import java.util.concurrent.TimeUnit;
public final class SingleMaintenanceScheduleRunnable extends SingleMaintenanceRunnable {
private final int maintenanceDurationSeconds;
private final int maintenanceDuration;
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;
this.maintenanceDuration = maintenanceDuration;
}
@Override
protected void finish() {
super.finish();
((MaintenanceProxyPlugin) plugin).startSingleMaintenanceRunnable(server, Duration.ofSeconds(maintenanceDurationSeconds), false);
((MaintenanceProxyPlugin) plugin).startSingleMaintenanceRunnable(server, maintenanceDuration, TimeUnit.SECONDS, false);
}
@Override
protected Component getStartMessage() {
return settings.getMessage("singleScheduletimerBroadcast",
"%SERVER%", server.getName(),
"%TIME%", getTime(), "%DURATION%", plugin.getFormattedTime(maintenanceDurationSeconds));
"%TIME%", getTime(), "%DURATION%", plugin.getFormattedTime(maintenanceDuration));
}
}
@@ -55,6 +55,11 @@ public final class ProxyOfflineSenderInfo implements ProxySenderInfo {
return false;
}
@Override
@Deprecated
public void sendMessage(final String message) {
}
@Override
public void send(final Component component) {
}
@@ -37,7 +37,8 @@ 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 org.jetbrains.annotations.Nullable;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
@@ -53,7 +54,6 @@ 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;
@@ -61,20 +61,17 @@ 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 String prefix;
private final ServerType serverType;
private Version newestVersion;
private boolean debug;
@@ -82,12 +79,7 @@ public abstract class MaintenancePlugin implements Maintenance {
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.prefix = "§8[§eMaintenance" + serverType + "§8] ";
this.eventManager = new eu.kennytv.maintenance.core.event.EventManager();
MaintenanceProvider.setMaintenance(this);
}
@@ -106,7 +98,8 @@ public abstract class MaintenancePlugin implements Maintenance {
try {
executeConsoleCommand(command);
} catch (final Exception e) {
getLogger().log(Level.SEVERE, "Error while executing extra maintenance " + (maintenance ? "enable" : "disable") + " command: " + command, e);
getLogger().severe("Error while executing extra maintenance " + (maintenance ? "enable" : "disable") + " command: " + command);
e.printStackTrace();
}
}
}
@@ -174,16 +167,16 @@ public abstract class MaintenancePlugin implements Maintenance {
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);
public void startMaintenanceRunnable(final long duration, final TimeUnit unit, final boolean enable) {
runnable = new MaintenanceRunnable(this, settings, (int) unit.toSeconds(duration), 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 void scheduleMaintenanceRunnable(final long duration, final int maintenanceDuration, final TimeUnit unit) {
runnable = new MaintenanceScheduleRunnable(this, settings, (int) unit.toSeconds(duration), (int) unit.toSeconds(maintenanceDuration));
}
public boolean updateAvailable() {
@@ -209,7 +202,7 @@ public abstract class MaintenancePlugin implements Maintenance {
setMaintenance(false);
settings.setSavedEndtimer(0);
} else {
startMaintenanceRunnable(Duration.ofMillis(settings.getSavedEndtimer() - current), false);
startMaintenanceRunnable(settings.getSavedEndtimer() - current, TimeUnit.MILLISECONDS, false);
getLogger().info("The timer has been continued - maintenance will be disabled in: " + getTimerMessage());
}
}
@@ -225,12 +218,13 @@ public abstract class MaintenancePlugin implements Maintenance {
final int compare = version.compareTo(newestVersion);
if (compare < 0) {
getLogger().warning("Newest version available: Version " + newestVersion + ", you're on " + version);
//TODO mmmmmmmm legacy chat
getLogger().info("§cNewest version available: §aVersion " + newestVersion + "§c, you're on §a" + 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)");
getLogger().info("§cYou'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!");
getLogger().info("§cYou're running a version, that doesn't exist! §cN§ai§dc§ee§5!");
}
}
});
@@ -273,7 +267,7 @@ public abstract class MaintenancePlugin implements Maintenance {
}
private void checkNewestVersion() throws Exception {
final URLConnection connection = new URL("https://hangar.papermc.io/api/v1/projects/Maintenance/latestrelease").openConnection();
final URLConnection connection = new URL("https://hangar.papermc.io/api/v1/projects/kennytv/Maintenance/latestrelease").openConnection();
connection.setRequestProperty("User-Agent", "Maintenance/" + getVersion());
try (final BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
final String newVersionString = reader.readLine();
@@ -287,7 +281,7 @@ public abstract class MaintenancePlugin implements Maintenance {
public String pasteDump() {
final MaintenanceDump dump = new MaintenanceDump(this, settings);
try {
final HttpURLConnection connection = (HttpURLConnection) new URL("https://api.pastes.dev/post").openConnection();
final HttpURLConnection connection = (HttpURLConnection) new URL("https://hastebin.com/documents").openConnection();
connection.setDoOutput(true);
connection.setRequestMethod("POST");
connection.setRequestProperty("User-Agent", "Maintenance/" + getVersion());
@@ -298,7 +292,7 @@ public abstract class MaintenancePlugin implements Maintenance {
}
if (connection.getResponseCode() == 503) {
getLogger().warning("Could not paste dump, pastes.dev down?");
getLogger().warning("Could not paste dump, hastebin.com down?");
return null;
}
@@ -313,7 +307,8 @@ public abstract class MaintenancePlugin implements Maintenance {
return jsonOutput.get("key").getAsString();
}
} catch (final IOException e) {
getLogger().log(Level.WARNING, "Could not paste dump :(", e);
getLogger().log(Level.WARNING, "Could not paste dump :(");
e.printStackTrace();
return null;
}
}
@@ -361,7 +356,7 @@ public abstract class MaintenancePlugin implements Maintenance {
}
public boolean isNumeric(final String string) {
return INT_PATTERN.matcher(string).matches();
return string.matches("[0-9]+");
}
@Override
@@ -412,7 +407,7 @@ public abstract class MaintenancePlugin implements Maintenance {
return newestVersion;
}
public Component prefix() {
public String getPrefix() {
return prefix;
}
@@ -442,6 +437,8 @@ public abstract class MaintenancePlugin implements Maintenance {
public abstract void broadcast(Component component);
public abstract void sendUpdateNotification(SenderInfo sender);
public abstract Task startMaintenanceRunnable(Runnable runnable);
/**
@@ -33,17 +33,15 @@ 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 CONFIG_VERSION = 8;
private static final int LANGUAGE_VERSION = 2;
private static final Random RANDOM = new Random();
protected final MaintenancePlugin plugin;
@@ -56,9 +54,7 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
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;
@@ -115,7 +111,8 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
try {
updateLanguageFile();
} catch (final IOException e) {
plugin.getLogger().log(Level.SEVERE, "Couldn't update language file", e);
plugin.getLogger().severe("Couldn't update language file");
e.printStackTrace();
}
prefixString = language.getString("prefix");
@@ -127,7 +124,7 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
try {
config.save();
} catch (final IOException e) {
plugin.getLogger().log(Level.SEVERE, "Couldn't save the config file!", e);
e.printStackTrace();
}
}
@@ -151,7 +148,7 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
try {
whitelist.save();
} catch (final IOException e) {
plugin.getLogger().log(Level.SEVERE, "Couldn't save the whitelisted players file!", e);
e.printStackTrace();
}
}
@@ -176,49 +173,30 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
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;
enablePingMessages = config.getBoolean("enable-pingmessages", true);
// Can't store these two already parsed as components because gradients will break replacements
pingMessages = loadPingMessages("pingmessages");
if (config.getBoolean("enable-timerspecific-messages")) {
timerSpecificPingMessages = loadPingMessages("timerspecific-pingmessages");
}
maintenance = config.getBoolean("maintenance-enabled");
commandsOnMaintenanceEnable = config.getStringList("commands-on-maintenance-enable");
commandsOnMaintenanceDisable = config.getStringList("commands-on-maintenance-disable");
customPlayerCountMessage = config.getBoolean("enable-playercountmessage");
customPlayerCountHoverMessage = config.getBoolean("enable-playercounthovermessage");
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
// Player count and player count 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;
}
legacyParsedPlayerCountMessage = toLegacy(parse(getConfigMessage("playercountmessage")));
}
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>")) {
for (final String line : config.getString("playercounthovermessage").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);
@@ -236,9 +214,9 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
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());
whitelistedPlayers.put(UUID.fromString(entry.getKey()), (String) entry.getValue());
} catch (final Exception e) {
plugin.getLogger().warning("invalid WhitelistedPlayers entry: " + entry.getKey());
}
}
@@ -249,9 +227,7 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
// 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";
oldDirName = oldDirName.toLowerCase();
}
final File oldDir = new File(plugin.getDataFolder().getParentFile(), oldDirName);
@@ -263,7 +239,8 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
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);
plugin.getLogger().severe("Error while copying " + oldDirName + " to new " + plugin.getDataFolder().getName() + " directory!");
e.printStackTrace();
}
}
@@ -278,18 +255,6 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
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");
@@ -300,8 +265,7 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
e.printStackTrace();
}
config.addMissingFields(tempConfig);
config.replaceComments(tempConfig);
config.addMissingFields(tempConfig.getValues(), tempConfig.getComments());
config.set("config-version", CONFIG_VERSION);
file.delete();
@@ -344,8 +308,7 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
file.delete();
}
language.addMissingFields(tempConfig);
language.replaceComments(tempConfig);
language.addMissingFields(tempConfig.getValues(), tempConfig.getComments());
tempConfig.clear();
language.set("language-version", LANGUAGE_VERSION);
@@ -361,8 +324,8 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
return serialized.replaceAll("</[a-z_]+>", "");
}
private String getConfigMessage(final ConfigSection section, final String path) {
final String s = section.getString(path);
public String getConfigMessage(final String path) {
final String s = config.getString(path);
if (s == null) {
plugin.getLogger().warning("The config file is missing the following string: " + path);
return path;
@@ -370,10 +333,6 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
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) {
@@ -415,7 +374,8 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
return parse(plugin.replacePingVariables(component));
}
private List<String> loadPingMessages(final List<String> list) {
private List<String> loadPingMessages(final String path) {
final List<String> list = config.getStringList(path);
final List<String> components = new ArrayList<>(list.size());
for (final String s : list) {
components.add(replaceNewlineVar(s));
@@ -547,7 +507,8 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
return commandsOnMaintenanceDisable;
}
public @Nullable List<String> getTimerSpecificPingMessages() {
@Nullable
public List<String> getTimerSpecificPingMessages() {
return timerSpecificPingMessages;
}
@@ -556,21 +517,15 @@ public class Settings implements eu.kennytv.maintenance.api.Settings {
}
public String getLegacyParsedPlayerCountMessage() {
final String message = timerDependent(legacyParsedPlayerCountMessage, legacyParsedTimerPlayerCountMessage);
return plugin.replacePingVariables(message);
return plugin.replacePingVariables(legacyParsedPlayerCountMessage);
}
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));
final String[] lines = new String[legacyParsedPlayerCountHoverLines.size()];
for (int i = 0; i < legacyParsedPlayerCountHoverLines.size(); i++) {
lines[i] = plugin.replacePingVariables(legacyParsedPlayerCountHoverLines.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;
return lines;
}
public Component getKickMessage() {
@@ -36,19 +36,13 @@ import eu.kennytv.maintenance.core.command.subcommand.WhitelistAddCommand;
import eu.kennytv.maintenance.core.command.subcommand.WhitelistCommand;
import eu.kennytv.maintenance.core.command.subcommand.WhitelistRemoveCommand;
import eu.kennytv.maintenance.core.util.SenderInfo;
import java.time.Duration;
import java.time.format.DateTimeParseException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.jetbrains.annotations.Nullable;
public abstract class MaintenanceCommand {
private static final long MAX_TASK_DURATION_SECONDS = TimeUnit.DAYS.toSeconds(28);
protected final MaintenancePlugin plugin;
protected final Settings settings;
private final Map<String, CommandInfo> commandExecutors = new LinkedHashMap<>();
@@ -129,41 +123,29 @@ public abstract class MaintenanceCommand {
return info != null && info.hasPermission(sender) ? info.getTabCompletion(sender, args) : Collections.emptyList();
}
public @Nullable Duration parseDurationAndCheckTask(final SenderInfo sender, final String time, final boolean taskCheck) {
final Duration duration;
if (plugin.isNumeric(time)) {
// Assume minutes by default as per old command behavior
duration = Duration.ofMinutes(Integer.parseInt(time));
} else {
try {
// Only accept hours, minutes, and seconds
duration = Duration.parse("PT" + time.toUpperCase(Locale.ROOT));
} catch (final DateTimeParseException e) {
return null;
}
}
public boolean checkTimerArgs(final SenderInfo sender, final String time, final boolean taskCheck) {
if (!plugin.isNumeric(time)) return true;
if (taskCheck) {
if (plugin.isTaskRunning()) {
sender.send(settings.getMessage("timerAlreadyRunning"));
return null;
return true;
}
}
final long seconds = duration.getSeconds();
if (seconds > MAX_TASK_DURATION_SECONDS) {
final int minutes = Integer.parseInt(time);
if (minutes > 40320) {
sender.send(settings.getMessage("timerTooLong"));
return null;
return true;
}
if (seconds < 1) {
sender.sendRich("<i><dark_gray>[kennytv whispers to you] <gray>Think about running a timer for a negative amount of minutes. Doesn't work <b>that</b> <gray>well.");
return null;
if (minutes < 1) {
sender.sendMessage("§8§o[kennytv whispers to you] §7§oThink about running a timer for a negative amount of minutes. Doesn't work §lthat §7§owell.");
return true;
}
return duration;
return false;
}
public @Nullable Duration parseDurationAndCheckTask(final SenderInfo sender, final String time) {
return parseDurationAndCheckTask(sender, time, true);
public boolean checkTimerArgs(final SenderInfo sender, final String time) {
return checkTimerArgs(sender, time, true);
}
protected void addToggleAndTimerCommands() {
@@ -175,6 +157,19 @@ public abstract class MaintenanceCommand {
add(new AbortTimerCommand(plugin), "aborttimer", "abort");
}
public void checkForUpdate(final SenderInfo sender) {
if (plugin.updateAvailable()) {
sender.sendMessage(plugin.getPrefix() + "§cNewest version available: §aVersion " + plugin.getNewestVersion() + "§c, you're on §a" + plugin.getVersion());
sender.sendMessage(plugin.getPrefix() + "§c§lWARNING: §cYou will have to restart the server to prevent further issues and to complete the update! If you can't do that, don't update!");
sendUpdateMessage(sender);
} else
sender.sendMessage(plugin.getPrefix() + "§aYou already have the latest version of the plugin!");
}
protected void sendUpdateMessage(final SenderInfo sender) {
sender.sendMessage(plugin.getPrefix() + "§eUse §c§l/maintenance forceupdate §eto update!");
}
public List<String> getServersCompletion(final String s) {
return null;
}
@@ -187,6 +182,8 @@ public abstract class MaintenanceCommand {
return null;
}
public abstract void sendDumpMessage(final SenderInfo sender, final String url);
public List<CommandInfo> getCommands() {
return commands;
}
@@ -32,6 +32,6 @@ public final class DebugCommand extends CommandInfo {
if (checkArgs(sender, args, 1)) return;
plugin.setDebug(!plugin.isDebug());
sender.sendPrefixedRich("<gray>Debug mode is now " + (plugin.isDebug() ? "<green>enabled" : "<red>disabled"));
sender.sendMessage("Debug mode is now " + (plugin.isDebug() ? "enabled" : "disabled"));
}
}
@@ -20,11 +20,7 @@ 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 {
@@ -38,29 +34,25 @@ public final class DumpCommand extends CommandInfo {
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!");
sender.sendMessage(plugin.getPrefix() + "§cYou 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.");
sender.sendMessage(plugin.getPrefix() + "§7The 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)");
sender.sendMessage(plugin.getPrefix() + "§cCould 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>");
final String url = "https://hastebin.com/" + key;
sender.sendMessage(plugin.getPrefix() + "§c" + url);
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));
plugin.getCommandManager().sendDumpMessage(sender, url);
}
});
}
@@ -21,7 +21,7 @@ import eu.kennytv.maintenance.core.MaintenancePlugin;
import eu.kennytv.maintenance.core.command.CommandInfo;
import eu.kennytv.maintenance.core.util.SenderInfo;
import java.time.Duration;
import java.util.concurrent.TimeUnit;
public final class EndtimerCommand extends CommandInfo {
@@ -32,9 +32,7 @@ public final class EndtimerCommand extends CommandInfo {
@Override
public void execute(final SenderInfo sender, final String[] args) {
if (checkArgs(sender, args, 2)) return;
final Duration duration = plugin.getCommandManager().parseDurationAndCheckTask(sender, args[1]);
if (duration == null) {
if (plugin.getCommandManager().checkTimerArgs(sender, args[1])) {
sender.send(getHelpMessage());
return;
}
@@ -43,7 +41,7 @@ public final class EndtimerCommand extends CommandInfo {
return;
}
plugin.startMaintenanceRunnable(duration, false);
plugin.startMaintenanceRunnable(Integer.parseInt(args[1]), TimeUnit.MINUTES, false);
sender.send(getMessage("endtimerStarted", "%TIME%", plugin.getRunnable().getTime()));
}
}
@@ -22,6 +22,7 @@ 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 java.util.ArrayList;
import java.util.List;
@@ -85,7 +86,7 @@ public final class HelpCommand extends CommandInfo {
if (page * COMMANDS_PER_PAGE < commands.size()) {
sender.send(getMessage("helpNextPage", "%PAGE%", Integer.toString(page + 1)));
} else {
sender.sendRich("<dark_gray>× <yellow>Version: " + plugin.getVersion() + " <gray>by <aqua>kennytv");
sender.sendMessage("§8× §eVersion " + plugin.getVersion() + " §7by §bkennytv");
}
sender.send(header);
@@ -20,7 +20,6 @@ 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;
@@ -52,8 +51,7 @@ public final class RemoveMotdCommand extends CommandInfo {
}
final Settings settings = getSettings();
final ConfigSection section = settings.getConfig().getSection("ping-message");
final List<String> pingMessages = section.getStringList(timerPingMessages ? "timer-messages" : "messages");
final List<String> pingMessages = settings.getConfig().getStringList(timerPingMessages ? "timerspecific-pingmessages" : "pingmessages");
if (pingMessages.size() < 2) {
sender.send(getMessage("removeMotdError"));
return;
@@ -70,7 +68,7 @@ public final class RemoveMotdCommand extends CommandInfo {
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.getConfig().set(timerPingMessages ? "timerspecific-pingmessages" : "pingmessages", pingMessages);
settings.saveConfig();
sender.send(getMessage("removedMotd", "%INDEX%", args[1]));
}
@@ -20,7 +20,7 @@ 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;
import java.util.concurrent.TimeUnit;
public final class ScheduleTimerCommand extends CommandInfo {
@@ -31,10 +31,8 @@ public final class ScheduleTimerCommand extends CommandInfo {
@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) {
if (plugin.getCommandManager().checkTimerArgs(sender, args[1])
|| plugin.getCommandManager().checkTimerArgs(sender, args[2], false)) {
sender.send(getHelpMessage());
return;
}
@@ -43,11 +41,12 @@ public final class ScheduleTimerCommand extends CommandInfo {
return;
}
plugin.scheduleMaintenanceRunnable(enableIn, maintenanceDuration);
final int duration = Integer.parseInt(args[2]);
plugin.scheduleMaintenanceRunnable(Integer.parseInt(args[1]), duration, TimeUnit.MINUTES);
sender.send(getMessage(
"scheduletimerStarted",
"%TIME%", plugin.getRunnable().getTime(),
"%DURATION%", plugin.getFormattedTime((int) maintenanceDuration.getSeconds())
"%DURATION%", plugin.getFormattedTime(duration * 60)
));
}
}
@@ -20,7 +20,6 @@ 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;
@@ -55,8 +54,7 @@ public final class SetMotdCommand extends CommandInfo {
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 List<String> pingMessages = settings.getConfig().getStringList(timerPingMessages ? "timerspecific-pingmessages" : "pingmessages");
final int index = Integer.parseInt(args[1]);
if (index == 0 || index > pingMessages.size() + 1) {
sender.send(getMessage("setMotdIndexError",
@@ -97,7 +95,7 @@ public final class SetMotdCommand extends CommandInfo {
pingComponents.set(index - 1, componentString);
}
section.set(timerPingMessages ? "timer-messages" : "messages", pingMessages);
settings.getConfig().set(timerPingMessages ? "timerspecific-pingmessages" : "pingmessages", pingMessages);
settings.saveConfig();
sender.send(settings.getMessage(
"setMotd",
@@ -21,7 +21,7 @@ import eu.kennytv.maintenance.core.MaintenancePlugin;
import eu.kennytv.maintenance.core.command.CommandInfo;
import eu.kennytv.maintenance.core.util.SenderInfo;
import java.time.Duration;
import java.util.concurrent.TimeUnit;
public final class StarttimerCommand extends CommandInfo {
@@ -32,9 +32,7 @@ public final class StarttimerCommand extends CommandInfo {
@Override
public void execute(final SenderInfo sender, final String[] args) {
if (checkArgs(sender, args, 2)) return;
final Duration duration = plugin.getCommandManager().parseDurationAndCheckTask(sender, args[1]);
if (duration == null) {
if (plugin.getCommandManager().checkTimerArgs(sender, args[1])) {
sender.send(getHelpMessage());
return;
}
@@ -43,7 +41,7 @@ public final class StarttimerCommand extends CommandInfo {
return;
}
plugin.startMaintenanceRunnable(duration, true);
plugin.startMaintenanceRunnable(Integer.parseInt(args[1]), TimeUnit.MINUTES, true);
sender.send(getMessage("starttimerStarted", "%TIME%", plugin.getRunnable().getTime()));
}
}
@@ -20,11 +20,6 @@ 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 {
@@ -36,12 +31,12 @@ public final class UpdateCommand extends CommandInfo {
public void execute(final SenderInfo sender, final String[] args) {
if (checkArgs(sender, args, 1)) return;
if (args[0].equalsIgnoreCase("update")) {
plugin.async(() -> checkForUpdate(sender));
plugin.async(() -> plugin.getCommandManager().checkForUpdate(sender));
return;
}
if (!plugin.updateAvailable()) {
sender.sendPrefixedRich("<green>You already have the latest version of the plugin!");
sender.sendMessage(plugin.getPrefix() + "§aYou already have the latest version of the plugin!");
return;
}
@@ -52,25 +47,9 @@ public final class UpdateCommand extends CommandInfo {
} else {
sender.send(getMessage("updateFailed"));
}
} catch (final Exception e) {
} catch (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());
}
}
@@ -18,6 +18,10 @@
package eu.kennytv.maintenance.core.config;
import com.google.common.collect.Sets;
import org.jetbrains.annotations.Nullable;
import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.Yaml;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
@@ -27,9 +31,6 @@ import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import org.jetbrains.annotations.Nullable;
import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.Yaml;
/**
* Further modified version of the <a href="https://github.com/PSandro/SimpleConfig">SimpleConfig</a>SimpleConfig project of PSandro.
@@ -109,8 +110,30 @@ public final class Config extends ConfigSection {
Files.write(file.toPath(), bytes);
}
public void replaceComments(final Config fromConfig) {
this.comments = new HashMap<>(fromConfig.comments);
public boolean addMissingFields(final Map<String, Object> fields, final Map<String, String[]> comments) {
// Note: Only scans for the first two levels
boolean changed = false;
for (final Map.Entry<String, Object> entry : fields.entrySet()) {
final Object o = values.get(entry.getKey());
if (o != null) {
final Object o2 = entry.getValue();
if (!(o instanceof Map) || !(o2 instanceof Map)) continue;
final Map<String, Object> deepMap = (Map<String, Object>) o2;
for (final Map.Entry<String, Object> deepEntry : ((Map<String, Object>) o2).entrySet()) {
if (deepMap.containsKey(deepEntry.getKey())) continue;
deepMap.put(deepEntry.getKey(), deepEntry.getValue());
changed = true;
}
continue;
}
values.put(entry.getKey(), entry.getValue());
changed = true;
}
this.comments = new HashMap<>(comments);
return changed;
}
private static Yaml createYaml() {
@@ -17,12 +17,12 @@
*/
package eu.kennytv.maintenance.core.config;
import org.jetbrains.annotations.Nullable;
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.
@@ -63,15 +63,15 @@ public class ConfigSection {
@Nullable
public Object getObject(final String key, final Object def) {
int nextSeparatorIndex = -1;
int sectionStartIndex;
int i1 = -1;
int i2;
ConfigSection section = this;
while ((nextSeparatorIndex = key.indexOf('.', sectionStartIndex = nextSeparatorIndex + 1)) != -1) {
section = section.getSection(key.substring(sectionStartIndex, nextSeparatorIndex));
while ((i1 = key.indexOf('.', i2 = i1 + 1)) != -1) {
section = section.getSection(key.substring(i2, i1));
if (section == null) return def;
}
final String subKey = key.substring(sectionStartIndex);
final String subKey = key.substring(i2);
if (section == this) {
final Object result = values.get(subKey);
return result != null ? result : def;
@@ -97,41 +97,17 @@ public class ConfigSection {
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);
//TODO go deep if necessary
if (value == null) {
section.values.remove(sectionKey);
values.remove(key);
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);
values.put(key, value);
}
}
@@ -216,28 +192,6 @@ public class ConfigSection {
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
*/
@@ -146,11 +146,6 @@ public final class ConfigSerializer {
multiLineValue = false;
}
// YAML list items are values, not keys - skip without touching key/indent state
if (line.length() > indent && line.charAt(indent) == '-') {
continue;
}
// Check if this is a level lower
if (indents <= currentIndents) {
final String[] array = key.split(PATH_SEPARATOR_QUOTED);
@@ -21,12 +21,6 @@ import eu.kennytv.maintenance.core.MaintenancePlugin;
import eu.kennytv.maintenance.core.Settings;
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 eu.kennytv.maintenance.lib.kyori.adventure.text.format.TextDecoration;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
@@ -71,15 +65,8 @@ public abstract class JoinListenerBase {
}
notifiedPlayers.add(sender.getUuid());
sender.sendPrefixedRich("<red>There is a newer version available: <green>Version " + plugin.getNewestVersion() + "<red>, you're on <green>" + plugin.getVersion());
final TextComponent text = Component.text().content("Download it at: ").color(NamedTextColor.RED)
.append(Component.text().content(MaintenancePlugin.HANGAR_URL).color(NamedTextColor.GOLD))
.append(Component.text().content(" (CLICK ME)").color(NamedTextColor.GRAY).decorate(TextDecoration.BOLD))
.clickEvent(ClickEvent.clickEvent(ClickEvent.Action.OPEN_URL, MaintenancePlugin.HANGAR_URL))
.hoverEvent(HoverEvent.showText(Component.text("Download the latest version").color(NamedTextColor.GREEN)))
.build();
sender.send(plugin.prefix().append(text));
sender.sendMessage(plugin.getPrefix() + "§cThere is a newer version available: §aVersion " + plugin.getNewestVersion() + "§c, you're on §a" + plugin.getVersion());
plugin.sendUpdateNotification(sender);
});
}
@@ -20,7 +20,8 @@ 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;
import java.util.concurrent.TimeUnit;
public final class MaintenanceScheduleRunnable extends MaintenanceRunnable {
private final int maintenanceDuration;
@@ -35,7 +36,7 @@ public final class MaintenanceScheduleRunnable extends MaintenanceRunnable {
super.finish();
// Start the timer to disable maintenance again
plugin.startMaintenanceRunnable(Duration.ofSeconds(maintenanceDuration), false);
plugin.startMaintenanceRunnable(maintenanceDuration, TimeUnit.SECONDS, false);
}
@Override
@@ -45,6 +45,11 @@ public final class DummySenderInfo implements SenderInfo {
return false;
}
@Override
@Deprecated
public void sendMessage(final String message) {
}
@Override
public void send(final Component component) {
}
@@ -17,8 +17,6 @@
*/
package eu.kennytv.maintenance.core.util;
import eu.kennytv.maintenance.api.MaintenanceProvider;
import eu.kennytv.maintenance.core.MaintenancePlugin;
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
import eu.kennytv.maintenance.lib.kyori.adventure.text.minimessage.MiniMessage;
import java.util.UUID;
@@ -35,16 +33,14 @@ public interface SenderInfo {
return permission == null || hasPermission("maintenance.admin") || hasPermission("maintenance." + permission);
}
@Deprecated
void sendMessage(String message);
void send(Component component);
default void sendRich(final String message) {
send(MiniMessage.miniMessage().deserialize(message));
}
default void sendPrefixedRich(final String message) {
final MaintenancePlugin maintenance = (MaintenancePlugin) MaintenanceProvider.get();
send(maintenance.prefix().append(MiniMessage.miniMessage().deserialize(message)));
}
boolean isPlayer();
}
+51 -52
View File
@@ -11,59 +11,30 @@
# 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
maintenance-enabled: false
# Enables maintenance on certain servers managed by your proxy instance(s).
proxied-maintenance-servers:
# - AServer
- 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.
# 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
fallback: lobby
# 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.
# 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 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%"
# If running an endtimer, the time left can be displayed by including '%TIMER%' in a pingmessage (also works in playercount(-hover) message).
pingmessages:
- "<red>Currently under maintenance<br><gradient:#fbffc2:#0fffff>We will be back soon!"
# - "Other entry"
enable-pingmessages: true
# Any extra commands inside the arrays will be executed when maintenance is enabled/disabled.
# Example: commands-on-maintenance-enable: ["say hello!", "stop"]
@@ -79,29 +50,46 @@ commands-on-single-maintenance-enable:
commands-on-single-maintenance-disable:
all: []
# If set to true and an endtimer is currently running, a pingmessage 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-timerspecific-messages: true
timerspecific-pingmessages:
- "<red>Currently under maintenance<br><gradient:#fbffc2:#fffff>Come back in:</gradient> <color:#aa55ee>%TIMER%"
# - "Other entry"
# If set to true, the message below will be shown in the top right corner of the server in the serverlist, where the playercount would normally be displayed.
# If set to false, the normal playercount will be shown.
#
# Alternatively you can use '%ONLINE%' and '%MAX%' if you want to include the playercount in a custom message (e.g. "Maintenance %ONLINE%/%MAX%").
# DOES NOT SUPPORT RGB!
enable-playercountmessage: true
playercountmessage: "<dark_red>Maintenance"
# Is shown when you move your mouse above the text in the top right corner of the server in the serverlist,
# where the playercount would normally be displayed.
# DOES NOT SUPPORT RGB!
enable-playercounthovermessage: true
playercounthovermessage: "<red>Currently under<br><red>maintenance"
# 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
send-join-notification: false
# Set this to false if you do not want players to be kicked when you enable maintenance (new connections will still be blocked).
# ... I don't know why you would want that, but you can disable it. :p
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]
# Changes the language of command feedback/messages.
# If you find missing translations or want to contribute a new language file, you are very welcome to message me on Spigot or my Discord server! :)
# 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)
language: en
# 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.
@@ -121,10 +109,21 @@ mysql:
# If you for some reason cannot establish SSL connections to your database, you may disable it here (not recommended).
use-ssl: true
# 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 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
update-checks: true
# Used for autoupdating the config, do not change this value.
config-version: 9
config-version: 8
+8 -8
View File
@@ -46,7 +46,7 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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!"
@@ -78,9 +78,9 @@ helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MA
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)"
helpEndtimer: "<gold>/maintenance endtimer <minutes> <gray>(Efter den givne tid i minutter deaktiveres vedligeholdelsestilstanden)"
helpStarttimer: "<gold>/maintenance starttimer <minutes> <gray>(Efter den givne tid i minutter, vil vedligeholdelsestilstand være aktiveret)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <timer minutes> <maintenance duration> <gray>(Efter den givne tid i minutter vil vedligeholdelsestilstand være aktiveret for den givne varighed i minutter)"
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)"
@@ -93,11 +93,11 @@ helpUpdate: "<gold>/maintenance update <gray>(Downloader den nyeste version af p
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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <minutes> <gray>(Efter den givne tid i minutter deaktiveres vedligeholdelsestilstanden)"
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <minutes> <gray>(Efter den givne tid i minutter, vil vedligeholdelsestilstand blive aktiveret)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <timer minutes> <maintenance duration> <gray>(Efter den givne tid i minutter vil vedligeholdelsestilstand være aktiveret for den givne varighed i minutter)"
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.
+11 -11
View File
@@ -12,7 +12,7 @@ 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>."
starttimerStarted: "<prefix><green>Gestarteter Timer: <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!"
@@ -36,7 +36,7 @@ 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!"
whitelistAdded: "<prefix><aqua>%PLAYER% <green>wurde zur Maintenance 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!"
@@ -46,7 +46,7 @@ playerNotFoundUuid: "<prefix><red>Es konnte kein Spieler mit dieser UUID gefunde
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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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!"
@@ -76,11 +76,11 @@ 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."
helpNextPage: "<gray>Nutze <aqua>/maintenance help %SEITE%<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)"
helpEndtimer: "<gold>/maintenance endtimer <Minuten> <gray>(Sobald der Timer abläuft wird der Wartungsmodus deaktiviert)"
helpStarttimer: "<gold>/maintenance starttimer <Minuten> <gray>(Sobald der Timer abläuft wird der Wartungsmodus aktiviert)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <Timer Minuten> <Wartungsmodus Minuten> <gray>(Nach der gegebenen Zeit 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)"
@@ -93,11 +93,11 @@ helpUpdate: "<gold>/maintenance update <gray>(Sucht nach neuen Updates für das
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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [Server] <Minuten> <gray>(Sobald der Timer abläuft wird der Wartungsmodus deaktiviert)"
helpSingleStarttimer: "<gold>/maintenance starttimer [Server] <Minuten> <gray>(Sobald der Timer abläuft wird der Wartungsmodus aktiviert)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [Server] <Minuten> <Wartung in Minuten> <gray>(Sobald der Timer 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.
+9 -9
View File
@@ -18,7 +18,7 @@ scheduletimerStarted: "<prefix><green>Started timer: <gray>Maintenance mode will
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!"
timerTooLong: "<prefix><red>The number has to be less than 40320 (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: "-"
@@ -46,7 +46,7 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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!"
@@ -78,9 +78,9 @@ helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MA
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)"
helpEndtimer: "<gold>/maintenance endtimer <minutes> <gray>(After the given time in minutes, maintenance mode will be disabled)"
helpStarttimer: "<gold>/maintenance starttimer <minutes> <gray>(After the given time in minutes, maintenance mode will be enabled)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <timer minutes> <maintenance duration> <gray>(After the given time in minutes, maintenance mode will be enabled for the given duration in minutes)"
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)"
@@ -93,11 +93,11 @@ helpUpdate: "<gold>/maintenance update <gray>(Remotely downloads the newest vers
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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <minutes> <gray>(After the given time in minutes, maintenance mode will be disabled)"
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <minutes> <gray>(After the given time in minutes, maintenance mode will be enabled)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <timer minutes> <maintenance duration> <gray>(After the given time in minutes, maintenance mode will be enabled for the given duration in minutes)"
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.
+11 -11
View File
@@ -4,7 +4,7 @@
#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!"
kickmessage: "<red>¡El servidor se encuentra en mantenimiento!<br>¡Intentalo de nuevo mas tarde!"
maintenanceActivated: "<prefix><gold>Mantenimiento <gray>activado."
maintenanceDeactivated: "<prefix><gold>Modo mantenimiento desactivado."
alreadyEnabled: "<prefix><gray>¡Modo mantenimiento se encuentra habilitado!"
@@ -44,9 +44,9 @@ whitelistEmpty: "<prefix><gray>La lista de mantenimiento está vacía! Usa '<gol
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."
offlinePlayerFetchError: "<prefix><red>There was an error while fetching offline player. Please try again later."
invalidUuid: "<prefix><red>Formato inválido!"
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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!"
@@ -60,7 +60,7 @@ singleStarttimerStarted: "<prefix><gray>Temporizador iniciado: El modo mantenimi
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!"
singleMaintenanceKickComplete: "<gray>El Servidor <gold>%SERVER% <gray>esta en mantenimiento!<br><red>Vuelve Mas 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>!"
@@ -78,9 +78,9 @@ helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MA
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)"
helpEndtimer: "<gold>/maintenance endtimer <minutes> <dark_gray>(<gray>Después del tiempo en minutos, se desactivará el modo de mantenimiento<dark_gray>)"
helpStarttimer: "<gold>/maintenance starttimer <minutes> <dark_gray>(<gray>Después del tiempo en minutos, se habilitará el modo de mantenimiento<dark_gray>)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <timer minutes> <maintenance duration> <gray>(After the given time in minutes, maintenance mode will be enabled for the given duration in minutes)"
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>)"
@@ -93,11 +93,11 @@ helpUpdate: "<gold>/maintenance update <dark_gray>(<gray>Descarga de forma remot
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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <minutes> <dark_gray>(<gray>Después del tiempo en minutos, se desactivará el modo de mantenimiento<dark_gray>)"
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <minutes> <dark_gray>(<gray>Después del tiempo en minutos, se activara el modo de mantenimiento<dark_gray>)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <timer minutes> <maintenance duration> <gray>(Tras los minutos introducidos, el modo mantenimiento se activará durante la duración introducida.)"
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.
+9 -9
View File
@@ -44,9 +44,9 @@ whitelistEmpty: "<prefix><red>La liste blanche de maintenance est vide : Utilisa
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."
offlinePlayerFetchError: "<prefix><red>There was an error while fetching offline player. Please try again later."
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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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 !"
@@ -78,9 +78,9 @@ helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MA
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)"
helpEndtimer: "<gold>/maintenance endtimer <minutes> <gray>(Après le temps imparti en minutes, le mode maintenance sera désactivé)"
helpStarttimer: "<gold>/maintenance starttimer <minutes> <gray>(Après le temps imparti en minutes, le mode maintenance sera activé)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <timer minutes> <maintenance duration> <gray>(Après le temps donné en minutes, le mode de maintenance sera activé pour la durée donnée en minutes)"
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)"
@@ -93,11 +93,11 @@ helpUpdate: "<gold>/maintenance update <gray>(Télécharge la dernière version
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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <minutes> <gray>(Après le temps imparti en minutes, le mode maintenance sera désactivé)"
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <minutes> <gray>(Après le temps imparti en minutes, le mode maintenance sera activé)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <timer minutes> <maintenance duration> <gray>(Après le temps imparti en minutes, le mode maintenance sera activé pour la durée spécifiée en minutes)"
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.
+11 -11
View File
@@ -44,9 +44,9 @@ 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!"
offlinePlayerFetchError: "<prefix><red>There was an error while fetching offline player. Please try again later."
invalidUuid: "<prefix><red>Rossz UUID!"
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Paper/Sponge
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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!"
@@ -57,7 +57,7 @@ singleEndtimerBroadcast: "<prefix><gray>A karbantartás a(z) %SERVER% szerveren
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."
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!"
@@ -78,9 +78,9 @@ helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MA
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)"
helpEndtimer: "<gold>/maintenance endtimer <minutes> <gray>(A megadott idő múlva az időzítő kikapcsol)"
helpStarttimer: "<gold>/maintenance starttimer <minutes> <gray>(A megadott idő múlva az időzítő bekapcsol)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <timer minutes> <maintenance duration> <gray>(Időbeosztás az időzítőnek)"
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)"
@@ -93,12 +93,12 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <minutes> <gray>(Egy megadott idővallum múlva kikapcsol a karbantartás mód)"
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <minutes> <gray>(Egy megadott idővallum múlva bekapcsol a karbantartás mód)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <timer minutes> <maintenance duration> <gray>(Időbeosztás az időzítőnek)"
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)"
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
+9 -9
View File
@@ -44,9 +44,9 @@ whitelistEmpty: "<prefix><red>La whitelist di manutenzione è vuota! Usa <yellow
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."
offlinePlayerFetchError: "<prefix><red>There was an error while fetching offline player. Please try again later."
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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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!"
@@ -78,9 +78,9 @@ helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MA
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)"
helpEndtimer: "<gold>/maintenance endtimer <minutes> <gray>(Dopo il tempo fornito in minuti, la modalità manutenzione sarà rimossa)"
helpStarttimer: "<gold>/maintenance starttimer <minutes> <gray>(Dopo il tempo fornito in minuti, la modalità manutenzione sarà attivata)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <timer minutes> <maintenance duration> <gray>(After the given time in minutes, maintenance mode will be enabled for the given duration in minutes)"
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)"
@@ -93,11 +93,11 @@ helpUpdate: "<gold>/maintenance update <gray>(Scarica dall'esterno l'ultima vers
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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <minutes> <gray>(Dopo il tempo fornito in minuti, la modalità manutenzione sarà rimossa)"
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <minutes> <gray>(Dopo il tempo fornito in minuti, la modalità manutenzione sarà attivata)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <timer minutes> <maintenance duration> <gray>(After the given time in minutes, maintenance mode will be enabled for the given duration in minutes)"
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.
+8 -8
View File
@@ -46,7 +46,7 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/Sponge
sentToWaitingServer: "<prefix><red>待機サーバーに転送されました!"
forceWaitingServer: "<prefix><red>メンテナンスが有効な間は、待機中のサーバーから離れることはできません。"
serverNotFound: "<prefix><red>この名前のサーバーはプロキシに登録されていません。"
@@ -78,9 +78,9 @@ helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MA
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)"
helpEndtimer: "<gold>/maintenance endtimer <minutes> <gray>(分単位で指定された時間が経過すると、メンテナンスモードは無効になります。)"
helpStarttimer: "<gold>/maintenance starttimer <minutes> <gray>(分単位で指定された時間経過後、メンテナンスモードが有効になります。)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <タイマーの時間> <メンテナンスの時間> <gray>(分単位で指定した時間が経過すると、分単位で指定した時間だけメンテナンスモードが有効になります。)"
helpDebug: "<gold>/maintenance debug <gray>(デバッグロギングを有効にします。)"
helpDump: "<gold>/maintenance dump <gray>(バグレポートに使用される、いくつかのサーバ情報をダンプします。)"
helpHelp: "<gold>/maintenance help [page] <gray>(このようなヘルプページが表示されます。)"
@@ -93,11 +93,11 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <minutes> <gray>(分単位で指定された時間が経過すると、メンテナンスモードは無効になります。)"
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <minutes> <gray>(分単位で指定された時間経過後、メンテナンスモードが有効になります。)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <タイマーの時間> <メンテナンスの時間> <gray>(分単位で指定した時間が経過すると、分単位で指定した時間だけメンテナンスモードが有効になります)"
helpSingleToggle: "<gold>/maintenance <on/off> [server] <gray>(メンテナンスモードの有効化/無効化を設定します。)"
helpStatus: "<gold>/maintenance status <gray>(現在メンテナンス中のプロキシサーバーをすべてリストアップします。)"
#Used for autoupdating the language file, do not change this value.
+8 -8
View File
@@ -46,7 +46,7 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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!"
@@ -78,9 +78,9 @@ helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MA
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)"
helpEndtimer: "<gold>/maintenance endtimer <minutes> <gray>(After the given time in minutes, maintenance mode will be disabled)"
helpStarttimer: "<gold>/maintenance starttimer <minutes> <gray>(After the given time in minutes, maintenance mode will be enabled)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <timer minutes> <maintenance duration> <gray>(After the given time in minutes, maintenance mode will be enabled for the given duration in minutes)"
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)"
@@ -93,11 +93,11 @@ helpUpdate: "<gold>/maintenance update <gray>(Remotely downloads the newest vers
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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <minutes> <gray>(After the given time in minutes, maintenance mode will be disabled)"
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <minutes> <gray>(After the given time in minutes, maintenance mode will be enabled)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <timer minutes> <maintenance duration> <gray>(After the given time in minutes, maintenance mode will be enabled for the given duration in minutes)"
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.
+8 -8
View File
@@ -46,7 +46,7 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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ą!"
@@ -78,9 +78,9 @@ helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MA
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)"
helpEndtimer: "<gold>/maintenance endtimer <minuty> <gray>(Po czasie podanym w minutach, tryb konserwacji zostanie wyłączony)"
helpStarttimer: "<gold>/maintenance starttimer <minuty> <gray>(Po czasie podanym w minutach, tryb konserwacji zostanie włączony)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <minuty timera> <długośc konserwacji> <gray>(Po czasie podanym w minutach, tryb konserwacji zostanie włączony na podaną ilość minut)"
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)"
@@ -93,11 +93,11 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [serwer] <minuty> <gray>(Po czasie podanym w minutach, tryb konserwacji zostanie wyłączony)"
helpSingleStarttimer: "<gold>/maintenance starttimer [serwer] <minuty> <gray>(Po czasie podanym w minutach, tryb konserwacji zostanie włączony)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [serwer] <minuty timera> <długośc konserwacji> <gray>(Po czasie podanym w minutach, tryb konserwacji zostanie włączony na podaną ilość minut)"
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.
+9 -9
View File
@@ -44,9 +44,9 @@ whitelistEmpty: "<prefix><red>A lista branca de manutenção está vazia! Use <y
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."
offlinePlayerFetchError: "<prefix><red>There was an error while fetching offline player. Please try again later."
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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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!"
@@ -78,9 +78,9 @@ helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MA
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)"
helpEndtimer: "<gold>/maintenance endtimer <minutos> <gray>(Após o tempo fornecido em minutos, o modo de manutenção será desativado)"
helpStarttimer: "<gold>/maintenance starttimer <minutos> <gray>(Após o tempo fornecido em minutos, o modo de manutenção será ativado)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <minutos do temporizador> <duração da manutenção> <gray>(Após o tempo fornecido em minutos, o modo de manutenção será ativado por uma duração fornecida em minutos)"
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)"
@@ -93,11 +93,11 @@ helpUpdate: "<gold>/maintenance update <gray>(Baixa remotamente a versão mais r
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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [servidor] <minutos> <gray>(Após o tempo fornecido em minutos, o modo de manutenção será desativado)"
helpSingleStarttimer: "<gold>/maintenance starttimer [servidor] <minutos> <gray>(Após o tempo fornecido em minutos, o modo de manutenção será ativado)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [servidor] <minutos do temporizador> <duração da manutenção> <gray>(Após o tempo fornecido em minutos, o modo de manutenção será ativado por uma duração fornecida em minutos)"
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.
+8 -8
View File
@@ -46,7 +46,7 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/Sponge
sentToWaitingServer: "<red>Вы были перемещены в лобби!"
forceWaitingServer: "<red>Вы не можете покинуть лобби во время технических работ!"
serverNotFound: "<red>Сервер не найден!"
@@ -78,9 +78,9 @@ helpHeader: "<gray>========[ <white>%NAME% <gray>| <gold>%PAGE%<white>/<gold>%MA
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)"
helpEndtimer: "<gold>/maintenance endtimer [время в минутах] <gray>- <white>Запустить таймер выключения режима технических работ."
helpStarttimer: "<gold>/maintenance starttimer [время в минутах] <gray>- <white>Запустить таймер включения режима технических работ."
helpScheduleTimer: "<gold>/maintenance scheduletimer <timer minutes> <maintenance duration> <gray>(After the given time in minutes, maintenance mode will be enabled for the given duration in minutes)"
helpDebug: "<gold>/maintenance debug <gray>(Enables some debug logging)"
helpDump: "<gold>/maintenance dump <gray>- <white>Создать дамп."
helpHelp: "<gold>/maintenance help [страница] <gray>- <white>Отобразить список доступных команд."
@@ -93,11 +93,11 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [сервер] [время в минутах] <gray>- <white>Запустить таймер выключения режима технических работ."
helpSingleStarttimer: "<gold>/maintenance starttimer [сервер] [время в минутах] <gray>- <white>Запустить таймер включения режима технических работ."
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <timer minutes> <maintenance duration> <gray>(After the given time in minutes, maintenance mode will be enabled for the given duration in minutes)"
helpSingleToggle: "<gold>/maintenance [on|off] [сервер] <gray>- <white>Включить/выключить режим технических работ."
helpStatus: "<gold>/maintenance status <gray>- <white>Список всех серверов закрытых на технические работы."
#Used for autoupdating the language file, do not change this value.
+8 -8
View File
@@ -46,7 +46,7 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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!"
@@ -78,9 +78,9 @@ helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MA
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)"
helpEndtimer: "<gold>/maintenance endtimer <minuter> <gray>(Efter den specificerade tiden i minuter, kommer underhållsläge avaktiveras)"
helpStarttimer: "<gold>/maintenance starttimer <minuter> <gray>(Efter den specificerade tiden i minuter, kommer underhållsläge att aktiveras)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <timer minuter> <maintenance duration> <gray>(Efter den specificerade tiden i minuter, kommer underhållsläge att aktiveras för den angivna varaktigheten i minuter)"
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)"
@@ -93,11 +93,11 @@ helpUpdate: "<gold>/maintenance update <gray>(Avlägset laddar ner senaste versi
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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <minuter> <gray>(Efter den angivna tiden kommer underhållsläge avaktiveras)"
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <minuter> <gray>(Efter den angivna tiden kommer underhållsläge aktiveras)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <timer minuter> <maintenance duration> <gray>(Efter den angivna tiden i minuter kommer underhållsläge vara aktiverat i den specificerade tiden)"
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.
+8 -8
View File
@@ -46,7 +46,7 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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!"
@@ -78,9 +78,9 @@ helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MA
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)"
helpEndtimer: "<gold>/maintenance endtimer <dakika> <gray>(Dakika olarak verilen süreden sonra bakım modu devre dışı bırakılır)"
helpStarttimer: "<gold>/maintenance starttimer <dakika> <gray>(Dakika olarak verilen süreden sonra bakım modu etkinleştirilecektir.)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <bakımın başlması için geçecek zaman> <bakım süresinin zamanı> <gray>(Dakika olarak verilen süreden sonra, dakika olarak verilen süre için bakım modu etkinleştirilecektir.)"
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)"
@@ -93,11 +93,11 @@ helpUpdate: "<gold>/maintenance update <gray>(Eklentinin en yeni sürümünü su
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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [sunucu] <dakika> <gray>(Dakika olarak verilen süreden sonra bakım modu devre dışı bırakılır)"
helpSingleStarttimer: "<gold>/maintenance starttimer [sunucu] <dakika> <gray>(Dakika olarak verilen süreden sonra bakım modu etkinleştirilecektir.)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [sunucu] <dakika> <maintenance duration> <gray>(Dakika olarak verilen süreden sonra, dakika olarak verilen süre için bakım modu etkinleştirilecektir.)"
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.
+8 -8
View File
@@ -46,7 +46,7 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/Sponge
sentToWaitingServer: "<red>Ви були переміщені у лобі!"
forceWaitingServer: "<red>Ви не можете залишити лобі під час технічних робіт!"
serverNotFound: "<red>Сервер не знайдено!"
@@ -78,9 +78,9 @@ helpHeader: "<gray>========[ <white>%NAME% <gray>| <gold>%PAGE%<white>/<gold>%MA
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)"
helpEndtimer: "<gold>/maintenance endtimer [час в хвилинах] <gray>- <white>Запустити таймер вимкнення режиму технічних робіт."
helpStarttimer: "<gold>/maintenance starttimer [час в хвилинах] <gray>- <white>Запустити таймер увімкнення режиму технічних робіт."
helpScheduleTimer: "<gold>/maintenance scheduletimer <timer minutes> <maintenance duration> <gray>(Через заданий час у хвилинах технічні роботи буде ввімкнено на заданий час у хвилинах)"
helpDebug: "<gold>/maintenance debug <gray>(Вмикає деяке журналювання налагодження)"
helpDump: "<gold>/maintenance dump <gray>- <white>Створити дамп."
helpHelp: "<gold>/maintenance help [сторінка] <gray>- <white>Відобразити список доступних команд."
@@ -93,11 +93,11 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [сервер] [время в минутах] <gray>- <white>Запустити таймер вимкнення режиму технічних робіт."
helpSingleStarttimer: "<gold>/maintenance starttimer [сервер] [время в минутах] <gray>- <white>Запустити таймер увімкнення режиму технічних робіт."
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <timer minutes> <maintenance duration> <gray>(Через заданий час у хвилинах технічні роботи буде ввімкнено на заданий час у хвилинах)"
helpSingleToggle: "<gold>/maintenance [on|off] [сервер] <gray>- <white>Увімкнути/вимкнути режим технічних робіт."
helpStatus: "<gold>/maintenance status <gray>- <white>Список всіх серверів, закритих на технічні роботи."
#Used for autoupdating the language file, do not change this value.
-104
View File
@@ -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
+8 -8
View File
@@ -46,7 +46,7 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/Sponge
sentToWaitingServer: "<prefix><red>您已被传送到等待服务器!"
forceWaitingServer: "<prefix><red>启用维护时,您不能离开等待服务器!"
serverNotFound: "<prefix><red>未找到拥有此名称的服务器!"
@@ -78,9 +78,9 @@ helpHeader: "<dark_gray>========[ <yellow>%NAME% <dark_gray>| <yellow>%PAGE%/%MA
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)"
helpEndtimer: "<gold>/maintenance endtimer <minutes> <gray>(在以分钟为单位给定时间后将关闭维护模式)"
helpStarttimer: "<gold>/maintenance starttimer <minutes> <gray>(在以分钟为单位给定时间后将开启维护模式)"
helpScheduleTimer: "<gold>/maintenance scheduletimer <timer minutes> <maintenance duration> <gray>(在指定的时间(以分钟为单位)之后,维护模式将在指定的持续时间(以分钟为单位)内开启)"
helpDebug: "<gold>/maintenance debug <gray>(Enables some debug logging)"
helpDump: "<gold>/maintenance dump <gray>(转储一些服务器信息,用于错误报告)"
helpHelp: "<gold>/maintenance help [page] <gray>(显示帮助信息)"
@@ -93,11 +93,11 @@ 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
#Messages for the Bungee/Velocity part, you can ignore them if you use the plugin on Spigot/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)"
helpSingleEndtimer: "<gold>/maintenance endtimer [server] <minutes> <gray>(在以分钟为单位给定时间后将关闭指定服务器的维护模式)"
helpSingleStarttimer: "<gold>/maintenance starttimer [server] <minutes> <gray>(在以分钟为单位给定时间后将开启指定服务器的维护模式)"
helpSingleScheduleTimer: "<gold>/maintenance scheduletimer [server] <timer minutes> <maintenance duration> <gray>(在指定的时间(以分钟为单位)之后,维护模式将在指定的持续时间(以分钟为单位)内开启)"
helpSingleToggle: "<gold>/maintenance <on/off> [server] <gray>(开启/关闭指定服务器的维护模式)"
helpStatus: "<gold>/maintenance status <gray>(列出当前正在维护的所有服务器)"
#Used for autoupdating the language file, do not change this value.
@@ -89,8 +89,7 @@ class ConfigTest {
final Config newestConfig = new Config(getTestFile("config.yml"));
newestConfig.load();
config.addMissingFields(newestConfig);
config.replaceComments(newestConfig);
config.addMissingFields(newestConfig.getValues(), newestConfig.getComments());
config.set("config-version", 4);
final File saveTo = getTestFile("dirty-config-upgraded.yml");
config.resetAwesomeHeader();
-1
View File
@@ -4,4 +4,3 @@ projectVersion=4.2.1
org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.parallel=true
org.gradle.configuration-cache=true
+5 -7
View File
@@ -3,11 +3,11 @@ metadata.format.version = "1.1"
[versions]
# Shaded
adventure = "4.17.0"
adventurePlatform = "4.3.4"
adventure = "4.14.0"
adventurePlatform = "4.3.0"
mysqlConnector = "8.0.33"
hikariCP = "4.0.3"
bstats = "3.0.3"
bstats = "3.0.2"
# Provided
gson = "2.8.8"
@@ -21,12 +21,11 @@ luckperms = "5.3"
serverlistplus = "3.5.0"
paper = "1.16.5-R0.1-SNAPSHOT"
bungee = "1.19.4-R0.1-SNAPSHOT"
bungee = "1.20-R0.1-SNAPSHOT"
sponge = "8.0.0"
velocity = "3.1.0"
junitVer = "5.11.0"
protocollibJarPath = "libs/ProtocolLib-5.0.jar"
junitVer = "5.9.2"
[libraries]
@@ -67,4 +66,3 @@ jupiterEngine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", ve
adventure = ["adventureApi", "adventureTextMinimessage", "adventureTextSerializerGson", "adventureTextSerializerLegacy"]
junit = ["jupiterApi", "jupiterEngine"]
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+5 -7
View File
@@ -15,8 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@@ -57,7 +55,7 @@
# 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
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -86,7 +84,7 @@ done
# 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
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -114,7 +112,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH="\\\"\\\""
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@@ -205,7 +203,7 @@ fi
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,
# * DEFAULT_JVM_OPTS, JAVA_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.
@@ -213,7 +211,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
Vendored
+2 -4
View File
@@ -13,8 +13,6 @@
@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 ##########################################################################
@@ -70,11 +68,11 @@ goto fail
:execute
@rem Setup the command line
set CLASSPATH=
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@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" %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
-339
View File
@@ -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.
@@ -1,73 +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.paper.listener;
import com.destroystokyo.paper.event.server.PaperServerListPingEvent;
import com.destroystokyo.paper.profile.PlayerProfile;
import eu.kennytv.maintenance.core.Settings;
import eu.kennytv.maintenance.paper.MaintenancePaperPlugin;
import eu.kennytv.maintenance.paper.util.ComponentUtil;
import java.util.List;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
public final class PaperServerListPingListener implements Listener {
private final MaintenancePaperPlugin plugin;
private final Settings settings;
public PaperServerListPingListener(final MaintenancePaperPlugin plugin, final Settings settings) {
this.plugin = plugin;
this.settings = settings;
}
@EventHandler(priority = EventPriority.HIGHEST)
public void serverListPing(final PaperServerListPingEvent event) {
if (!settings.isMaintenance()) {
return;
}
if (settings.isEnablePingMessages()) {
if (ComponentUtil.PAPER) {
event.motd(ComponentUtil.toPaperComponent(settings.getRandomPingMessage()));
} else {
event.setMotd(ComponentUtil.toLegacy(settings.getRandomPingMessage()));
}
}
if (settings.hasCustomPlayerCountMessage()) {
event.setProtocolVersion(-1);
event.setVersion(settings.getLegacyParsedPlayerCountMessage());
}
if (settings.hasCustomPlayerCountHoverMessage()) {
final List<PlayerProfile> sample = event.getPlayerSample();
sample.clear();
for (final String string : settings.getLegacyParsedPlayerCountHoverLines()) {
// Use Bukkit.createProfile so Paper's internal cast to CraftPlayerProfile succeeds.
sample.add(Bukkit.createProfile(UUID.randomUUID(), string));
}
}
if (settings.hasCustomIcon() && plugin.getFavicon() != null) {
event.setServerIcon(plugin.getFavicon());
}
}
}
+4 -3
View File
@@ -15,8 +15,8 @@ dependencyResolutionManagement {
pluginManagement {
plugins {
id("net.kyori.blossom") version "2.1.0"
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.9"
id("com.gradleup.shadow") version "8.3.9"
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7"
id("com.github.johnrengelman.shadow") version "8.1.1"
}
}
@@ -31,8 +31,9 @@ subproject("api")
subproject("api-proxy")
subproject("core")
subproject("core-proxy")
subproject("paper")
subproject("spigot")
subproject("sponge")
subproject("bungee")
subproject("velocity")
setupSubproject("maintenance") {
@@ -1,5 +1,3 @@
val protocollibJar = rootProject.layout.projectDirectory.file(libs.versions.protocollibJarPath.get()).asFile
dependencies {
implementation(projects.maintenanceCore)
implementation(projects.adventure.adventurePlatformBukkit) {
@@ -8,6 +6,5 @@ dependencies {
implementation(libs.bstatsBukkit)
compileOnly(libs.paper)
compileOnly(libs.authlib)
compileOnly(files(protocollibJar))
}
compileOnly(libs.protocollib)
}
@@ -15,7 +15,7 @@
* 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.paper;
package eu.kennytv.maintenance.spigot;
import eu.kennytv.maintenance.api.Maintenance;
import eu.kennytv.maintenance.core.MaintenanceBase;
@@ -24,12 +24,12 @@ import org.bukkit.plugin.java.JavaPlugin;
import java.io.File;
public final class MaintenancePaperBase extends JavaPlugin implements MaintenanceBase {
public final class MaintenanceSpigotBase extends JavaPlugin implements MaintenanceBase {
private MaintenancePlugin maintenance;
@Override
public void onEnable() {
maintenance = new MaintenancePaperPlugin(this);
maintenance = new MaintenanceSpigotPlugin(this);
}
@Override
@@ -15,7 +15,7 @@
* 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.paper;
package eu.kennytv.maintenance.spigot;
import eu.kennytv.maintenance.core.MaintenancePlugin;
import eu.kennytv.maintenance.core.Settings;
@@ -27,14 +27,15 @@ import eu.kennytv.maintenance.core.util.ServerType;
import eu.kennytv.maintenance.core.util.Task;
import eu.kennytv.maintenance.lib.kyori.adventure.platform.bukkit.BukkitAudiences;
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
import eu.kennytv.maintenance.paper.command.MaintenancePaperCommand;
import eu.kennytv.maintenance.paper.listener.PaperServerListPingListener;
import eu.kennytv.maintenance.paper.listener.PlayerLoginListener;
import eu.kennytv.maintenance.paper.listener.ServerInfoPacketListener;
import eu.kennytv.maintenance.paper.listener.ServerListPingListener;
import eu.kennytv.maintenance.paper.util.BukkitOfflinePlayerInfo;
import eu.kennytv.maintenance.paper.util.BukkitTask;
import eu.kennytv.maintenance.paper.util.ComponentUtil;
import eu.kennytv.maintenance.spigot.command.MaintenanceSpigotCommand;
import eu.kennytv.maintenance.spigot.listener.PaperServerListPingListener;
import eu.kennytv.maintenance.spigot.listener.PlayerLoginListener;
import eu.kennytv.maintenance.spigot.listener.ServerInfoPacketListener;
import eu.kennytv.maintenance.spigot.listener.ServerListPingListener;
import eu.kennytv.maintenance.spigot.util.BukkitOfflinePlayerInfo;
import eu.kennytv.maintenance.spigot.util.BukkitSenderInfo;
import eu.kennytv.maintenance.spigot.util.BukkitTask;
import eu.kennytv.maintenance.spigot.util.ComponentUtil;
import java.io.File;
import java.io.InputStream;
import java.util.Arrays;
@@ -44,6 +45,10 @@ import java.util.concurrent.CompletableFuture;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import javax.imageio.ImageIO;
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 org.bstats.bukkit.Metrics;
import org.bukkit.OfflinePlayer;
import org.bukkit.Server;
@@ -54,13 +59,13 @@ import org.bukkit.plugin.PluginManager;
import org.bukkit.util.CachedServerIcon;
import org.jetbrains.annotations.Nullable;
public final class MaintenancePaperPlugin extends MaintenancePlugin {
public final class MaintenanceSpigotPlugin extends MaintenancePlugin {
private static final boolean FOLIA = hasClass("io.papermc.paper.threadedregions.RegionizedServer");
private final MaintenancePaperBase plugin;
private final MaintenanceSpigotBase plugin;
private final BukkitAudiences audiences;
private CachedServerIcon favicon;
MaintenancePaperPlugin(final MaintenancePaperBase plugin) {
MaintenanceSpigotPlugin(final MaintenanceSpigotBase plugin) {
super(plugin.getDescription().getVersion(), ServerType.SPIGOT);
this.plugin = plugin;
this.audiences = BukkitAudiences.create(plugin);
@@ -69,7 +74,7 @@ public final class MaintenancePaperPlugin extends MaintenancePlugin {
sendEnableMessage();
final MaintenancePaperCommand command = new MaintenancePaperCommand(this, settings);
final MaintenanceSpigotCommand command = new MaintenanceSpigotCommand(this, settings);
commandManager = command;
plugin.getCommand("maintenance").setExecutor(command);
@@ -82,22 +87,19 @@ public final class MaintenancePaperPlugin extends MaintenancePlugin {
pm.registerEvents(new ServerInfoPacketListener(this, plugin, settings), plugin);
} else {
pm.registerEvents(new ServerListPingListener(this, settings), plugin);
getLogger().warning("To use this plugin on Spigot to its full extent, you need the plugin ProtocolLib!");
getLogger().warning("To use this plugin on Spigot to its full extend, you need the plugin ProtocolLib!");
}
continueLastEndtimer();
new Metrics(plugin, 2205);
Plugin serverListPlugin = pm.getPlugin("AdvancedServerList-OG");
if (serverListPlugin == null) {
serverListPlugin = pm.getPlugin("ServerListPlus");
}
if (pm.isPluginEnabled(serverListPlugin)) {
serverListPlusHook = new ServerListPlusHook(serverListPlugin);
final Plugin serverListPlus = pm.getPlugin("ServerListPlus");
if (pm.isPluginEnabled(serverListPlus)) {
serverListPlusHook = new ServerListPlusHook(serverListPlus);
if (settings.isEnablePingMessages()) {
serverListPlusHook.setEnabled(!settings.isMaintenance());
}
plugin.getLogger().info("Enabled server list plugin integration");
plugin.getLogger().info("Enabled ServerListPlus integration");
}
if (false && pm.isPluginEnabled("LuckPerms")) {
@@ -169,6 +171,18 @@ public final class MaintenancePaperPlugin extends MaintenancePlugin {
audiences.all().sendMessage(component);
}
@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: §6" + HANGAR_URL));
final TextComponent click = new TextComponent(TextComponent.fromLegacyText(" §7§l§o(CLICK ME)"));
click.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, HANGAR_URL));
click.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§aDownload the latest version").create()));
tc1.addExtra(tc2);
tc1.addExtra(click);
((BukkitSenderInfo) sender).sendMessage(tc1, getPrefix() + "§cDownload it at: §6" + HANGAR_URL);
}
@Override
protected void kickPlayers() {
for (final Player p : getServer().getOnlinePlayers()) {
@@ -15,21 +15,26 @@
* 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.paper.command;
package eu.kennytv.maintenance.spigot.command;
import eu.kennytv.maintenance.core.Settings;
import eu.kennytv.maintenance.core.command.MaintenanceCommand;
import eu.kennytv.maintenance.paper.MaintenancePaperPlugin;
import eu.kennytv.maintenance.paper.util.BukkitSenderInfo;
import java.util.List;
import eu.kennytv.maintenance.core.util.SenderInfo;
import eu.kennytv.maintenance.spigot.MaintenanceSpigotPlugin;
import eu.kennytv.maintenance.spigot.util.BukkitSenderInfo;
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 org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
public final class MaintenancePaperCommand extends MaintenanceCommand implements CommandExecutor, TabCompleter {
import java.util.List;
public MaintenancePaperCommand(final MaintenancePaperPlugin plugin, final Settings settings) {
public final class MaintenanceSpigotCommand extends MaintenanceCommand implements CommandExecutor, TabCompleter {
public MaintenanceSpigotCommand(final MaintenanceSpigotPlugin plugin, final Settings settings) {
super(plugin, settings);
registerCommands();
}
@@ -44,4 +49,12 @@ public final class MaintenancePaperCommand extends MaintenanceCommand implements
public List<String> onTabComplete(final CommandSender sender, final Command command, final String alias, final String[] args) {
return getSuggestions(new BukkitSenderInfo(sender), args);
}
@Override
public void sendDumpMessage(final SenderInfo sender, final String url) {
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")));
((BukkitSenderInfo) sender).sendMessage(clickText, null);
}
}
@@ -0,0 +1,173 @@
/*
* 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.spigot.listener;
import com.destroystokyo.paper.event.server.PaperServerListPingEvent;
import com.destroystokyo.paper.profile.PlayerProfile;
import com.destroystokyo.paper.profile.ProfileProperty;
import com.mojang.authlib.GameProfile;
import eu.kennytv.maintenance.core.Settings;
import eu.kennytv.maintenance.spigot.MaintenanceSpigotPlugin;
import eu.kennytv.maintenance.spigot.util.ComponentUtil;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
public final class PaperServerListPingListener implements Listener {
private final MaintenanceSpigotPlugin plugin;
private final Settings settings;
public PaperServerListPingListener(final MaintenanceSpigotPlugin plugin, final Settings settings) {
this.plugin = plugin;
this.settings = settings;
}
@EventHandler(priority = EventPriority.HIGHEST)
public void serverListPing(final PaperServerListPingEvent event) {
if (!settings.isMaintenance()) {
return;
}
if (settings.isEnablePingMessages()) {
if (ComponentUtil.PAPER) {
event.motd(ComponentUtil.toPaperComponent(settings.getRandomPingMessage()));
} else {
event.setMotd(ComponentUtil.toLegacy(settings.getRandomPingMessage()));
}
}
if (settings.hasCustomPlayerCountMessage()) {
event.setProtocolVersion(-1);
event.setVersion(settings.getLegacyParsedPlayerCountMessage());
}
if (settings.hasCustomPlayerCountHoverMessage()) {
final List<PlayerProfile> sample = event.getPlayerSample();
sample.clear();
for (final String string : settings.getLegacyParsedPlayerCountHoverLines()) {
sample.add(new DummyProfile(string));
}
}
if (settings.hasCustomIcon() && plugin.getFavicon() != null) {
event.setServerIcon(plugin.getFavicon());
}
}
// Less unnecessary object creation :>
private static final class DummyProfile implements PlayerProfile {
private final String name;
private DummyProfile(final String name) {
this.name = name;
}
@Nullable
@Override
public String getName() {
return name;
}
@Override
public String setName(@Nullable final String name) {
return this.name;
}
@Nullable
@Override
public UUID getId() {
return null;
}
@Override
public UUID setId(@Nullable final UUID uuid) {
return null;
}
@Nonnull
@Override
public Set<ProfileProperty> getProperties() {
return Collections.emptySet();
}
@Override
public boolean hasProperty(final String property) {
return false;
}
@Override
public void setProperty(final ProfileProperty property) {
}
@Override
public void setProperties(final Collection<ProfileProperty> properties) {
}
@Override
public boolean removeProperty(final String property) {
return false;
}
@Override
public void clearProperties() {
}
@Override
public boolean isComplete() {
return false;
}
@Override
public boolean completeFromCache() {
return false;
}
@Override
public boolean completeFromCache(final boolean b) {
return false;
}
@Override
public boolean completeFromCache(final boolean b, final boolean b1) {
return false;
}
@Override
public boolean complete(final boolean textures) {
return false;
}
@Override
public boolean complete(final boolean b, final boolean b1) {
return false;
}
// Keep this here for backwards compatibility
@SuppressWarnings("unused")
public GameProfile getGameProfile() {
return null;
}
}
}
@@ -15,22 +15,22 @@
* 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.paper.listener;
package eu.kennytv.maintenance.spigot.listener;
import eu.kennytv.maintenance.core.Settings;
import eu.kennytv.maintenance.core.listener.JoinListenerBase;
import eu.kennytv.maintenance.paper.MaintenancePaperPlugin;
import eu.kennytv.maintenance.paper.util.BukkitSenderInfo;
import eu.kennytv.maintenance.paper.util.ComponentUtil;
import eu.kennytv.maintenance.spigot.MaintenanceSpigotPlugin;
import eu.kennytv.maintenance.spigot.util.BukkitSenderInfo;
import eu.kennytv.maintenance.spigot.util.ComponentUtil;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerLoginEvent;
public final class PlayerLoginListener extends JoinListenerBase implements Listener {
private final MaintenancePaperPlugin plugin;
private final MaintenanceSpigotPlugin plugin;
public PlayerLoginListener(final MaintenancePaperPlugin plugin, final Settings settings) {
public PlayerLoginListener(final MaintenanceSpigotPlugin plugin, final Settings settings) {
super(plugin, settings);
this.plugin = plugin;
}
@@ -15,7 +15,7 @@
* 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.paper.listener;
package eu.kennytv.maintenance.spigot.listener;
import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.ProtocolLibrary;
@@ -25,9 +25,9 @@ import com.comphenix.protocol.events.PacketEvent;
import com.comphenix.protocol.wrappers.WrappedGameProfile;
import com.comphenix.protocol.wrappers.WrappedServerPing;
import eu.kennytv.maintenance.core.Settings;
import eu.kennytv.maintenance.paper.MaintenancePaperBase;
import eu.kennytv.maintenance.paper.MaintenancePaperPlugin;
import eu.kennytv.maintenance.paper.util.ComponentUtil;
import eu.kennytv.maintenance.spigot.MaintenanceSpigotBase;
import eu.kennytv.maintenance.spigot.MaintenanceSpigotPlugin;
import eu.kennytv.maintenance.spigot.util.ComponentUtil;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
@@ -38,10 +38,10 @@ import org.bukkit.event.server.ServerListPingEvent;
public final class ServerInfoPacketListener extends PacketAdapter implements Listener {
private static final UUID ZERO_UUID = new UUID(0, 0);
private final MaintenancePaperPlugin plugin;
private final MaintenanceSpigotPlugin plugin;
private final Settings settings;
public ServerInfoPacketListener(final MaintenancePaperPlugin plugin, final MaintenancePaperBase base, final Settings settings) {
public ServerInfoPacketListener(final MaintenanceSpigotPlugin plugin, final MaintenanceSpigotBase base, final Settings settings) {
super(base, ListenerPriority.HIGHEST, PacketType.Status.Server.SERVER_INFO);
this.plugin = plugin;
this.settings = settings;
@@ -15,21 +15,21 @@
* 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.paper.listener;
package eu.kennytv.maintenance.spigot.listener;
import eu.kennytv.maintenance.core.Settings;
import eu.kennytv.maintenance.paper.MaintenancePaperPlugin;
import eu.kennytv.maintenance.paper.util.ComponentUtil;
import eu.kennytv.maintenance.spigot.MaintenanceSpigotPlugin;
import eu.kennytv.maintenance.spigot.util.ComponentUtil;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.server.ServerListPingEvent;
public final class ServerListPingListener implements Listener {
private final MaintenancePaperPlugin plugin;
private final MaintenanceSpigotPlugin plugin;
private final Settings settings;
public ServerListPingListener(final MaintenancePaperPlugin plugin, final Settings settings) {
public ServerListPingListener(final MaintenanceSpigotPlugin plugin, final Settings settings) {
this.plugin = plugin;
this.settings = settings;
}
@@ -15,7 +15,7 @@
* 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.paper.util;
package eu.kennytv.maintenance.spigot.util;
import eu.kennytv.maintenance.core.util.SenderInfo;
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
@@ -45,6 +45,10 @@ public final class BukkitOfflinePlayerInfo implements SenderInfo {
return false;
}
@Override
public void sendMessage(final String message) {
}
@Override
public void send(final Component component) {
}
@@ -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.paper.util;
package eu.kennytv.maintenance.spigot.util;
import eu.kennytv.maintenance.api.MaintenanceProvider;
import eu.kennytv.maintenance.core.util.SenderInfo;
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
import eu.kennytv.maintenance.paper.MaintenancePaperPlugin;
import java.util.UUID;
import eu.kennytv.maintenance.spigot.MaintenanceSpigotPlugin;
import net.md_5.bungee.api.chat.TextComponent;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import java.util.UUID;
public final class BukkitSenderInfo implements SenderInfo {
private final CommandSender sender;
@@ -48,13 +50,28 @@ public final class BukkitSenderInfo implements SenderInfo {
return sender.hasPermission(permission);
}
@Override
public void sendMessage(final String message) {
sender.sendMessage(message);
}
@Override
public void send(final Component component) {
((MaintenancePaperPlugin) MaintenanceProvider.get()).audiences().sender(sender).sendMessage(component);
((MaintenanceSpigotPlugin) MaintenanceProvider.get()).audiences().sender(sender).sendMessage(component);
}
@Override
public boolean isPlayer() {
return sender instanceof Player;
}
public void sendMessage(final TextComponent textComponent, final String backup) {
try {
sender.spigot().sendMessage(textComponent);
} catch (final NoSuchMethodError ignored) {
if (backup != null) {
sender.sendMessage(backup);
}
}
}
}
@@ -15,7 +15,7 @@
* 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.paper.util;
package eu.kennytv.maintenance.spigot.util;
import eu.kennytv.maintenance.core.util.Task;
import org.bukkit.Bukkit;
@@ -15,7 +15,7 @@
* 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.paper.util;
package eu.kennytv.maintenance.spigot.util;
import com.google.gson.JsonElement;
import eu.kennytv.maintenance.lib.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
@@ -1,9 +1,9 @@
name: Maintenance
version: ${version}
main: eu.kennytv.maintenance.paper.MaintenancePaperBase
main: eu.kennytv.maintenance.spigot.MaintenanceSpigotBase
author: kennytv
description: ${description}
softdepend: [ProtocolLib, AdvancedServerList-OG, ProtocolSupport, LuckPerms]
softdepend: [ProtocolLib, ServerListPlus, ProtocolSupport, LuckPerms]
website: https://hangar.papermc.io/kennytv/Maintenance
api-version: 1.13
folia-supported: true
@@ -36,17 +36,9 @@ import eu.kennytv.maintenance.sponge.util.LoggerWrapper;
import eu.kennytv.maintenance.sponge.util.SpongePlayer;
import eu.kennytv.maintenance.sponge.util.SpongeTask;
import eu.kennytv.maintenance.sponge.util.SpongeUser;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import javax.imageio.ImageIO;
import net.kyori.adventure.text.event.ClickEvent;
import net.kyori.adventure.text.event.HoverEvent;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import org.bstats.sponge.Metrics;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.api.Game;
@@ -68,14 +60,23 @@ import org.spongepowered.plugin.builtin.jvm.Plugin;
import org.spongepowered.plugin.metadata.PluginMetadata;
import org.spongepowered.plugin.metadata.model.PluginContributor;
import javax.imageio.ImageIO;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.file.Path;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;
import java.util.stream.Collectors;
@Plugin("maintenance")
public final class MaintenanceSpongePlugin extends MaintenancePlugin {
private static final String[] UNSUPPORTED_FIELDS = {
"mysql", "proxied-maintenance-servers", "fallback", "waiting-server",
"playercountmessage", "enable-timerspecific-playercountmessage", "timer-playercountmessage",
"commands-on-single-maintenance-enable", "commands-on-single-maintenance-disable",
};
@SuppressWarnings("SpongeLogging")
private final Logger logger;
private final PluginContainer container;
@@ -97,8 +98,8 @@ public final class MaintenanceSpongePlugin extends MaintenancePlugin {
@Listener
public void onEnable(final StartingEngineEvent<Server> event) {
settings = new Settings(this, UNSUPPORTED_FIELDS);
settings = new Settings(this, "mysql", "proxied-maintenance-servers", "fallback", "waiting-server",
"playercountmessage", "commands-on-single-maintenance-enable", "commands-on-single-maintenance-disable");
sendEnableMessage();
@@ -163,6 +164,20 @@ public final class MaintenanceSpongePlugin extends MaintenancePlugin {
game.server().sendMessage(ComponentUtil.toSponge(component));
}
@Override
public void sendUpdateNotification(final SenderInfo sender) {
try {
final net.kyori.adventure.text.Component component = net.kyori.adventure.text.Component.text().append(translate(getPrefix()))
.append(translate("§cDownload it at: §6" + HANGAR_URL))
.append(translate(" §7§l§o(CLICK ME)"))
.clickEvent(ClickEvent.openUrl(new URL(HANGAR_URL)))
.hoverEvent(HoverEvent.showText(translate("§7§l§o(CLICK ME)"))).build();
((SpongePlayer) sender).send(component);
} catch (final MalformedURLException e) {
e.printStackTrace();
}
}
@Override
public CompletableFuture<@Nullable SenderInfo> getOfflinePlayer(final String name) {
final Optional<ServerPlayer> player = game.server().player(name);
@@ -258,4 +273,9 @@ public final class MaintenanceSpongePlugin extends MaintenancePlugin {
public Favicon getFavicon() {
return favicon;
}
@Deprecated
public net.kyori.adventure.text.Component translate(final String s) {
return LegacyComponentSerializer.legacySection().deserialize(s);
}
}
@@ -19,13 +19,12 @@ package eu.kennytv.maintenance.sponge.command;
import eu.kennytv.maintenance.core.Settings;
import eu.kennytv.maintenance.core.command.MaintenanceCommand;
import eu.kennytv.maintenance.core.util.SenderInfo;
import eu.kennytv.maintenance.sponge.MaintenanceSpongePlugin;
import eu.kennytv.maintenance.sponge.util.SpongeSenderInfo;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.event.ClickEvent;
import net.kyori.adventure.text.event.HoverEvent;
import org.spongepowered.api.command.Command;
import org.spongepowered.api.command.CommandCause;
import org.spongepowered.api.command.CommandCompletion;
@@ -33,6 +32,11 @@ import org.spongepowered.api.command.CommandResult;
import org.spongepowered.api.command.parameter.ArgumentReader;
import org.spongepowered.api.entity.living.player.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
public final class MaintenanceSpongeCommand extends MaintenanceCommand implements Command.Raw {
private final MaintenanceSpongePlugin plugin;
private static final String[] EMPTY = new String[0];
@@ -82,6 +86,13 @@ public final class MaintenanceSpongeCommand extends MaintenanceCommand implement
return null;
}
@Override
public void sendDumpMessage(final SenderInfo sender, final String url) {
final SpongeSenderInfo spongeSender = ((SpongeSenderInfo) sender);
spongeSender.send(Component.text().append(plugin.translate(plugin.getPrefix() + "§7Click here to copy the link")).clickEvent(ClickEvent.suggestCommand(url))
.hoverEvent(HoverEvent.showText(plugin.translate("§aClick here to copy the link"))).build());
}
@Override
public List<String> getPlayersCompletion() {
final List<String> list = new ArrayList<>();
@@ -19,9 +19,12 @@ package eu.kennytv.maintenance.sponge.util;
import eu.kennytv.maintenance.core.util.SenderInfo;
import eu.kennytv.maintenance.lib.kyori.adventure.text.Component;
import java.util.UUID;
import eu.kennytv.maintenance.lib.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import net.kyori.adventure.identity.Identity;
import org.spongepowered.api.entity.living.player.server.ServerPlayer;
import java.util.UUID;
public final class SpongePlayer implements SenderInfo {
private final ServerPlayer player;
@@ -44,13 +47,19 @@ public final class SpongePlayer implements SenderInfo {
return player.hasPermission(permission);
}
@Override
@Deprecated
public void sendMessage(final String message) {
send(LegacyComponentSerializer.legacySection().deserialize(message));
}
@Override
public void send(final Component component) {
player.sendMessage(ComponentUtil.toSponge(component));
player.sendMessage(Identity.nil(), ComponentUtil.toSponge(component));
}
public void send(final net.kyori.adventure.text.Component component) {
player.sendMessage(component);
player.sendMessage(Identity.nil(), component);
}
@Override
@@ -49,6 +49,12 @@ public final class SpongeSenderInfo implements SenderInfo {
return cause.hasPermission(permission);
}
@Override
@Deprecated
public void sendMessage(final String message) {
send(LegacyComponentSerializer.legacySection().deserialize(message));
}
@Override
public void send(final Component component) {
cause.sendMessage(Identity.nil(), ComponentUtil.toSponge(component));
Loaded 100 of 106 files, more files were not shown because too many files have changed in this diff. Show more