Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MV5 #2824

Draft
wants to merge 847 commits into
base: main
Choose a base branch
from
Draft

MV5 #2824

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
847 commits
Select commit Hold shift + click to select a range
fe79580
Merge pull request #3099 from Multiverse/ben/mv5/AsyncAttempt
benwoo1110 Aug 29, 2024
d83ecd3
Merge pull request #3097 from Multiverse/ben/mv5/getWorld-bukkit
benwoo1110 Aug 29, 2024
d530c2a
Fix some formatting issues.
benwoo1110 Aug 30, 2024
7735053
Merge pull request #3095 from Multiverse/zax71/mv5/legacy-aliases
benwoo1110 Aug 30, 2024
8cbf2bc
Merge branch 'MV5' into zax71/MV5/spawnCommand
benwoo1110 Aug 30, 2024
330d4fb
Improve spawn command messaging
benwoo1110 Aug 30, 2024
1ec4e4b
Improve setspawn command location param
benwoo1110 Aug 30, 2024
f00e296
Proper spawn permission checking
benwoo1110 Aug 30, 2024
7bde4c1
Merge pull request #3057 from Multiverse/zax71/MV5/spawnCommand
benwoo1110 Aug 30, 2024
4be2034
Merge pull request #3093 from Multiverse/Zax71/MV5/implement-1420
benwoo1110 Sep 10, 2024
c05d140
Update placeholderAPI repo and version
benwoo1110 Sep 15, 2024
1528fdf
Merge pull request #3105 from Multiverse/ben/mv5/papi-dep
benwoo1110 Sep 15, 2024
54736ba
Remove old SerializationConfig dependency
benwoo1110 Sep 15, 2024
7368ff2
Add tests for version command
benwoo1110 Sep 15, 2024
64584cc
Fix gradle group id
benwoo1110 Sep 14, 2024
c3674e0
Revamp hk2 injection to support injection in dependent plugins
benwoo1110 Sep 14, 2024
a68b78e
Make contract for core specific listeners and commands
benwoo1110 Sep 15, 2024
11e2dea
Properly implement entryfee for world config
benwoo1110 Sep 18, 2024
1ea3531
Merge pull request #3104 from Multiverse/ben/mv5/multi-plugin-hk2-sup…
benwoo1110 Oct 12, 2024
18f4600
Merge pull request #3107 from Multiverse/ben/mv5/version-cmd-test
benwoo1110 Oct 12, 2024
9c929fc
Fix modify command string parsing
benwoo1110 Oct 12, 2024
7868a19
Dont need to deserialize enum if it is already an enum
benwoo1110 Oct 12, 2024
42cfd9d
Fix enforcementHandler being null in WorldConfigNodes
benwoo1110 Oct 12, 2024
7def05e
Fix version command test
benwoo1110 Oct 12, 2024
5a9b977
Merge pull request #3116 from Multiverse/ben/mv5/fix-version-test
benwoo1110 Oct 12, 2024
c8e50ff
Merge pull request #3115 from Multiverse/ben/mv5/config-improvements
benwoo1110 Oct 12, 2024
bc27f05
Merge pull request #3106 from Multiverse/ben/mv5/remove-old-serial
benwoo1110 Oct 14, 2024
1ba0505
Merge pull request #3109 from Multiverse/ben/mv5/entryfee-currency
benwoo1110 Oct 14, 2024
a226ae5
Merge pull request #3098 from Multiverse/ben/mv5/anchorcommands
benwoo1110 Oct 14, 2024
234d42f
Make tests run on java 21 instead of 17
benwoo1110 Oct 14, 2024
38aa534
Bump mockbukkit to latest 1.21 version
benwoo1110 Oct 14, 2024
061b90c
Config gha to use java 21 for build
benwoo1110 Oct 14, 2024
4264c0c
Merge pull request #3119 from Multiverse/ben/mv5/java-21
benwoo1110 Nov 10, 2024
e889e40
Fix bstats shadowing and archive name build issues
benwoo1110 Nov 14, 2024
38dd001
Fix and refactor cloneWorld hasWorldFolder check
benwoo1110 Nov 14, 2024
b7d0671
Implement more detailed world manager tests
benwoo1110 Nov 14, 2024
30e8b93
Fix null and empty world name checking
benwoo1110 Nov 14, 2024
20af035
Implement tests for WorldNameChecker class
benwoo1110 Nov 14, 2024
0b89738
Update to mockbukkit 4.0
benwoo1110 Nov 16, 2024
d415a7f
Re-add MaterialConverter class and add tests
benwoo1110 Nov 17, 2024
1eeb265
Merge pull request #3127 from Multiverse/ben/mv5/testssss
benwoo1110 Nov 20, 2024
d3f6b11
Refactor to remove need for ParsedDestination and add destination tests
benwoo1110 Nov 20, 2024
f5b5148
Use a record NewAndRemovedWorlds instead of generic tuple for clarity
benwoo1110 Nov 21, 2024
cee6a48
Implement ExactDestination#fromLocation
benwoo1110 Nov 21, 2024
e15dd7e
Implement DestinationInstance#getIdentifier shortcut
benwoo1110 Nov 21, 2024
faf8d1a
Merge pull request #3129 from Multiverse/ben/mv5/material-converter
benwoo1110 Nov 21, 2024
e2050c8
Merge pull request #3130 from Multiverse/ben/mv5/improve-destination
benwoo1110 Nov 21, 2024
b434903
Merge pull request #3131 from Multiverse/ben/mv5/NewAndRemovedWorlds
benwoo1110 Nov 21, 2024
0cc1676
Fix finer permission checking filter
benwoo1110 Nov 21, 2024
8a28bca
Expose MV's completion and context instances in CommandManager
benwoo1110 Nov 21, 2024
8ebb5cf
Merge branch 'main' into ben/mv5/merge-main
benwoo1110 Nov 22, 2024
295259a
Merge pull request #3132 from Multiverse/ben/mv5/merge-main
benwoo1110 Nov 22, 2024
e59089f
Fix mvimport description locale
benwoo1110 Nov 22, 2024
668856d
Add temporary publishing repo
benwoo1110 Nov 23, 2024
b1afd8f
Implement MVTeleportDestinationEvent event
benwoo1110 Nov 23, 2024
9781e83
Remove unused MVPlayerTouchedPortalEvent
benwoo1110 Nov 23, 2024
c0ceb4f
Rename MVVersionEvent to MVDumpsDebugInfoEvent for clarity
benwoo1110 Nov 23, 2024
07ed9fb
Cleanup MVConfigReloadEvent and deprecate MVRespawnEvent
benwoo1110 Nov 23, 2024
e93e2aa
Implement MVWorldDeleteEvent event
benwoo1110 Nov 24, 2024
8d852c5
Add todo for MVWorldPropertyChangeEvent
benwoo1110 Nov 24, 2024
d077461
Rename MVDumpsDebugInfoEvent methods to reflect the class name change
benwoo1110 Nov 24, 2024
470e657
Merge pull request #3133 from Multiverse/ben/mv5/events
benwoo1110 Nov 24, 2024
ecf0260
Revert "Remove unused MVPlayerTouchedPortalEvent"
benwoo1110 Nov 24, 2024
aac076f
Ignore ordering for potential worlds list test.
dumptruckman Nov 25, 2024
7e8ba18
Fix worlds config file name from worlds2 to worlds
benwoo1110 Nov 27, 2024
6c6553b
Delete old entryfee path from world config during migration
benwoo1110 Nov 27, 2024
6a351fd
Backup old mv4's worlds config to `worlds.yml.old`
benwoo1110 Nov 27, 2024
0d6daa1
Improve MultiverseWorld command context error handling
benwoo1110 Nov 27, 2024
c6983a5
Ensure value is not null for the relevant PropertyModifyAction
benwoo1110 Nov 27, 2024
974887d
Throw error if number parsing fails
benwoo1110 Nov 27, 2024
75a98f9
Improve gamerule value suggestion
benwoo1110 Nov 27, 2024
ea87f2a
Implement more customisable way of doing permission checking
benwoo1110 Nov 29, 2024
32f609e
Teleport command no longer need to override hasPermission
benwoo1110 Nov 29, 2024
8e64b18
Merge pull request #3136 from Multiverse/ben/mv5/gamerule-value
benwoo1110 Dec 7, 2024
12ed188
Implement better permission checking for spawn command
benwoo1110 Dec 11, 2024
f55bacc
Improve error handling for string parser
benwoo1110 Dec 11, 2024
80ad788
Abstract common action for command testing to a base class
benwoo1110 Dec 11, 2024
0700d48
Add test for config command
benwoo1110 Dec 11, 2024
63b6ab2
Allow customisation of flag group prefix used
benwoo1110 Dec 11, 2024
d8b56b9
Properly implement teleport intercept config option
benwoo1110 Dec 12, 2024
018e154
Improve teleport intercept config comment
benwoo1110 Dec 12, 2024
a5009bf
Merge pull request #3141 from Multiverse/ben/mv5/flag-group
benwoo1110 Dec 20, 2024
3bdc7f4
Merge pull request #3140 from Multiverse/ben/mv5/command-tests
benwoo1110 Dec 20, 2024
8410175
Merge pull request #3137 from Multiverse/ben/mv5/command-permissions
benwoo1110 Dec 20, 2024
d06407f
Merge pull request #3142 from Multiverse/ben/mv5/teleport-intercept
benwoo1110 Dec 20, 2024
f20b4f2
Bump mockbukkit with canGenerateStructures method support
benwoo1110 Dec 31, 2024
22e1854
Actually implement check command
benwoo1110 Dec 31, 2024
c6ceba8
Implement configurable default and per-player locale
benwoo1110 Jan 1, 2025
7ae9d26
Add config methods for the 2 new locale config nodes
benwoo1110 Jan 1, 2025
1885298
Implement more detailed localization config tests
benwoo1110 Jan 1, 2025
92f3225
Merge pull request #3145 from Multiverse/ben/mv5/check-command
benwoo1110 Jan 2, 2025
69ab1d3
Ensure parent locales field is using the same instance in CommandManager
benwoo1110 Jan 2, 2025
7db5f8c
Merge pull request #3146 from Multiverse/ben/mv5/improve-locales
benwoo1110 Jan 2, 2025
88171da
Fix invalid gamerule error
benwoo1110 Jan 2, 2025
8fdb137
Fix regen command syntax description and minor notes
benwoo1110 Jan 2, 2025
33e440f
Fix regen command random seed flag
benwoo1110 Jan 3, 2025
a5ba422
Fix crash when CommandManager calling Plugin#getConfig before config …
benwoo1110 Jan 3, 2025
f67777b
Allow delete world command to delete unloaded worlds
benwoo1110 Jan 3, 2025
88bb593
Refactor and implement tests for create and delete command
benwoo1110 Jan 3, 2025
78b9ad5
Fix anchor command inheriting from CoreCommand
benwoo1110 Jan 3, 2025
b8f2ebd
Enable tests for counting number of commands as a service
benwoo1110 Jan 3, 2025
5a90d51
Implement tests for regen command
benwoo1110 Jan 3, 2025
df1cb2c
Fix config typo in auto-purge-entities comments
benwoo1110 Jan 4, 2025
17bb856
Add --unsafe flag to teleport command
benwoo1110 Jan 4, 2025
5259f6a
Fix spawn location in world config should use SpawnLocation class not…
benwoo1110 Jan 4, 2025
e492c28
Implement more tests for regen command
benwoo1110 Jan 5, 2025
50ed9e2
Merge pull request #3147 from Multiverse/ben/mv5/regen-test
benwoo1110 Jan 5, 2025
08ac65e
Add missing SPAWN_FAILED message key
benwoo1110 Jan 5, 2025
71e47d2
Add support for creating worlds with single biome
benwoo1110 Jan 5, 2025
ddedf2c
Fix failed tests caused by new biome property
benwoo1110 Jan 5, 2025
5dddfbe
Merge pull request #3149 from Multiverse/ben/mv5/single-biome
benwoo1110 Jan 5, 2025
9e38142
Make file utils a service and optimise server folder file search
benwoo1110 Jan 8, 2025
97b6d24
Implement attempt thenRun and thenAccept
benwoo1110 Jan 8, 2025
2e309ca
Refactor safety teleporter with AsyncSafetyTeleporterAction
benwoo1110 Jan 8, 2025
d8d8607
Convert all usage of AsyncSafetyTeleporter to new api
benwoo1110 Jan 9, 2025
25e704d
Implement test for teleport command
benwoo1110 Jan 9, 2025
918d54f
Only allow proper true/false strings to be parsed
benwoo1110 Jan 9, 2025
3e69dd4
Fix teleport test build error
benwoo1110 Jan 9, 2025
d9aae1a
Remove unused TeleportResult.Success enum
benwoo1110 Jan 9, 2025
0f1a9eb
Fix double migrator action class name
benwoo1110 Jan 10, 2025
c0c9814
Improve config node deserialization handling
benwoo1110 Jan 10, 2025
68717d5
Implement double serialization to fix scale config node
benwoo1110 Jan 10, 2025
34ea244
Add tests for setPropertyString
benwoo1110 Jan 10, 2025
067a88e
Fix scale double migration
benwoo1110 Jan 10, 2025
303ac03
Add default serialisers for all number types
benwoo1110 Jan 10, 2025
199da71
Add docs for new AsyncSafetyTeleporter
benwoo1110 Jan 10, 2025
5f15cce
Add tests for multiple player teleport
benwoo1110 Jan 10, 2025
7c2b7e5
Fix a test for ConfigTeleportInterceptTest
benwoo1110 Jan 10, 2025
bb6d236
Merge pull request #3150 from Multiverse/ben/mv5/revamp-teleport
benwoo1110 Jan 10, 2025
df7b9a3
Implement correct default scale for nether and end environment
benwoo1110 Jan 10, 2025
f37ee00
Implement --unsafe flag for spawn command
benwoo1110 Jan 10, 2025
cdb5fc0
Implement option to resolve world by alias for commands and destinations
benwoo1110 Jan 10, 2025
2949b96
Improve message output for tp command with proper fail reason
benwoo1110 Jan 10, 2025
6d08d15
Improve first spawn and join location with PlayerSpawnLocationEvent
benwoo1110 Jan 11, 2025
8793aa5
Implement new config options for future features
benwoo1110 Jan 12, 2025
1e33689
Implement concurrent teleport limit
benwoo1110 Jan 12, 2025
2c82c27
Implement option to disable finer teleport permission checking
benwoo1110 Jan 12, 2025
f1d98a6
Implement otp for queue command and confirm mode
benwoo1110 Jan 12, 2025
803345d
Fix regen command test by disabling confirm
benwoo1110 Jan 12, 2025
a982875
Fix some english
benwoo1110 Jan 12, 2025
643fa60
Fix certain config options resetting on reload
benwoo1110 Jan 12, 2025
2356bfa
Save all enums in config as lowercased
benwoo1110 Jan 12, 2025
4f28d38
Fix test failing with lowercase enum
benwoo1110 Jan 12, 2025
4798ddd
Fix world migration issues with alias and spawnrate
benwoo1110 Jan 12, 2025
f707f29
Improve worlds config tests with node to node yaml comparison
benwoo1110 Jan 12, 2025
de879c7
Implement tab-complete for world property respawn-world
benwoo1110 Jan 12, 2025
ec19f3e
Defer world operations if world is ticking
benwoo1110 Jan 12, 2025
7d90a11
Remove invalid command condition in delete command
benwoo1110 Jan 12, 2025
89871cd
Ensure onSetValue is ran when setting up nodes
benwoo1110 Jan 12, 2025
ef21d83
Fix config handle reset not using serialiser
benwoo1110 Jan 12, 2025
c03679d
Fix new config file not having version number
benwoo1110 Jan 13, 2025
5b09097
Fix not removing old serialisation tags if file is crlf
benwoo1110 Jan 13, 2025
2934171
Refactor and add config file assertion for config.yml testing
benwoo1110 Jan 13, 2025
1f8a797
Add more tests for world config manager
benwoo1110 Jan 13, 2025
874b604
Check if current location is safe before searching around
benwoo1110 Jan 13, 2025
647e116
Refactor config handles and make world properties alphabetical order
benwoo1110 Jan 13, 2025
b5f1b32
Fix serialisation issues with string and list items
benwoo1110 Jan 13, 2025
06feb84
Add test for worlds.yml with weird formatting
benwoo1110 Jan 13, 2025
64e7bae
Implement initial new algorithm for safe location
benwoo1110 Jan 14, 2025
3b9a91c
Implement better search algo that search from the nearest block outwards
benwoo1110 Jan 15, 2025
2df1f39
Implement rest of block safety methods
benwoo1110 Jan 15, 2025
03dc8e4
Rename the broken config file and regen a new one
benwoo1110 Jan 15, 2025
cb2ab3e
Shift all to use AdvancedBlockSafety and deprecate old BlockSafety
benwoo1110 Jan 16, 2025
6fb620c
Fix failing tests caused by new class and config changes
benwoo1110 Jan 16, 2025
d83d6c6
Improve safe location search config comments
benwoo1110 Jan 16, 2025
3a9eb88
Merge pull request #3151 from Multiverse/ben/mv5/block-safety
benwoo1110 Jan 16, 2025
5b97c3f
Fix mv dumps unable to get latest.log if world-container is changed
benwoo1110 Jan 16, 2025
9be7c75
Defaults mv dumps to use paste.dev as paste.gg is down
benwoo1110 Jan 16, 2025
c49653e
Add world property toggle allow anchor spawn
benwoo1110 Jan 16, 2025
52a4059
Fix typo in anchor respawn method name
benwoo1110 Jan 16, 2025
9884ec2
Fix tests by adding new anchor-respawn property to worlds.yml files
benwoo1110 Jan 16, 2025
83e197a
Implement config option for debug permission
benwoo1110 Jan 16, 2025
971a159
Fix config tests
benwoo1110 Jan 16, 2025
ed5a13b
Implement default-respawn-to-world-spawn config option and refactor r…
benwoo1110 Jan 16, 2025
9d54cc4
Properly register world and teleport permissions
benwoo1110 Jan 17, 2025
14a541c
Fix debug permission config not applying
benwoo1110 Jan 17, 2025
51731cd
Only suggest destination that sender have permission for
benwoo1110 Jan 17, 2025
4dc6163
Don't log permission checks for console
benwoo1110 Jan 17, 2025
2cfcdad
Improve teleport tab complete handling
benwoo1110 Jan 17, 2025
7a6d328
Fix minor issues with teleport CommandCompletion
benwoo1110 Jan 17, 2025
b664985
Log unknown world flag
benwoo1110 Jan 17, 2025
5742670
Implement better spawn command permission checking and tab complete
benwoo1110 Jan 17, 2025
b68e8a2
Localise teleport "you" message
benwoo1110 Jan 17, 2025
53c9cbe
More configuration option for respawning
benwoo1110 Jan 18, 2025
e3fded9
Major refactor to support developer api
benwoo1110 Jan 18, 2025
4eb9ff6
Remove old tests
benwoo1110 Jan 18, 2025
b3e633b
Fix and remove some useless todos
benwoo1110 Jan 18, 2025
b17afbd
Merge pull request #3155 from Multiverse/ben/mv5/api
benwoo1110 Jan 18, 2025
c1e6614
Implement generator as an api
benwoo1110 Jan 18, 2025
449f85e
Ensure all imports in api does not import other multiverse.core packages
benwoo1110 Jan 18, 2025
b8db6e2
Implement MultiverseCoreApi
benwoo1110 Jan 18, 2025
bb91a74
Make ItemEconomy a service
benwoo1110 Jan 19, 2025
36aa144
Implement MVRespawnEvent as Cancellable and remove respawn method
benwoo1110 Jan 19, 2025
4362453
Implement MVWorldPropertyChangeEvent
benwoo1110 Jan 19, 2025
55cd6b7
Make WorldConfigNodes reference MultiverseWorld instead of LoadedMult…
benwoo1110 Jan 19, 2025
d6a70bb
Fix MultiverseWorld#isLoadedWorld returning wrong value
benwoo1110 Jan 19, 2025
b646937
Make config set methods return Try<Void>
benwoo1110 Jan 19, 2025
31524f9
Remove FilesManipulator and merge with FileUtils
benwoo1110 Jan 19, 2025
365b871
Send correct price formatting when player has not enough money
benwoo1110 Jan 19, 2025
a269c02
Add `/mvss` alias and state pitch and yaw when setting
zax71 Jan 19, 2025
96b174c
Improve syntax for `/mv setspawn`
zax71 Jan 19, 2025
9660b0c
Allow not specifying a world to `/mv who`
zax71 Jan 19, 2025
9a55e35
Add `/mvw` alias for `/mv who`
zax71 Jan 19, 2025
d9cf3f5
Merge pull request #3156 from Multiverse/zax71/mv5/improvedLocation
benwoo1110 Jan 20, 2025
c5a8134
Switch to using `@Flags("resolve=issuerAware")`
zax71 Jan 20, 2025
525171a
De-interface all classes and remove api package
benwoo1110 Jan 23, 2025
402fa87
Refactor classes to reduce public exposure
benwoo1110 Jan 23, 2025
ddc4785
Dont call registerConditions in constructor
benwoo1110 Jan 23, 2025
d7c1954
Merge pull request #3158 from Multiverse/ben/mv5/revamp-api
dumptruckman Jan 23, 2025
f6e91fb
Disable checkstyle indentation module forceStrictCondition.
dumptruckman Jan 24, 2025
4170904
Add common replacement keys.
dumptruckman Jan 24, 2025
fb75953
Fix many checkstyle and sonarqube issues on commands.
dumptruckman Jan 24, 2025
abe9ddd
Update a few places using common replacements.
dumptruckman Jan 24, 2025
715d1cb
Fix checkstyle and sonarqube issues found in AnchorManager.
dumptruckman Jan 24, 2025
54f0325
Fix potential source of infinite recursion.
dumptruckman Jan 24, 2025
6d32393
Remove instance initializer on HashMap.
dumptruckman Jan 24, 2025
949c470
Reuse random in RegenWorldOptions.
dumptruckman Jan 24, 2025
d3274cc
Merge pull request #3159 from Multiverse/dtm/mv5/sonarqube-fixes
dumptruckman Jan 24, 2025
8096a4e
Use ACFUtil for random instance
benwoo1110 Jan 24, 2025
906fac1
Make bypass gamemode and playerlimit permission false even when oped
benwoo1110 Jan 24, 2025
21b8008
Private constructor for TestingMode to prevent instantiation
benwoo1110 Jan 24, 2025
0002582
Convert GameRuleValue class to a record
benwoo1110 Jan 24, 2025
1397d14
Slightly lower complexity of RegenWorldOptions.
dumptruckman Jan 24, 2025
d6f4bca
Slightly lower complexity of AnchorManager.
dumptruckman Jan 24, 2025
9d72c7b
Reduce complexity of CreateCommand.
dumptruckman Jan 24, 2025
28f6098
Rename flags package to flag.
dumptruckman Jan 24, 2025
78d0e14
Add reusable page and filter flags.
dumptruckman Jan 24, 2025
68595d4
Extract LogPoster out of DumpsCommand.
dumptruckman Jan 24, 2025
c692632
Reduce complexity of DumpsCommand.
dumptruckman Jan 24, 2025
7aacd73
Op should have teleport permissions
benwoo1110 Jan 25, 2025
580e876
Merge pull request #3161 from Multiverse/dtm/mv5/more-fixes
benwoo1110 Jan 25, 2025
d6f63ee
Private constructor for TestingMode to prevent instantiation
benwoo1110 Jan 24, 2025
12c9911
Convert GameRuleValue class to a record
benwoo1110 Jan 24, 2025
367b909
Fix more sonarcloud nitpicks
benwoo1110 Jan 24, 2025
548dc7d
Removed unused sendPlayerToDefaultWorld method
benwoo1110 Jan 24, 2025
878d1d8
Merge remote-tracking branch 'origin/MV5' into MV5
benwoo1110 Jan 25, 2025
164e0ff
Fix javadoc error with p tag
benwoo1110 Jan 25, 2025
ee15740
Read server.properties files to get default world
benwoo1110 Jan 25, 2025
3861737
Merge pull request #3162 from Multiverse/ben/mv5/server-props
benwoo1110 Jan 25, 2025
2b70c8b
Merge pull request #3157 from Multiverse/zax71/mv5/whoCommandAutoWorld
benwoo1110 Jan 25, 2025
dee05cb
Suggesting destination use CommandSender instead of CommandIssuer
benwoo1110 Jan 25, 2025
0fceff0
Fix comment style in PluginServiceLocator
benwoo1110 Jan 25, 2025
1ffdc4a
Add more common api getters and expose PluginServiceLocator
benwoo1110 Jan 25, 2025
18fd974
Cleanup MultiverseCoreApi tests
benwoo1110 Jan 25, 2025
5d09bce
Revamp how submodules should depend on mvcore
benwoo1110 Jan 25, 2025
547c123
Fix MultiversePlugin abstract methods should be public
benwoo1110 Jan 25, 2025
d6ea377
Rename getServiceProvider to getServiceLocator
benwoo1110 Jan 25, 2025
c4f5ae3
Fix protocol version logic
benwoo1110 Jan 25, 2025
f8b41ce
Fix isIteratingOverLevelsMethod being null
benwoo1110 Jan 25, 2025
df11141
Fix protocol version inequality (again lol)
benwoo1110 Jan 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .github/workflows/generic.checkstyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
continue-on-error: true
steps:
- uses: actions/checkout@v3

