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 581 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
581 commits
Select commit Hold shift + click to select a range
07b543a
Implement AddWorldOptions to condense method parameters
benwoo1110 Sep 2, 2023
5dd22b5
Basic mvworld and offline world
benwoo1110 Sep 2, 2023
e1eae48
Implement basic create and delete world
benwoo1110 Sep 2, 2023
a8fbeb5
Update bukkit world when world config node set
benwoo1110 Sep 2, 2023
3599341
Implement basic load, unload and remove world
benwoo1110 Sep 2, 2023
1f7b8ff
Add remaining world properties methods
benwoo1110 Sep 2, 2023
7828c92
Add entryfee, spawning and spawn location
benwoo1110 Sep 2, 2023
b154606
Finish basic CRUD for new world management
benwoo1110 Sep 2, 2023
b42b77b
implement `/mv gamerules` command
zax71 Sep 2, 2023
1fef714
Fix /mv dumps to support ANSI and UTF-8 encoded log files
zax71 Sep 2, 2023
550dae9
Implement more world manager features
benwoo1110 Sep 3, 2023
f2a3d3f
Refactor newMVWorld instance creation
benwoo1110 Sep 3, 2023
dff192f
Make MVWorld constructor non-public
benwoo1110 Sep 3, 2023
3356757
Implement proper reloading of worlds config
benwoo1110 Sep 3, 2023
046840f
refactor: Remove deprecated and unused classes
benwoo1110 Sep 3, 2023
fa4391e
Merge branch 'MV5' into world-revamp-continue
benwoo1110 Sep 3, 2023
d77d703
Update list command and fix importWorld bug
benwoo1110 Sep 3, 2023
dc75e87
Move entrycheck, playerlistener and worldnamechecker to api
benwoo1110 Sep 3, 2023
f524c5b
Implement proper spawn location
benwoo1110 Sep 3, 2023
6f67306
Fix list command permissions checking
benwoo1110 Sep 3, 2023
791d8b6
Allow permission check for offline worlds
benwoo1110 Sep 3, 2023
08b87cb
Move destination to new world manager api
benwoo1110 Sep 3, 2023
4eb8dfb
Move command completion, context, conditions to new world manager api
benwoo1110 Sep 3, 2023
17dff45
Chore: codestyle changes
zax71 Sep 3, 2023
f280e20
Minor cleanup
benwoo1110 Sep 4, 2023
55703e6
Merge pull request #2989 from zax71/MV5-fix-dumps-command
benwoo1110 Sep 4, 2023
891f7ca
Remove old wm reference in bstats, tests and placeholders
benwoo1110 Sep 4, 2023
90eb1c8
Dumps command use new wm and fix some imports
benwoo1110 Sep 4, 2023
c62aa91
Move world listener to handle new world manager
benwoo1110 Sep 4, 2023
0824108
Move chat prefix to new wm and fix more imports
benwoo1110 Sep 4, 2023
0a62081
Move weather handling to new wm
benwoo1110 Sep 4, 2023
3b7a801
Implement JoinDestination and EnableJoinDestination config options
zax71 Sep 4, 2023
1ac54b7
Add i18n
zax71 Sep 4, 2023
c253dc1
Fix gamerule command permission
benwoo1110 Sep 4, 2023
32fb258
Migrate portal, entity and worldpurger to new wm
benwoo1110 Sep 4, 2023
5278ecc
Fix imports for reload command
benwoo1110 Sep 4, 2023
f519639
Fix weather and spawning
benwoo1110 Sep 4, 2023
fe26ccb
Make spawning amount apply and rename it
benwoo1110 Sep 4, 2023
82f47af
Completely remove the old WorldManager from startup
benwoo1110 Sep 4, 2023
ec0000b
Fix wrong context optional check and arg being null
benwoo1110 Sep 4, 2023
e8ca955
Implement new generator API
benwoo1110 Sep 5, 2023
80ff02a
Improve import world result
benwoo1110 Sep 5, 2023
fda0e03
Implement getPotentialWorlds
benwoo1110 Sep 5, 2023
8fc2371
Filter away already loaded worlds for getPotentialWorlds
benwoo1110 Sep 5, 2023
eb5bb4e
Implement locale error messages for wm result
benwoo1110 Sep 5, 2023
d01a884
Cleanup WorldManager and improve on locale results
benwoo1110 Sep 5, 2023
f056dcd
Better error handling of world folder deletion
benwoo1110 Sep 5, 2023
7246d43
Fix binding plugin and bump MockBukkit
benwoo1110 Sep 6, 2023
dbf0aee
Add papermc repo for mockbukkit
benwoo1110 Sep 6, 2023
b78ea7c
Whoops wrong mockbukkit version
benwoo1110 Sep 6, 2023
12aedc1
Merge pull request #2993 from Multiverse/fix-binding
benwoo1110 Sep 6, 2023
af2fc7c
Implement basic clone command
benwoo1110 Sep 6, 2023
3f07516
Implement basic regen command
benwoo1110 Sep 6, 2023
b51cd64
Bump MockBukkit with the onDisable fix
benwoo1110 Sep 7, 2023
e84fb1f
Merge pull request #2996 from Multiverse/mockbukkit-bump
benwoo1110 Sep 7, 2023
0c3d529
Merge branch 'main' into MV5
benwoo1110 Sep 7, 2023
a292c1b
Bump dependencies
benwoo1110 Sep 7, 2023
7060e60
Merge branch 'MV5' into world-revamp-continue
benwoo1110 Sep 7, 2023
0b7f324
Remove GHA test checkstyle args
benwoo1110 Sep 7, 2023
a0fa27f
Merge branch 'MV5' into world-revamp-continue
benwoo1110 Sep 7, 2023
9cb8724
Finish up regen world
benwoo1110 Sep 7, 2023
3ef72a9
Implement configurable transfer of data during regen
benwoo1110 Sep 7, 2023
6427881
Finish up clone command
benwoo1110 Sep 7, 2023
6ebcd40
Implement remaining locales for clone and regen
benwoo1110 Sep 7, 2023
7ab8f21
Better copy folder implementation with try
benwoo1110 Sep 7, 2023
89c6eb4
Refactor clone world into multiple smaller methods
benwoo1110 Sep 7, 2023
3cdf973
Refactor a better method of registering and using command flags
benwoo1110 Sep 7, 2023
f9c6c44
Add back /mvtp shorthand command
benwoo1110 Sep 7, 2023
25a5013
Merge remote-tracking branch 'origin/main' into dtm/mv5/merge_main
dumptruckman Sep 8, 2023
c4063ed
Merge pull request #2999 from Multiverse/dtm/mv5/merge_main
dumptruckman Sep 8, 2023
4f987da
Merge remote-tracking branch 'origin/main' into MV5
dumptruckman Sep 8, 2023
f1ee2ee
Merge branch 'MV5' into world-revamp-continue
benwoo1110 Sep 8, 2023
0513865
Use Try<Void> for config loading and saving
benwoo1110 Sep 8, 2023
9c703ff
Fix clone world ignore file
benwoo1110 Sep 8, 2023
1ca6b20
Apply basic checkstyle fixes to WorldManager.
dumptruckman Sep 8, 2023
7726cf3
Apply basic checkstyle fixes to MVWorld.
dumptruckman Sep 8, 2023
caba410
Apply basic checkstyle fixes to OfflineWorld.
dumptruckman Sep 8, 2023
11edd8e
Apply basic checkstyle fixes to WorldPurger.
dumptruckman Sep 8, 2023
58d37e9
Apply basic checkstyle fixes to NullLocation.
dumptruckman Sep 8, 2023
93d2311
Apply basic checkstyle fixes to WorldConfig.
dumptruckman Sep 8, 2023
cadb931
Fix adjust spawn not applying
benwoo1110 Sep 8, 2023
7582a84
Apply basic checkstyle fixes to WorldConfigNodes.
dumptruckman Sep 8, 2023
324328f
Apply basic checkstyle fixes to WorldConfigManager.
dumptruckman Sep 8, 2023
035005b
Apply basic checkstyle fixes to DataStore.
dumptruckman Sep 8, 2023
8f439ab
Merge remote-tracking branch 'origin/world-revamp-continue' into dtm/…
dumptruckman Sep 8, 2023
27ff3b7
Merge pull request #3001 from Multiverse/dtm/mv5/world-revamp-continu…
benwoo1110 Sep 8, 2023
17f2f58
Fix clone command newworld replacement id
benwoo1110 Sep 8, 2023
f0d2499
Refactor multiverse world class and getters naming
benwoo1110 Sep 8, 2023
b4617c1
Eradicate all reference of offline world
benwoo1110 Sep 8, 2023
5c7c9ba
Improve world config management with parsing of new and removed world…
benwoo1110 Sep 8, 2023
8e95c22
Refactor and fix some world manager code style
benwoo1110 Sep 9, 2023
4cbe2ea
Loosen up some codestyle
benwoo1110 Sep 9, 2023
0f105b1
pain: Add docs to the new world related classes
benwoo1110 Sep 9, 2023
48ff8d8
Switch to ContentDisplay API
zax71 Sep 9, 2023
ee4a8c8
Fix (some) of the checkstyle violations
zax71 Sep 9, 2023
2f65bf4
Merge pull request #2992 from zax71/MV5-gamerules-command
benwoo1110 Sep 9, 2023
b70960d
Add javadocs to new command flag methods
benwoo1110 Sep 9, 2023
c71bdd8
Merge pull request #2997 from Multiverse/better-flag-handling
benwoo1110 Sep 9, 2023
654c12b
Make checkstyle concessions.
dumptruckman Sep 9, 2023
ffb5780
Try github-pr-review reporter for checkstyle workflow.
dumptruckman Sep 9, 2023
f5dc049
Loosen ClassFanOutComplexity check.
dumptruckman Sep 9, 2023
ac3666c
Merge pull request #3003 from Multiverse/ben/mv5/world-revamp-codestyle
benwoo1110 Sep 9, 2023
7a8bd67
Fix more checkstyle issues in WorldManager.
dumptruckman Sep 9, 2023
09e1e11
Give pr write permission to checkstyle workflow.
dumptruckman Sep 9, 2023
1affa42
Only report on warning/error.
dumptruckman Sep 9, 2023
6fd56e5
Create private message replacement methods in WorldManager.
dumptruckman Sep 9, 2023
503d054
Temporarily reduce severity of PackageName check.
dumptruckman Sep 9, 2023
ba5c054
Add a bunch of missing package-info.java.
dumptruckman Sep 9, 2023
c1d2fe4
Reduce Result boilerplate in WorldManager.
dumptruckman Sep 9, 2023
df0db29
Fix incorrect world name var.
dumptruckman Sep 9, 2023
34b55e4
Merge pull request #3004 from Multiverse/dtm/mv5/world-revamp-continu…
dumptruckman Sep 9, 2023
700b0cc
Allow checkstyle suppression trailing comments.
dumptruckman Sep 9, 2023
c340f16
Use different parameter number checks for methods and constructors.
dumptruckman Sep 9, 2023
f556f6f
Refactor populateWorldFromConfig to be smaller.
dumptruckman Sep 9, 2023
fcbaffc
Implement basic config migration for worlds.yml
benwoo1110 Sep 9, 2023
6b40c3a
Add interface for keeping world settings for options.
dumptruckman Sep 10, 2023
e812960
Ignore DeclarationOrder check.
dumptruckman Sep 10, 2023
13b9419
Improve and fix minor migration regressions
benwoo1110 Sep 10, 2023
c61c98f
Remove serializable including whitespace and newline
benwoo1110 Sep 10, 2023
b2ed43b
Add docs to new migration classes
benwoo1110 Sep 10, 2023
1eb33c6
Clean up some return counts in WorldManager.
dumptruckman Sep 10, 2023
95a1fdd
Fix some regression on command flag registering and completion
benwoo1110 Sep 10, 2023
b8c10c4
Improve gamerules command with filter and page flag
benwoo1110 Sep 10, 2023
903941e
Fix wildcard imports for worldmanager
benwoo1110 Sep 10, 2023
1a2b885
Merge pull request #3007 from Multiverse/dtm/mv5/world-revamp-continu…
benwoo1110 Sep 10, 2023
323145e
Merge pull request #3006 from Multiverse/ben/mv5/config-migrate
benwoo1110 Sep 10, 2023
1740137
Merge branch 'MV5' into world-revamp-continue
benwoo1110 Sep 10, 2023
b780f5c
Update gamerules command to new world manager api
benwoo1110 Sep 10, 2023
e318f1e
Cleanup world purger and add docs
benwoo1110 Sep 10, 2023
c8e1143
Implement requested changes
zax71 Sep 10, 2023
d1bc672
Update src/main/java/com/onarandombox/MultiverseCore/config/MVCoreCon…
zax71 Sep 10, 2023
f987720
Revamp results to support value returns
benwoo1110 Sep 10, 2023
c8fed72
Refactor to `Result<S, F>` and `Attempt<T, F>`
benwoo1110 Sep 10, 2023
2fe6297
Fix unintended changes to result
benwoo1110 Sep 10, 2023
656d9ac
Refactor map Attempt methods
benwoo1110 Sep 10, 2023
6f9f908
Refactor world results to remove success reason
benwoo1110 Sep 10, 2023
99846b5
Add javadocs and fix some checkstyles
benwoo1110 Sep 10, 2023
8ffd716
Fix some checkstyle issues.
dumptruckman Sep 10, 2023
089655f
Fix some more checkstyle issues.
dumptruckman Sep 10, 2023
d02cd63
Merge pull request #3008 from Multiverse/ben/mv5/results
benwoo1110 Sep 11, 2023
bf7a708
Reorder and add more world blacklisted names
benwoo1110 Sep 11, 2023
7490996
Make getWorldConfig return an Option
benwoo1110 Sep 11, 2023
1745c16
Add support for nested Message within MessageReplacement and fix some…
benwoo1110 Sep 11, 2023
ba7b6ae
Upstream checkstyle changes from world revamp
benwoo1110 Sep 11, 2023
d8334ad
Refactor world results and add docs
benwoo1110 Sep 11, 2023
379e017
Fix regen world keeping seed not working
benwoo1110 Sep 11, 2023
481933b
Add support for removing players before unloading world
benwoo1110 Sep 11, 2023
a4a5be2
Use .get() for world folder, since it should fail if null
benwoo1110 Sep 11, 2023
404a2f4
Cleanup adjust spawn logic
benwoo1110 Sep 11, 2023
c2ff8a4
Make unsettable properties have null name
benwoo1110 Sep 11, 2023
ef0cb4b
Do not apply spawn location if it's a null location
benwoo1110 Sep 11, 2023
c0f2168
Copy spawn location only if seed didnt change on regen
benwoo1110 Sep 11, 2023
58c13c1
Copy spawn location when cloning world
benwoo1110 Sep 11, 2023
aa06300
Fix some checktyle issue in WorldPurger
benwoo1110 Sep 11, 2023
61570b1
Merge pull request #3012 from Multiverse/ben/mv5/improve-world-purge
benwoo1110 Sep 11, 2023
329901a
Remove public from config nodes and remove names that are the same as…
benwoo1110 Sep 11, 2023
ca9b244
Merge pull request #3011 from Multiverse/ben/mv5/upstream-checkstyle
dumptruckman Sep 11, 2023
5a474d7
Merge pull request #3010 from Multiverse/ben/mv5/nested-locale-message
dumptruckman Sep 11, 2023
86e2ab4
Change checkstyle workflow back to PR annotations without failure.
dumptruckman Sep 11, 2023
d77fb43
Add continue-on-error to step as well.
dumptruckman Sep 11, 2023
ffec23c
Add docs and fix more checkstyles
benwoo1110 Sep 11, 2023
690d956
Merge branch 'MV5' into world-revamp-continue
benwoo1110 Sep 11, 2023
46d115b
Fix LocalizationTest
benwoo1110 Sep 11, 2023
d3fa42a
Merge pull request #3013 from Multiverse/world-revamp-continue
dumptruckman Sep 11, 2023
39f3805
Fix all imports once and for all
benwoo1110 Sep 11, 2023
dd4b01f
Fix a lot of checkstyles throughout
benwoo1110 Sep 11, 2023
1dfdb61
Set back throw count to 0
benwoo1110 Sep 11, 2023
e005b26
Add a todo about the todo checkstyle to enable todo warning after mv
benwoo1110 Sep 11, 2023
9dbe7e2
Merge pull request #3014 from Multiverse/ben/mv5/a-lot-of-checkstyle
benwoo1110 Sep 11, 2023
256ac67
Optimise all imports
benwoo1110 Sep 11, 2023
e31ef14
Fix import order checkstyle and remove comment
benwoo1110 Sep 11, 2023
1812315
Merge pull request #3015 from Multiverse/ben/mv5/import-refactor
benwoo1110 Sep 11, 2023
474630d
Move package to org.mvplugins.multiverse.core
benwoo1110 Sep 11, 2023
48f9e65
Change third party relocate to `org.mvplugins.multiverse.external.`
benwoo1110 Sep 11, 2023
df7e333
Merge pull request #3016 from Multiverse/ben/mv5/repackage
benwoo1110 Sep 11, 2023
ede47e8
Fix import order check.
dumptruckman Sep 12, 2023
f6ba48c
Apply new import order changes
benwoo1110 Sep 12, 2023
5178d68
Merge pull request #3017 from Multiverse/dtm/checkstyle/imports
benwoo1110 Sep 12, 2023
d6c8d53
Merge branch 'MV5' into MV5-always-spawn-location
benwoo1110 Sep 12, 2023
57b27ce
Fix hk2 ServiceLocatorGenerator
benwoo1110 Sep 12, 2023
dc3ec52
Merge branch 'MV5' into MV5-always-spawn-location
benwoo1110 Sep 12, 2023
b78941c
Refactor join-destination config and use async teleport
benwoo1110 Sep 12, 2023
80dba50
Merge pull request #2991 from zax71/MV5-always-spawn-location
benwoo1110 Sep 12, 2023
a458497
Implement player world actions and some refactor
benwoo1110 Sep 12, 2023
f9bd7f1
Split PlayerWorldAction to PlayerWorldTeleporter and EnforcementHandler
benwoo1110 Sep 12, 2023
0e43444
Merge pull request #3018 from Multiverse/ben/mv5/player-world-action
benwoo1110 Sep 12, 2023
245fac9
Implement new AsyncSafetyTeleporter
benwoo1110 Sep 12, 2023
ef2b42d
Check for destination's checkTeleportSafety
benwoo1110 Sep 12, 2023
6f01483
Cleanup commands checkstyle and flags
benwoo1110 Sep 12, 2023
9ddfa59
Merge branch 'MV5' into ben/mv5/teleporter
benwoo1110 Sep 12, 2023
ba93195
Move logic of teleporting players out of world from world manager
benwoo1110 Sep 12, 2023
fbab3bc
Nuke the old world manager
benwoo1110 Sep 12, 2023
db0d5da
Merge pull request #3020 from Multiverse/ben/mv5/nuke-worldmanager
dumptruckman Sep 13, 2023
bc1a2ff
Merge branch 'MV5' into ben/mv5/teleporter
benwoo1110 Sep 13, 2023
404ab73
Fix imports
benwoo1110 Sep 13, 2023
2642d94
Clearer docs for tolerance and radius for getSafeLocation
benwoo1110 Sep 13, 2023
82c84c2
Implement AsyncResult, a wrapper for CompletableFuture
benwoo1110 Sep 13, 2023
2f3306a
Add class level docs for AsyncResult
benwoo1110 Sep 13, 2023
3df46bc
Add AsyncAttempt for example purposes.
dumptruckman Sep 13, 2023
23b4299
Fully implement AsyncResult
benwoo1110 Sep 14, 2023
94bcca9
Add warning of player still in world while unloading
benwoo1110 Sep 14, 2023
bf8244e
Refactor some async attempt handling
benwoo1110 Sep 14, 2023
91f9842
Merge pull request #3022 from Multiverse/dtm/mv5/teleporter_attempt
benwoo1110 Sep 14, 2023
180680f
Add method to get MultiverseWorld from a bukkit world.
benwoo1110 Sep 20, 2023
fb240a1
Add context resolving for MultiverseWorld class
benwoo1110 Sep 20, 2023
b99de26
Use MultiverseWorld instead of worldname string for RemoveCommand
benwoo1110 Sep 20, 2023
80fcf8f
Fix remove success message key
benwoo1110 Sep 20, 2023
bbfc1a0
Cleanup MultiverseCommand and add docs
benwoo1110 Sep 20, 2023
6ba51fa
Implement lowercased enum completion and fix some checkstyles
benwoo1110 Sep 20, 2023
cce0418
Cleanup NodeGroup with docs and annotation
benwoo1110 Sep 20, 2023
7fcfa64
Merge pull request #3024 from Multiverse/ben/mv5/mv-world-oncontext
benwoo1110 Sep 20, 2023
2e0ce51
Merge pull request #3026 from Multiverse/ben/mv5/enum-completion
benwoo1110 Sep 20, 2023
5dba08d
Merge pull request #3025 from Multiverse/ben/mv5/fix-remove-locale
benwoo1110 Sep 20, 2023
e4bff69
Pass multiverse core instance directly into WorldConfigNodes
benwoo1110 Sep 20, 2023
6611ec4
Make defaultValue a supplier and fix some checkstyle in ConfigNode
benwoo1110 Sep 20, 2023
6fe87fb
Implement autocomplete and string parsing for config handling
benwoo1110 Sep 20, 2023
4084cd4
Move property handling to a separate class
benwoo1110 Sep 20, 2023
f2e193e
Improve node suggest javadocs
benwoo1110 Sep 20, 2023
a2f6e20
Add injection test for AsyncSafetyTeleporter
benwoo1110 Sep 21, 2023
980d678
Merge branch 'MV5' into ben/mv5/teleporter
benwoo1110 Sep 21, 2023
2e56794
Remove UnsafeCallWrapper as now we use varv Try
benwoo1110 Sep 21, 2023
5db5b94
Fix some related checkstyles
benwoo1110 Sep 21, 2023
42ca91d
Add /mv info
zax71 Sep 21, 2023
896524b
Check some checkstyles for info command
benwoo1110 Sep 22, 2023
41f9989
Fix more checkstyles and use LinkedHashMap for info command
benwoo1110 Sep 22, 2023
61e3ffb
Add null value formatting for MapContentProvider
benwoo1110 Sep 22, 2023
3a6c523
Add more properties to info command and refactor
benwoo1110 Sep 22, 2023
13dc1bd
Support more variety of message payload for MVCommandIssuer
benwoo1110 Sep 22, 2023
4095829
Replace properties method in MVConfig to StringPropertyHandle
benwoo1110 Sep 22, 2023
ac174dc
Add /mv generators
zax71 Sep 22, 2023
62a4e7e
Merge pull request #3028 from Multiverse/ben/mv5/remove-unsafecallwra…
benwoo1110 Sep 23, 2023
01cfcc5
Merge pull request #3019 from Multiverse/ben/mv5/teleporter
benwoo1110 Sep 23, 2023
5845fdd
Merge pull request #3027 from Multiverse/ben/mv5/config-suggest-parser
benwoo1110 Sep 23, 2023
38aa2ac
Merge pull request #3030 from Multiverse/zax71/MV5/InfoCommand
benwoo1110 Sep 23, 2023
d880ea9
Merge pull request #3031 from Multiverse/ben/mv5/issuer-methods
benwoo1110 Sep 23, 2023
d6ccbd9
Fix some checkstyles for generator command
benwoo1110 Sep 23, 2023
d08e6fa
Merge pull request #3032 from Multiverse/zax71/MV5/GeneratorsCommand
benwoo1110 Sep 23, 2023
b2c1aaf
Make sure nodes is not null and fix some checkstyles
benwoo1110 Sep 23, 2023
c78dbcd
Implement ListValueNode and modify actions
benwoo1110 Sep 24, 2023
7c6d7d5
Merge /mv gamerule and /mv gamerules
zax71 Sep 24, 2023
8d50835
Implement gamerule reset
benwoo1110 Sep 25, 2023
a44361f
Merge pull request #3034 from Multiverse/zax71/MV5/gameruleCommandMerge
benwoo1110 Sep 25, 2023
af7d5a8
Remove useless MultiverseCoreListener
benwoo1110 Sep 25, 2023
454bcd3
Refactor and fix checkstyles for some listeners
benwoo1110 Sep 25, 2023
0c37c9e
Merge pull request #3033 from Multiverse/ben/mv5/list-value-node
benwoo1110 Sep 25, 2023
c24f198
Add `/mv version`
zax71 Feb 24, 2024
90b8729
Add Ben and Zax71 to authors
zax71 Feb 24, 2024
7276da7
Implement i18n
zax71 Feb 24, 2024
caed081
Update Ben's name
zax71 Mar 8, 2024
278c51d
Merge pull request #3056 from Multiverse/zax71MV5/versionCommand
benwoo1110 Mar 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
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/action-checkstyle@v0.8.4
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.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: '17'
distribution: 'adopt'
cache: gradle

