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 907 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
907 commits
Select commit Hold shift + click to select a range
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
35c4392
Increase ThrowsCount checkstyle to permit max of 2.
dumptruckman Jan 27, 2025
72a7b2b
Reduce complexity of DumpsLogPoster.
dumptruckman Jan 27, 2025
1eaa76c
mapAsyncAttempt should call thenApply instead of thenApplyAsync
benwoo1110 Jan 27, 2025
5cb7fc8
Use sealed classes for HttpAPIClient and implementations.
dumptruckman Jan 27, 2025
4cad57f
Refactor all config node variables to be camelcase
benwoo1110 Jan 27, 2025
92b13a5
Make finer teleport config option apply to spawn permissions as well
benwoo1110 Jan 27, 2025
92548a3
Ensure mapAsyncAttempt is not forcing mapper AsyncAttempt to run synced
benwoo1110 Jan 27, 2025
e910e88
Fallback to WorldManager#getDefaultWorld when removing players from w…
benwoo1110 Jan 27, 2025
a7ca449
Merge pull request #3164 from Multiverse/dtm/mv5/more-fixes-2
dumptruckman Jan 27, 2025
c679736
Implement using generator settings when creating world
benwoo1110 Jan 28, 2025
761455a
Fix teleporter not parsed correctly
benwoo1110 Jan 28, 2025
06e7b30
Use player.performCommand and check returns true
benwoo1110 Jan 28, 2025
cdfea86
Add tests for spawn command
benwoo1110 Jan 28, 2025
95ca397
Implement Try<Void> for config save methods
benwoo1110 Jan 28, 2025
13d75b1
Use try with loading api service
benwoo1110 Jan 28, 2025
40cafbd
Add support for custom biome provider plugins
benwoo1110 Jan 28, 2025
e83f909
Fix tests due to biome string change
benwoo1110 Jan 28, 2025
f76c3e1
Remove unused AsyncSafetyTeleporter in MVPlayerListener
benwoo1110 Jan 31, 2025
0ffb55c
Use build logic from custom gradle plugins.
dumptruckman Feb 3, 2025
74c311b
Update to 1.0.1 of gradle plugins.
dumptruckman Feb 3, 2025
e6313ce
Add biome tab completion and docs
benwoo1110 Feb 3, 2025
288a87d
Fix tests issues with Biome.values()
benwoo1110 Feb 3, 2025
757ea60
Merge pull request #3168 from Multiverse/dtm/mv5/gradle-plugins
benwoo1110 Feb 3, 2025
eb20386
Add reflection method to get field value from field name
benwoo1110 Feb 6, 2025
b701da1
Got the config done but DI is hard
zax71 Feb 12, 2025
188a60a
Remove validDuration from ConfirmQueuePayload and directly reference …
benwoo1110 Feb 13, 2025
9956142
Merge pull request #3169 from Multiverse/zax71/MV5/confirm-command-cu…
benwoo1110 Feb 13, 2025
fb7e496
Move addonToCommaSeperated to StringFormatter class
benwoo1110 Feb 15, 2025
2de0c32
Add command context for MultiverseWorld array
benwoo1110 Feb 15, 2025
3160ac3
Urlencode mclogs payload
benwoo1110 Feb 15, 2025
a47125d
Add back legacy gamerule commands
zax71 Feb 16, 2025
ab65c01
Fix remove command tab complete
benwoo1110 Feb 17, 2025
bb9591c
Merge pull request #3172 from Multiverse/zax71/mv5/legacy-gamerule-names
benwoo1110 Feb 17, 2025
5db01b8
Fix mv anchor tab completion
benwoo1110 Feb 23, 2025
95bd849
Add time to placeholderApi
benwoo1110 Feb 23, 2025
61e2d00
Refactor permission checking with scope enum
benwoo1110 Feb 23, 2025
733a561
Add teleport test for when finer permission is disabled
benwoo1110 Feb 23, 2025
fe0be3e
Fix destination's velocity not applying
benwoo1110 Feb 23, 2025
a9fd4db
Add debug block for checking safe location
benwoo1110 Feb 25, 2025
16f8f3c
Fix spectator mode not flying
benwoo1110 Feb 25, 2025
02127fa
Update to 1.0.2 of gradle plugins.
benwoo1110 Feb 26, 2025
1a3baf2
Remove old dep relocations
benwoo1110 Feb 26, 2025
54ebdcb
Refactor config handling to only serialise and deserialise on load an…
benwoo1110 Feb 26, 2025
f46449f
Fix possible null issue with gamerule completion
benwoo1110 Feb 28, 2025
74e595b
Add destination and debug mode tab completion for /mv config
benwoo1110 Feb 28, 2025
cfd7be2
Ensure VersionMigrator is applied in the correct order
benwoo1110 Feb 28, 2025
e9e0407
Refactor null name with hidden method
benwoo1110 Feb 28, 2025
babcec1
Rename WorldPurger to LegacyWorldPurger
benwoo1110 Feb 28, 2025
0ed41e3
Merge branch 'main' into MV5
benwoo1110 Mar 1, 2025
a2d7bbc
Merge branch 'main' into MV5
benwoo1110 Mar 1, 2025
ef47a70
Default firstSpawnOverride to false
benwoo1110 Mar 2, 2025
dd27991
Fix config test
benwoo1110 Mar 3, 2025
4551eae
Fix MVDebugModeEvent not being called
benwoo1110 Mar 5, 2025
ca7ac56
Make destination classes final
benwoo1110 Mar 5, 2025
ac8896e
Use Try class instead of catching throwable for ConfirmCommand
benwoo1110 Mar 6, 2025
781dc35
Use runTaskLater instead of scheduleSyncDelayTask
benwoo1110 Mar 6, 2025
ac2ca92
Remove colour code when resolving alias name in commands
benwoo1110 Mar 6, 2025
626e6d0
Implement alias tab completion for destinations
benwoo1110 Mar 6, 2025
120b51e
Minor refactor to PlayerPortalEvent
benwoo1110 Mar 8, 2025
dc9a386
Implement a default command exception handler to show stacktrace
benwoo1110 Mar 8, 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@v4
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@v4
with:
java-version: '11'
java-version: '21'
distribution: 'adopt'
cache: gradle