- uses: dbelyaev/[email protected]
continue-on-error: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
checkstyle_version: 10.12.2
checkstyle_config: ./config/mv_checks.xml
level: warning
2 changes: 1 addition & 1 deletion .github/workflows/generic.github_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

- uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '21'
distribution: 'adopt'
cache: gradle

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generic.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '21'
distribution: 'adopt'
cache: gradle

Expand Down
212 changes: 170 additions & 42 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
import org.apache.tools.ant.filters.ReplaceTokens
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id 'java-library'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'com.gradleup.shadow' version '8.3.5'
id "org.jetbrains.kotlin.jvm" version "2.0.21"
}

version = System.getenv('GITHUB_VERSION') ?: 'local'
group = 'com.onarandombox.multiversecore'
group = 'org.mvplugins.multiverse.core'
description = 'Multiverse-Core'

java.sourceCompatibility = JavaVersion.VERSION_11
compileJava {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

compileTestJava {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

compileTestKotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_21)
javaParameters.set(true)
}
}

repositories {
mavenLocal()
Expand Down Expand Up @@ -39,37 +56,91 @@ repositories {
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}

maven {
name = 'aikar repo'
url = uri('https://repo.aikar.co/content/groups/aikar/')
}

maven {
name = 'glaremasters repo'
url = 'https://repo.glaremasters.me/repository/towny/'
}

maven {
name = "helpchatRepoReleases"
url = uri("https://repo.helpch.at/releases/")
}

maven {
name = 'papermc repo'
url = 'https://repo.papermc.io/repository/maven-public/'
}
}