Expand Down
200 changes: 167 additions & 33 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ plugins {
id 'java-library'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id "org.jetbrains.kotlin.jvm" version "1.8.10"
}

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

java.sourceCompatibility = JavaVersion.VERSION_11
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

repositories {
mavenLocal()
Expand Down Expand Up @@ -39,37 +44,104 @@ 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 = 'PlaceholderAPI'
url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
}

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
oldTestCompileClasspath.extendsFrom shadowed
oldTestRuntimeClasspath.extendsFrom shadowed

// Add configuration for old tests
oldTestImplementation.extendsFrom implementation
oldTestRuntime.extendsFrom runtime
}

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') {
// PlaceholderAPI
externalPlugin 'me.clip:placeholderapi:2.11.3'

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

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

// Utils
shadowed 'io.vavr:vavr:0.10.4'
shadowed 'org.glassfish.hk2:hk2-locator:3.0.3'
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') {
shadowed 'de.themoep.idconverter:mappings:1.2-SNAPSHOT'
shadowed 'org.bstats:bstats-bukkit:2.2.1'
shadowed 'net.minidev:json-smart:2.4.9'
shadowed 'org.jetbrains:annotations:22.0.0'
shadowed 'io.papermc:paperlib:1.0.8'

// Tests
testImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.10'
testImplementation 'com.github.seeseemelk:MockBukkit-v1.20:3.20.2'
testImplementation('com.googlecode.json-simple:json-simple:1.1.1') {
exclude group: 'junit', module: 'junit'
}
compileOnly 'de.themoep.idconverter:mappings:1.2-SNAPSHOT'
compileOnly 'org.jetbrains:annotations:16.0.2'
testImplementation 'org.jetbrains.kotlin:kotlin-test'
testImplementation 'com.natpryce:hamkrest:1.8.0.1'
testImplementation 'org.mockito.kotlin:mockito-kotlin:4.1.0'

testImplementation 'org.spigotmc:spigot-api:1.19.3-R0.1-SNAPSHOT'
testImplementation('com.googlecode.json-simple:json-simple:1.1.1') {
// Old Tests
oldTestImplementation 'org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT'
oldTestImplementation('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'
oldTestImplementation 'junit:junit:4.13.1'
oldTestImplementation 'org.mockito:mockito-core:3.11.2'
oldTestImplementation 'commons-io:commons-io:2.7'

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


Expand All @@ -92,28 +164,52 @@ 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
sourceSets {
oldTest {
java {
compileClasspath += main.output
runtimeClasspath += main.output
srcDir file('src/old-test/java')
}
resources.srcDir file('src/old-test/resources')
}
}


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 Down Expand Up @@ -144,6 +240,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 @@ -168,20 +277,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 = ''

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

build.dependsOn shadowJar
jar.enabled = false

test {
useJUnitPlatform()

testLogging {
exceptionFormat = 'full'
}
}