Commit Graph

1302 Commits

Author SHA1 Message Date
Ben Woo
f1a9d3a723
Merge remote-tracking branch 'origin/MV5' into revamp-config 2023-03-22 22:53:50 +08:00
Ben Woo
9ae2cddfda
refactor: Flip boolean for custom portal search config 2023-03-22 22:53:16 +08:00
Ben Woo
6cc169cb55
feat: Fully replace with new config api 2023-03-22 22:48:24 +08:00
Ben Woo
783038ffb4
feat: Implement get/set methods from previous MVConfig class 2023-03-18 23:27:57 +08:00
Ben Woo
db0e9f3142
feat: Implement migration from old mv config.yml 2023-03-18 23:09:10 +08:00
Zax71
95c3b034ec
feat: Add PlaceholderAPI Support (#2888)
* feat:Add PlaceholderAPI Support

Signed-off-by: zax71 <zabax32@gmail.com>

* Implement requested changes

Signed-off-by: zax71 <zabax32@gmail.com>

* Add separate world functionality and half-baked i18n support.

Signed-off-by: zax71 <zabax32@gmail.com>

* refactor: Simplify papi world parsing

* Fix spelling and remove unused i18n.

Signed-off-by: zax71 <zabax32@gmail.com>

* chore: Add warnings

* chore: Remove unused imports

* chore: Setup papi before log enable message

---------

Signed-off-by: zax71 <zabax32@gmail.com>
Co-authored-by: Ben Woo <30431861+benwoo1110@users.noreply.github.com>
2023-03-16 20:18:36 +08:00
Ben Woo
9ce648d06a
refactor: Version migrator code 2023-03-16 11:18:31 +08:00
Jeremy Wood
0601c05761
Revert "Simplify PluginInjection by removing unneeded population."
This reverts commit f7bd538049.
2023-03-12 00:02:46 -05:00
Jeremy Wood
c6a2cee050
Add automatic destination registration through DestinationFeature. 2023-03-11 23:56:49 -05:00
Jeremy Wood
0c97aea3dc
Add automatic command registration through BaseCommandFeature. 2023-03-11 23:46:15 -05:00
Jeremy Wood
7dcada0c2d
MultiverseCore#getAllServices should not instantiate services. 2023-03-11 23:37:03 -05:00
Jeremy Wood
d03063f2b9
Add automatic listener registration through ListenerFeature. 2023-03-11 12:30:09 -05:00
Jeremy Wood
485d2428ed
Rename PluginService to AutoLoadedService. 2023-03-11 11:40:37 -05:00
Jeremy Wood
b2171717ad
Add API for creating auto-registering services. 2023-03-11 11:37:33 -05:00
Jeremy Wood
49c23d31b0
MultiverseCore#getService should not instantiate services. 2023-03-11 11:24:24 -05:00
Jeremy Wood
f7bd538049
Simplify PluginInjection by removing unneeded population. 2023-03-11 11:05:35 -05:00
Jeremy Wood
9f650d683d
Add PluginService and InjectionFeature loading. 2023-03-10 02:07:44 -05:00
Jeremy Wood
b40ded9806
Fix relocations and exported maven dependencies. 2023-03-09 15:57:55 -05:00
Jeremy Wood
93b82ae825
Inject MVCoreConfigProvider directly into MultiverseCore. 2023-03-09 11:34:41 -05:00
Jeremy Wood
ecec80dfe3
Correctly rename hk2 metadata file. 2023-03-09 11:31:32 -05:00
Jeremy Wood
2f1a3bcc22
Use Provider for MVCoreConfigProvider in MultiverseCore. 2023-03-09 09:24:55 -05:00
Jeremy Wood
1ea88615c7
Don't rename hk2 metadata file. 2023-03-09 09:05:03 -05:00
Jeremy Wood
7fe50d2171
Temporarily throw exception on enable to reveal testing issue. 2023-03-09 08:53:37 -05:00
Jeremy Wood
a81e045598
Use getter in MultiverseCore for config provider. 2023-03-09 08:52:51 -05:00
Jeremy Wood
0f1d1adeb2
Remove Service/Contract from MVConfig and impl. 2023-03-09 08:49:29 -05:00
Jeremy Wood
686c4a4b16
Simplify config provider usage. 2023-03-08 23:02:17 -05:00
Jeremy Wood
7fc78d81bc
Remove faulty javadoc from CannonDestination. 2023-03-08 13:48:03 -05:00
Jeremy Wood
47002061db
Remove some unused imports. 2023-03-08 13:37:41 -05:00
Jeremy Wood
1ea6df4a27
Merge remote-tracking branch 'origin/MV5' into dumptruckman/inject
# Conflicts:
#	src/main/java/com/onarandombox/MultiverseCore/MultiverseCore.java
#	src/main/java/com/onarandombox/MultiverseCore/commands/CheckCommand.java
#	src/main/java/com/onarandombox/MultiverseCore/commands/CloneCommand.java
#	src/main/java/com/onarandombox/MultiverseCore/commands/DeleteCommand.java
#	src/main/java/com/onarandombox/MultiverseCore/commands/GameruleCommand.java
#	src/main/java/com/onarandombox/MultiverseCore/commands/ImportCommand.java
#	src/main/java/com/onarandombox/MultiverseCore/commands/LoadCommand.java
#	src/main/java/com/onarandombox/MultiverseCore/commands/RegenCommand.java
#	src/main/java/com/onarandombox/MultiverseCore/commands/ReloadCommand.java
#	src/main/java/com/onarandombox/MultiverseCore/commands/RemoveCommand.java
#	src/main/java/com/onarandombox/MultiverseCore/commands/RootCommand.java
#	src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java
#	src/main/java/com/onarandombox/MultiverseCore/commands/UnloadCommand.java
2023-03-08 13:32:59 -05:00
Jeremy Wood
23693835ca
Remove PluginDataFolder. 2023-03-08 13:19:31 -05:00
Jeremy Wood
8e7e0ef566
Replace all service getters with DI. 2023-03-08 13:16:18 -05:00
Jeremy Wood
dd93223eb1
Use DI for command classes. 2023-03-08 08:43:40 -05:00
Jeremy Wood
e6f304fd25
Use specific dependencies in SimpleMVWorldManager and SimpleMVWorld. 2023-03-08 07:39:18 -05:00
Jeremy Wood
b6a0d272df
Use specific dependencies in UnsafeCallWrapper. 2023-03-07 19:02:11 -05:00
Jeremy Wood
177adf80cb
Use specific dependencies in SimpleSafeTTeleporter. 2023-03-07 19:00:06 -05:00
Jeremy Wood
160f49bbae
Use specific dependencies in MVPermissions. 2023-03-07 18:54:33 -05:00
Jeremy Wood
397101f712
Use specific dependencies in DestinationsProvider. 2023-03-07 18:49:13 -05:00
Jeremy Wood
d1f59e3d86
Use specific dependencies in SimpleBlockSafety. 2023-03-07 18:40:37 -05:00
Jeremy Wood
bab0ccd3f2
Use specific dependencies in AnchorManager. 2023-03-07 17:00:24 -05:00
Jeremy Wood
015c58421d
Add MVCoreConfigProvider#getConfigUnsafe. 2023-03-07 16:58:29 -05:00
Jeremy Wood
a57a83a047
Add injectable wrapper for plugin data folder. 2023-03-07 16:49:14 -05:00
Jeremy Wood
6362a97aaf
Move configuration loading/saving into injectable MVCoreConfigProvider. 2023-03-07 16:10:34 -05:00
Jeremy Wood
0db90dc0b9
Set up DI for primary dependencies of MultiverseCore. 2023-03-07 14:39:11 -05:00
Jeremy Wood
6a434746c9
Also bind plugin logger in PluginBinder. 2023-03-07 14:16:58 -05:00
Ben Woo
c76652f0a2
feat: Test out new commentedconfiguration 2023-03-07 23:33:35 +08:00
Jeremy Wood
de6b25db35
Also bind MultiverseCore to MVCore and MVPlugin. 2023-03-07 02:24:00 -05:00
Jeremy Wood
40637e6a88
Enable basic dependency injection. 2023-03-07 01:59:48 -05:00
Jeremy Wood
7ad0b04787
Abstract TestWithMockBukkit out of MockBukkitTest. 2023-03-07 00:20:26 -05:00
Lildirt
1f1c8240d9 i18n: move RootCommand further down 2023-03-05 13:00:31 -05:00
Lildirt
eaa8b1ee56 i18n: last bit of colorizing 2023-03-03 12:23:50 -05:00
Lildirt
10c910f00f i18n: fix prompt message mappings 2023-03-03 12:23:43 -05:00
Lildirt
3bd6712f0e i18n: Move mv-core.debug 2023-03-03 12:23:36 -05:00
Lildirt
6a5e8d2522 i18n: Register root command 2023-03-03 12:23:11 -05:00
Lildirt
1dadaa1a73 i18n: use error message levels 2023-03-03 12:23:11 -05:00
Lildirt
ef3a50f32b i18n: section out the string file with comments 2023-03-03 12:22:58 -05:00
Lildirt
ac31a66a45 i18n: Preserve original string colorization. 2023-03-03 12:22:58 -05:00
Lildirt
992ce7cff5 i18n: more sections & missing confirm description 2023-03-03 12:22:58 -05:00
Lildirt
fd237243a4 i18n: Usage command 2023-03-03 12:22:58 -05:00
Lildirt
0512fa1820 i18n: Unload command 2023-03-03 12:22:58 -05:00
Lildirt
a9896df2a7 i18n: Teleport command 2023-03-03 12:22:58 -05:00
Lildirt
216adf5fa9 i18n: MV Root command 2023-03-03 12:22:58 -05:00
Lildirt
12f6ceb622 i18n: Remove command 2023-03-03 12:22:58 -05:00
Lildirt
ca0f6febb5 i18n: Reload command 2023-03-03 12:22:58 -05:00
Lildirt
3e468dba4d i18n: Regen command 2023-03-03 12:22:58 -05:00
Lildirt
8b450910ba i18n: Load command 2023-03-03 12:22:58 -05:00
Lildirt
38002261b7 i18n: Import command 2023-03-03 12:22:58 -05:00
Lildirt
9e5fb2cf4b i18n: Gamerule command 2023-03-03 12:22:58 -05:00
Lildirt
fa0e9f4268 i18n: Delete command 2023-03-03 12:22:58 -05:00
Lildirt
5e4e925bb1 i18n: Clone command 2023-03-03 12:21:19 -05:00
Lildirt
c9bb6180bd i18n: Check command 2023-03-03 12:21:14 -05:00
Ben Woo
3f6c3047d8
fix: Restore locales setup method (#2881) 2023-03-03 22:23:39 +08:00
Jeremy Wood
a4e84ad581
Use ServerMock instead of Server. 2023-03-02 08:36:43 -05:00
Jeremy Wood
65cb3f7037
Put test method after tearDown. 2023-03-02 08:35:52 -05:00
Jeremy Wood
fc7509cca6
Use a better test method name. 2023-03-02 08:35:30 -05:00
Jeremy Wood
eebb4a4a6d
Implement initial test using MockBukkit. 2023-03-02 02:22:47 -05:00
Jeremy Wood
87225b1c65
Move old tests to old-test. 2023-03-02 01:20:38 -05:00
Ben Woo
974afb4751
feat: Implement help command 2023-02-28 23:16:09 +08:00
Ben Woo
7dbd29b838
refactor: Shift classes and add javadocs 2023-02-28 23:07:19 +08:00
Ben Woo
560e3ab201
refactor: Make FileResClassLoader usable for other file paths. 2023-02-28 23:07:19 +08:00
Ben Woo
ffc4c600c5
feat: Enable per player locale support 2023-02-28 23:07:18 +08:00
Ben Woo
44904eaef4
feat: Allow for custom locale folder path 2023-02-28 23:07:18 +08:00
Ben Woo
47a92deffd
refactor: Use '&' for chat color formatting 2023-02-28 23:07:17 +08:00
Ben Woo
b4549c6791
feat: Add support for loading locales from plugin dir 2023-02-28 23:07:17 +08:00
Ben Woo
ec254c2989 build: Make MV5 build with gradle 2023-02-20 20:29:08 +08:00
Ben Woo
36549294b7 Merge branch 'main' into gradle-build 2023-02-20 20:25:47 +08:00
Jeremy Wood
4d40b3f7e4
Switch from Maven to Gradle. 2023-02-19 19:02:52 -05:00
Ben Woo
20ba6f130a feat: Implement remove and import command (#2839)
* feat: Implement remove and import command

* chore: Improve some description strings
2023-02-18 14:03:05 +08:00
Ben Woo
d8fff0ae15 chore: Up protocol version to 50 2023-02-18 14:03:04 +08:00
Ben Woo
3da1b7e8c4 refactor: Remove AbstractMVPlugin entirely 2023-02-16 11:12:03 +08:00
Ben Woo
79ae8754dc feat: Properly cleanup AbstractMVPlugin 2023-02-16 10:46:01 +08:00
Ben Woo
3fc3663d5d feat: Improve SpawnLocation toString
This helps in debug logs not showing world=null for spawn location
2023-02-15 20:27:59 +08:00
Ben Woo
5d1d71baf2 refactor: Add shortcut methods to ParsedDestination 2023-02-15 19:47:11 +08:00
Ben Woo
71367d2d69 fix: Arg pop issue with * worlds selection 2023-02-15 14:06:41 +08:00
Ben Woo
09d8790804 chore: Refactor and fix some bugs with content display 2023-02-15 12:16:24 +08:00
Ben Woo
53f453b7ac refactor: Reorder gamerules completion alphabetically 2023-02-15 11:24:56 +08:00
Ben Woo
9a255555a6 feat: Set default completions 2023-02-15 11:24:09 +08:00
Ben Woo
28d71f7bc1 feat: Add support for comma separated MVWorlds 2023-02-15 11:10:35 +08:00
Ben Woo
bf5ab8d1b3
refactor!: Remove MVPlayerSession (#2838)
Remove teleport / message cooldown along with it
2023-02-15 10:30:05 +08:00
Ben Woo
c05d866f2f
refactor: Remove buscript entirely (#2837) 2023-02-15 10:28:56 +08:00
Zax71
9cf2c68fe8
feat: Implement gamerule command (#2840)
* Feat: Add /gamerule

Signed-off-by: Ben Woo <30431861+benwoo1110@users.noreply.github.com>

* Chore: Accept sugguestion

Co-authored-by: Ben Woo <30431861+benwoo1110@users.noreply.github.com>

* Chore: Implement (most) suggestions from Ben

* feat: Implement gamerule context

* feat: Implement MVworld[] array context

* feat: Implement context for gamerule value

---------

Signed-off-by: Ben Woo <30431861+benwoo1110@users.noreply.github.com>
Co-authored-by: Ben Woo <30431861+benwoo1110@users.noreply.github.com>
2023-02-15 10:25:53 +08:00
Ben Woo
15ae0ea54f fix: Improve error handling for regex filter 2023-02-14 00:30:44 +08:00
Ben Woo
1e711ac258 fix: Missing pop arg when resolving mvworld 2023-02-14 00:19:30 +08:00
Ben Woo
706338bb0c feat: Add support for issuer with queued command 2023-02-13 23:59:46 +08:00
Ben Woo
1c89b6458f feat: Improve content display API
- Change ContentProvider to return a list instead of add to existing
- Add prefix for inline handler
- Change from CommandSender to BukkitCommandIssuer, prep for locale
2023-02-13 23:31:26 +08:00
Ben Woo
7978193d88 feat: Add support for resolving MVWorld based on issuer 2023-02-13 16:42:15 +08:00
Ben Woo
9efbbe7a4b feat: Add ContentFilter context 2023-02-13 16:38:15 +08:00
Ben Woo
afaed87a67 refactor: Split into abstract MultiverseCommand and MultiverseCoreCommand 2023-02-10 21:58:11 +08:00
Ben Woo
f3addfbf4e refactor: Use better nesting for locales key 2023-02-10 17:11:05 +08:00
Ben Woo
19ad1db5fb feat: Add reload command 2023-02-10 16:09:31 +08:00
Ben Woo
16096acc34 refactor: Make world name condition check id clearer 2023-02-09 17:09:28 +08:00
Ben Woo
1f907d93af refactor: Cleanup player finder
Add a getMulti method without command sender
2023-02-09 14:21:41 +08:00
Ben Woo
aed0e178ea feat: Add support for teleporting multiple players 2023-02-09 14:16:29 +08:00
Ben Woo
6694c02650 refactor!: Rename back to MVWorldManager 2023-02-09 14:02:00 +08:00
Ben Woo
10ef838d3f
feat: Implement create, delete, clone, regen, load and unload (#2835)
* feat: Implement create, delete, clone, regen, load and unload

* chore: Some formatting update

* chore: Implement suggested command changes

* feat: Add world name validation

* feat: Implement locale support for create command

* fix: World exist checking should include unloaded worlds

* fix: Add default null to generator output

* fix: Allow Unloaded worlds to be cloned

* chore: Make annotation order consistent
2023-02-09 13:50:36 +08:00
Ben Woo
5b25cf4f6c chore: Update vault and json dependency 2023-02-08 16:41:25 +08:00
Ben Woo
24596419e5 refactor!: Reorganise the entire MV 2023-02-08 16:19:33 +08:00
Ben Woo
a403380375 refactor!: MultiverseCore plugin mess 2023-02-08 15:33:59 +08:00
Ben Woo
a6ee8a55ca refactor!: Move queue command manager to command manager class 2023-02-08 14:00:20 +08:00
Ben Woo
6fba6715ba refactor!: Remove deprecated world purger 2023-02-08 13:54:38 +08:00
Ben Woo
6495b72a53 refactor!: Remove unused messaging classes 2023-02-08 13:54:20 +08:00
Ben Woo
5dba9f156d refactor!: Remove old command handler and commands 2023-02-08 13:41:38 +08:00
Ben Woo
a8590df9d4
feat: Implementation of new destination API (#2833)
* feat: Basic implementation of new destination API

* feat!: Move all destinations to new API

* feat: Fully implement teleport and check command

* chore: Improve autocomplete permission checking

* chore: Fine tune tab completion

* chore: Implement suggested changes

* docs: Add javadocs to added api methods
2023-02-08 12:43:59 +08:00
Ben Woo
747cab75fd
feat: Implement command flag system (#2827)
* feat: Implement command flag system

* docs: Add javadocs and annotation

* chore: Implement suggested improvements

* chore: Add shortcuts for flaggroup in MultiverseCommand

* chore: Add check if flaggroup already registered
2023-02-06 21:04:34 +08:00
Ben Woo
fe8118854e refactor!: Remove deprecated debug log 2023-02-04 16:49:11 +08:00
Ben Woo
3377c1dbe5
refactor!: Remove deprecated logging (#2523) 2023-02-03 22:45:55 +08:00
Ben Woo
3ec22fc578
refactor!: Remove deprecated WorldManager methods (#2526) 2023-02-03 22:40:42 +08:00
Ben Woo
17351e66c1
refactor!: Remove deprecated getStaticConfig (#2525) 2023-02-03 22:39:23 +08:00
Ben Woo
0166b8d139
refactor!: Remove deprecated LocationManipulation class (#2528) 2023-02-03 22:38:51 +08:00
Ben Woo
2acca7f330
refactor!: Remove deprecated PlayChatEvent option (#2828) 2023-02-03 22:33:44 +08:00
Ben Woo
4ad6c53ba9
refactor!: Remove redundant MapInitializeEvent (#2507) 2023-02-03 22:11:38 +08:00
Ben Woo
0117159159 feat: @benwoo1110 Revamp content display API
commit 1211dfb057
Author: Ben Woo <30431861+benwoo1110@users.noreply.github.com>
Date:   Tue Aug 17 16:29:31 2021 +0800

    Implement suggested improvements.

    * Use singleton pattern for DefaultContentFilter with getInstance method.
    * Have a default SendHandler.
    * Don't need streams for small dataset.
    * Private WorldListContentParser class to improve readability.

commit 562eed8255
Author: Ben Woo <30431861+benwoo1110@users.noreply.github.com>
Date:   Tue Aug 17 00:26:57 2021 +0800

    Revamp content display API.
2023-02-03 20:23:53 +08:00
Ben Woo
ccf802e32f perf: Update to use json-smart 2023-02-03 20:15:46 +08:00
Ben Woo
83f5a4a701 fix: Remove unused TravelAgent class 2023-02-03 19:50:04 +08:00
Ben Woo
a034eaa555 feat: Implement basic localisation 2023-02-02 17:06:36 +08:00
Ben Woo
3fb99bc156 feat: Add ACF dependency and prep command migration 2023-02-02 16:49:45 +08:00
Ben Woo
9d34e5d75c fix: Replace deprecated EntityCreatePortalEvent with PortalCreateEvent
Use PortalCreateEvent which allows better checking of nether portal creation.
2023-02-02 15:13:00 +08:00
Ben Woo
27c2f7b9e9 feat: Update to 1.16.5-R0.1-SNAPSHOT dependency 2023-02-02 15:01:07 +08:00
nicegamer7
5ec27db284
remove j.mp domain from BitlyURLShortener 2022-03-05 09:35:10 -05:00
Kisaragi
5868ad64b4 use Collections' factory method instead of static field
this resolves some unchecked generics warning
2021-12-31 00:46:21 +09:00
Ben Woo
51801b1b36 Fix velocity not apply. 2021-10-01 15:11:03 +08:00
Kermina Awad
9821f1d9c8 clean up test files 2021-07-18 13:51:53 -04:00
Kermina Awad
b9b1fa6164 remove PowerMockito 2021-07-18 13:17:15 -04:00
Kermina Awad
28585dd6f9 remove unnecessary stub 2021-07-18 13:12:09 -04:00
nicegamer7
9ce2dfd100
Merge pull request #2445 from benwoo1110/fix-help
Fix issue where special chars cause PatternSyntaxException
2021-07-16 09:51:21 -04:00
Ben Woo
473ccd09d7
Don't need to toLowerCase filter. 2021-07-16 21:38:57 +08:00
Ben Woo
cc2e1d44b2
Implement new content display system. (#2584)
* Implement new content display system.

* Add @FunctionalInterface annotation to displaytools interfaces.

* Use static factory method to create Builder with contents.

* Use T for generic type since it's static method.

* Rename Builder#display to show and require CommandSender.

* Rename package from displaytools to display.

* Move DisplayHandler impls into their own package.

* Overload ContentDisplay#forContent with defaults for list and map.

* Pass CommandSender to send command.

This system is much more versatile when a single ContentDisplay instance
can be used for multiple players.

* Rename ContentDisplay#send to #show.

* Split DisplaySettings into separate classes.

Co-authored-by: Jeremy Wood <farachan@gmail.com>
2021-07-07 10:25:07 +08:00
Ben Woo
b7b17c5d21
Set defaultportalsearch to true by default. 2021-07-05 11:28:52 +08:00
Jeremy Wood
1c483148dc Change default permission for version command. Seriously wth. 2021-06-04 13:00:04 -04:00
nicegamer7
128442c062
Merge pull request #2622 from Multiverse/queue-system-cleanup
Queue system cleanup
2021-05-16 11:29:23 -04:00
Kermina Awad
141854f076 correct some javadoc typos 2021-05-16 11:21:20 -04:00