configurations {
// Add configuration for server API
compileOnly.extendsFrom serverApi
runtimeClasspath.extendsFrom serverApi

// Add configuration for external plugins
implementation.extendsFrom externalPlugin

// Add configuration for dependencies that will be included in fat jar
compileClasspath.extendsFrom shadowed
testCompileClasspath.extendsFrom shadowed
testRuntimeClasspath.extendsFrom shadowed
}

dependencies {
implementation 'org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT'
serverApi 'org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT'

implementation('com.github.MilkBowl:VaultAPI:1.7') {
// Economy
externalPlugin('com.github.MilkBowl:VaultAPI:1.7.1') {
exclude group: 'org.bukkit', module: 'bukkit'
}

compileOnly('me.main__.util:SerializationConfig:1.7') {
exclude group: 'org.bukkit', module: 'bukkit'
// PlaceholderAPI
externalPlugin 'me.clip:placeholderapi:2.11.6'

// Command Framework
shadowed 'co.aikar:acf-paper:0.5.1-SNAPSHOT'

// Config
shadowed('io.github.townyadvanced.commentedconfiguration:CommentedConfiguration:1.0.1') {
exclude group: 'org.spigotmc', module: 'spigot-api'
}
compileOnly('com.pneumaticraft.commandhandler:CommandHandler:11') {
exclude group: 'org.bukkit', module: 'bukkit'
exclude group: 'junit', module: 'junit'

// Utils
shadowed 'io.vavr:vavr:0.10.4'
shadowed 'org.glassfish.hk2:hk2-locator:3.0.3'
shadowed('org.glassfish.hk2:hk2-inhabitant-generator:3.0.3') {
exclude group: 'org.apache.maven', module: 'maven-core'
}
compileOnly 'com.dumptruckman.minecraft:buscript:2.0-SNAPSHOT'
compileOnly 'org.bstats:bstats-bukkit:2.2.1'
compileOnly('com.dumptruckman.minecraft:Logging:1.1.1') {
shadowed('com.dumptruckman.minecraft:Logging:1.1.1') {
exclude group: 'junit', module: 'junit'
}
compileOnly 'de.themoep.idconverter:mappings:1.2-SNAPSHOT'
compileOnly 'org.jetbrains:annotations:16.0.2'
shadowed 'de.themoep.idconverter:mappings:1.2-SNAPSHOT'
shadowed('org.bstats:bstats-bukkit:3.1.0') {
exclude group: 'org.bukkit', module: 'bukkit'
}
shadowed 'net.minidev:json-smart:2.4.9'
shadowed 'org.jetbrains:annotations:22.0.0'
shadowed 'io.papermc:paperlib:1.0.8'

testImplementation 'org.spigotmc:spigot-api:1.19.3-R0.1-SNAPSHOT'
// Tests
testImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21'
testImplementation 'org.mockbukkit.mockbukkit:mockbukkit-v1.21:4.24.1'
testImplementation('com.googlecode.json-simple:json-simple:1.1.1') {
exclude group: 'junit', module: 'junit'
}
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:3.11.2'
testImplementation 'commons-io:commons-io:2.4'
testImplementation 'org.jetbrains.kotlin:kotlin-test'
testImplementation 'com.natpryce:hamkrest:1.8.0.1'
testImplementation 'org.mockito.kotlin:mockito-kotlin:4.1.0'

// Annotation Processors
annotationProcessor 'org.glassfish.hk2:hk2-metadata-generator:3.0.3'
testAnnotationProcessor 'org.glassfish.hk2:hk2-metadata-generator:3.0.3'
}


Expand All @@ -78,11 +149,11 @@ java {
withJavadocJar()
}

tasks.withType(JavaCompile) {
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}

tasks.withType(Javadoc) {
tasks.withType(Javadoc).configureEach {
options.encoding = 'UTF-8'
}

Expand All @@ -92,28 +163,40 @@ configurations {
it.outgoing.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(jar) }
it.outgoing.artifact(shadowJar)
}

testCompileOnly.extendsFrom compileOnly
testRuntimeOnly.extendsFrom testCompileOnly

shadowed.extendsFrom compileOnly {
canBeResolved = true
}
}


publishing {
publications {
maven(MavenPublication) {
from components.java

pom.withXml {
asNode().dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.implementation.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
Node pomNode = asNode()

// Remove Kotlin dependency
pomNode.dependencies.'*'.findAll() {
it.groupId.text() == 'org.jetbrains.kotlin'
}.each() {
it.parent().remove(it)
}

// Switch runtime deps to provided
pomNode.dependencies.'*'.findAll() {
it.scope.text() == 'runtime'
}.each() {
it.scope*.value = 'provided'
}

// Add spigot api to pom
project.configurations.serverApi.allDependencies.each { dependency ->
pomNode.dependencies[0].appendNode("dependency").with {
it.appendNode("groupId", dependency.group)
it.appendNode("artifactId", dependency.name)
it.appendNode("version", dependency.version)
it.appendNode("scope", "provided")
}
}
}
}
}
Expand All @@ -133,6 +216,13 @@ publishing {
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials(PasswordCredentials)
}

maven {
// todo: remove before mv5 release
name = "multiverseBeta"
url = "https://repo.c0ding.party/multiverse-beta"
credentials(PasswordCredentials)
}
}
}

Expand All @@ -151,6 +241,19 @@ task prepareSource(type: Sync) {
compileJava {
source = prepareSource.outputs
}
tasks.withType(JavaCompile) {
configure(options) {
options.compilerArgs << '-Aorg.glassfish.hk2.metadata.location=META-INF/hk2-locator/Multiverse-Core'
}
}

compileKotlin {
// We're not using Kotlin in the plugin itself, just tests!
enabled = false
}
configurations.findAll { !it.name.startsWith('test') }.each {
it.exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
}

processResources {
def props = [version: "${project.version}"]
Expand All @@ -175,20 +278,45 @@ javadoc {
project.configurations.api.canBeResolved = true

shadowJar {
relocate 'me.main__.util', 'com.onarandombox.serializationconfig'
relocate 'com.pneumaticraft.commandhandler', 'com.onarandombox.commandhandler'
relocate 'buscript', 'com.onarandombox.buscript'
relocate 'org.bstats', 'com.onarandombox.bstats'
relocate 'com.dumptruckman.minecraft.util.Logging', 'com.onarandombox.MultiverseCore.utils.CoreLogging'
relocate 'com.dumptruckman.minecraft.util.DebugLog', 'com.onarandombox.MultiverseCore.utils.DebugFileLogger'
relocate 'org.codehaus.jettison', 'com.onarandombox.jettison'
relocate 'de.themoep.idconverter', 'com.onarandombox.idconverter'
relocate 'co.aikar', 'org.mvplugins.multiverse.external.acf'
relocate 'com.dumptruckman.minecraft.util.Logging', 'org.mvplugins.multiverse.core.utils.CoreLogging'
relocate 'com.dumptruckman.minecraft.util.DebugLog', 'org.mvplugins.multiverse.core.utils.DebugFileLogger'
relocate 'de.themoep.idconverter', 'org.mvplugins.multiverse.external.idconverter'
relocate 'io.github.townyadvanced.commentedconfiguration', 'org.mvplugins.multiverse.external.commentedconfiguration'
relocate 'me.main__.util', 'org.mvplugins.multiverse.external.serializationconfig'
relocate 'org.bstats', 'org.mvplugins.multiverse.external.bstats'
relocate 'com.sun', 'org.mvplugins.multiverse.external.sun'
relocate 'net.minidev', 'org.mvplugins.multiverse.external.minidev'
relocate 'org.objectweb', 'org.mvplugins.multiverse.external.objectweb'
relocate 'io.vavr', 'org.mvplugins.multiverse.external.vavr'
relocate 'jakarta', 'org.mvplugins.multiverse.external.jakarta'
relocate 'javassist', 'org.mvplugins.multiverse.external.javassist'
relocate 'org.aopalliance', 'org.mvplugins.multiverse.external.aopalliance'
relocate 'org.glassfish', 'org.mvplugins.multiverse.external.glassfish'
relocate 'org.jvnet', 'org.mvplugins.multiverse.external.jvnet'
relocate 'org.intellij', 'org.mvplugins.multiverse.external.intellij'
relocate 'org.jetbrains', 'org.mvplugins.multiverse.external.jetbrains'
relocate 'io.papermc.lib', 'org.mvplugins.multiverse.external.paperlib'

configurations = [project.configurations.shadowed]

archiveFileName = "$baseName-$version.$extension"
classifier = ''
archiveClassifier.set('')

dependencies {
exclude(dependency {
it.moduleGroup == 'org.jetbrains.kotlin'
})
}
//classifier = ''
}

build.dependsOn shadowJar
jar.enabled = false

test {
useJUnitPlatform()

testLogging {
exceptionFormat = 'full'
}
}
Loading
Loading