Expand Down
209 changes: 69 additions & 140 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,122 +1,108 @@
import org.apache.tools.ant.filters.ReplaceTokens

plugins {
id 'java-library'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'org.mvplugins.multiverse-plugin' version '1.0.2'
id 'org.mvplugins.kotlin-test-only' version '1.0.2'
}

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

java.sourceCompatibility = JavaVersion.VERSION_11

repositories {
mavenLocal()
mavenCentral()

maven {
url = uri('https://hub.spigotmc.org/nexus/content/repositories/snapshots/')
name = 'aikar repo'
url = uri('https://repo.aikar.co/content/groups/aikar/')
}

maven {
url = uri('https://repo.onarandombox.com/content/groups/public')
name = 'glaremasters repo'
url = 'https://repo.glaremasters.me/repository/towny/'
}

maven {
url = uri('https://hub.spigotmc.org/nexus/content/groups/public/')
name = "helpchatRepoReleases"
url = uri("https://repo.helpch.at/releases/")
}
}

maven {
url = uri('https://jitpack.io')
}
configure(apiDependencies) {
serverApiVersion = '1.18.2-R0.1-SNAPSHOT'
mockBukkitServerApiVersion = '1.21'
}

maven {
url = uri('https://repo.minebench.de/')
dependencies {
// Economy
externalPlugin('com.github.MilkBowl:VaultAPI:1.7.1') {
exclude group: 'org.bukkit', module: 'bukkit'
}

maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
}
// PlaceholderAPI
externalPlugin 'me.clip:placeholderapi:2.11.6'

dependencies {
implementation 'org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT'
// Command Framework
shadowed 'co.aikar:acf-paper:0.5.1-SNAPSHOT'

implementation('com.github.MilkBowl:VaultAPI:1.7') {
exclude group: 'org.bukkit', module: 'bukkit'
// Config
shadowed('io.github.townyadvanced.commentedconfiguration:CommentedConfiguration:1.0.1') {
exclude group: 'org.spigotmc', module: 'spigot-api'
}

compileOnly('me.main__.util:SerializationConfig:1.7') {
exclude group: 'org.bukkit', module: 'bukkit'
// 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.pneumaticraft.commandhandler:CommandHandler:11') {
exclude group: 'org.bukkit', module: 'bukkit'
shadowed('com.dumptruckman.minecraft:Logging:1.1.1') {
exclude group: 'junit', module: 'junit'
}
compileOnly 'com.dumptruckman.minecraft:buscript:2.0-SNAPSHOT'
compileOnly 'org.bstats:bstats-bukkit:2.2.1'
compileOnly('com.dumptruckman.minecraft:Logging:1.1.1') {
exclude group: 'junit', module: 'junit'
shadowed 'de.themoep.idconverter:mappings:1.2-SNAPSHOT'
shadowed('org.bstats:bstats-bukkit:3.1.0') {
exclude group: 'org.bukkit', module: 'bukkit'
}
compileOnly 'de.themoep.idconverter:mappings:1.2-SNAPSHOT'
compileOnly 'org.jetbrains:annotations:16.0.2'
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('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'
}

ext.bitlyAccessToken = System.getenv('BITLY_ACCESS_TOKEN') ?: 'bitly-access-token'

java {
withSourcesJar()
withJavadocJar()
}

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

tasks.withType(Javadoc) {
options.encoding = 'UTF-8'
task prepareSource(type: Sync) {
inputs.property 'bitlyAccessToken', bitlyAccessToken
from sourceSets.main.java
into "$buildDir/src"
filter(ReplaceTokens, tokens: [
'bitly-access-token': bitlyAccessToken,
])
}


configurations {
[apiElements, runtimeElements].each {
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
}
shadowJar {
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 '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'
}

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()
}
}.each() {
it.scope*.value = 'provided'
}
}
}
}
repositories {
maven {
name = "GitHubPackages"
Expand All @@ -126,69 +112,12 @@ publishing {
password = System.getenv("GITHUB_TOKEN")
}
}

maven {
name = "multiverse"
def releasesRepoUrl = "https://repo.dumptruckman.com/multiverse-releases"
def snapshotsRepoUrl = "https://repo.dumptruckman.com/multiverse-snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
// todo: remove before mv5 release
name = "multiverseBeta"
url = "https://repo.c0ding.party/multiverse-beta"
credentials(PasswordCredentials)
}
}
}


ext.bitlyAccessToken = System.getenv('BITLY_ACCESS_TOKEN') ?: 'bitly-access-token'

task prepareSource(type: Sync) {
inputs.property 'bitlyAccessToken', bitlyAccessToken
from sourceSets.main.java
into "$buildDir/src"
filter(ReplaceTokens, tokens: [
'bitly-access-token': bitlyAccessToken,
])
}

compileJava {
source = prepareSource.outputs
}

processResources {
def props = [version: "${project.version}"]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}

// This task should never be skipped. The tests depend on this having been run but we want the new version number
// that is created after tests are run and before we run again to publish.
outputs.upToDateWhen { false }
}


javadoc {
source = sourceSets.main.allJava
classpath = configurations.compileClasspath
}


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'

configurations = [project.configurations.shadowed]

archiveFileName = "$baseName-$version.$extension"
classifier = ''
}

build.dependsOn shadowJar
jar.enabled = false
Loading
Loading