Skip to content
Merged

MV5 #514

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
208 commits
Select commit Hold shift + click to select a range
b5f8eb1
chore: Remove all old API stuff
benwoo1110 Feb 13, 2023
cb50110
chore: Bump version to 5.0.0-SNAPSHOT
benwoo1110 Feb 16, 2023
315902e
refactor: Update MultiverseInventories to core api changes
benwoo1110 Feb 16, 2023
9d6b345
chore: Remove unneeded imports
benwoo1110 Feb 16, 2023
0f53ba3
refactor: Remove old getRequiredProtocol
benwoo1110 Feb 16, 2023
67f0532
Merge branch 'main' into MV5
benwoo1110 Nov 22, 2024
9c9093e
Base migration to support new mv5 core
benwoo1110 Nov 22, 2024
e841662
Fix build issue with hk2
benwoo1110 Nov 22, 2024
bb1cbb5
Implement group, info, list, reload and toggle commands
benwoo1110 Nov 22, 2024
fde6c67
Refactor to new package naming
benwoo1110 Nov 22, 2024
ded0d99
Use temp repo for mv5 to build
benwoo1110 Nov 23, 2024
db81d6a
Use pr test workflow from MV5 instead of main
benwoo1110 Nov 23, 2024
d86eff6
Update from MVVersionEvent to MVDumpsDebugInfoEvent
benwoo1110 Nov 25, 2024
5e354d8
Merge pull request #554 from Multiverse/ben/mv5/mv5-core
benwoo1110 Dec 29, 2024
275181e
Update async teleport for last_location
benwoo1110 Jan 3, 2025
1a0616c
Fix respawn location not deemed as a bed location
benwoo1110 Jan 3, 2025
9aae32e
Refactor and check respawn location for null before finding bed block
benwoo1110 Jan 4, 2025
9a64417
Update to use new AsyncSafetyTeleporter api
benwoo1110 Jan 10, 2025
546a6d7
Attempt to use PlayerSpawnChangeEvent
benwoo1110 Jan 16, 2025
aacd504
Properly update spawn change for group
benwoo1110 Jan 16, 2025
4d1a0f6
Force setBedSpawnLocation
benwoo1110 Jan 16, 2025
9fa16f1
Dont set if group is not sharing bed_spawn
benwoo1110 Jan 16, 2025
c35d6cc
Update to align with new core api
benwoo1110 Jan 18, 2025
4f7dc75
Set continueOnSerializationError for json configuration
benwoo1110 Jan 18, 2025
e41641c
Add ACCEPT_TAILLING_SPACE flag to JSONParser
benwoo1110 Jan 18, 2025
c096041
Implement helper class SingleShareWriter
benwoo1110 Jan 19, 2025
f764e31
Write last location when player quits
benwoo1110 Jan 19, 2025
ea8ebd8
Debug log in SingleShareWriter
benwoo1110 Jan 19, 2025
f7a82c9
Rework hk2 to support mockbukkit tests
benwoo1110 Jan 20, 2025
604a62d
Refactor gradle to make it more organised
benwoo1110 Jan 25, 2025
9e6402b
Merge pull request #558 from Multiverse/ben/mv5/tests
benwoo1110 Jan 25, 2025
d4d05a0
Update api to support latest core
benwoo1110 Jan 25, 2025
a599ece
Some cleanup to PersistingProfile and codestyle
benwoo1110 Jan 25, 2025
82d61f0
Convert to use core's CommentedConfiguration
benwoo1110 Jan 19, 2025
676f991
Fix PersistingProfile import
benwoo1110 Jan 25, 2025
d0bc5eb
Merge pull request #559 from Multiverse/ben/mv5/config-api
benwoo1110 Jan 25, 2025
6a6d940
Fix @Service annotation import
benwoo1110 Jan 25, 2025
f9968d7
Merge branch 'refs/heads/ben/mv5/singlesharablewrite' into ben/mv5/in…
benwoo1110 Jan 25, 2025
274aca9
Move everything to hk2 injection
benwoo1110 Jan 25, 2025
d846010
Make ShareHandlingUpdater public to allow being called by onDisable
benwoo1110 Jan 25, 2025
d55d5a8
Fix ShareHandlingUpdater update methods should be public
benwoo1110 Jan 25, 2025
3310d89
Remove use of paperlib
benwoo1110 Jan 25, 2025
a9afa2c
Re-add WorldGroupManager as interface and AbstractWorldGroupManager
benwoo1110 Jan 27, 2025
d178da6
Fix import manager dep error
benwoo1110 Jan 27, 2025
53729db
Re-implement ProfileDataSource as an interface
benwoo1110 Jan 27, 2025
17181ef
Plugin class cannot be final for mockbukkit tests to work
benwoo1110 Jan 27, 2025
ea4ebe7
Merge branch 'ben/mv5/singlesharablewrite' into MV5
benwoo1110 Jan 28, 2025
f16b5b0
Merge branch 'MV5' into ben/mv5/inject
benwoo1110 Jan 29, 2025
e16f4bb
Merge pull request #560 from Multiverse/ben/mv5/inject
benwoo1110 Jan 29, 2025
403b5ea
Fix player name change migration
benwoo1110 Jan 31, 2025
91a116c
Move inventories config to use new config api
benwoo1110 Jan 31, 2025
c4ad2ae
Remove deprecated WorldGroupManager methods
benwoo1110 Jan 31, 2025
422a678
Replace deprecated use of player name in favour of player uuid
benwoo1110 Jan 31, 2025
a0ce5c5
Merge pull request #561 from Multiverse/ben/mv5/playernamechange
benwoo1110 Feb 3, 2025
189d975
Merge pull request #562 from Multiverse/ben/mv5/newconfig
benwoo1110 Feb 3, 2025
f274e29
Merge pull request #563 from Multiverse/ben/mv5/remove-deprecated
benwoo1110 Feb 3, 2025
c0b2c2c
Convert locale messages from yml to properties file
benwoo1110 Feb 3, 2025
8d817ca
Use build logic from custom gradle plugins
benwoo1110 Feb 3, 2025
eed936c
Fix all command not registering
benwoo1110 Feb 3, 2025
51a5df4
Fix some gradle configs
benwoo1110 Feb 3, 2025
3128363
Merge pull request #565 from Multiverse/ben/mv5/gradle-plugin
benwoo1110 Feb 3, 2025
84f0263
Make serializers package private
benwoo1110 Feb 4, 2025
e52c95b
Implement various tests for gameplay behaviour and api classes
benwoo1110 Feb 4, 2025
d6cb230
Bump mockbukkit that fixes ItemMeta serialization
benwoo1110 Feb 5, 2025
53f00be
Merge pull request #566 from Multiverse/ben/mv5/tests
benwoo1110 Feb 5, 2025
4378541
Enable debug log for tests
benwoo1110 Feb 5, 2025
48baa83
Revamp 3rd party plugin import with perworldinventory support
benwoo1110 Feb 6, 2025
d8a7dd1
Check for valid data importer before adding to queue
benwoo1110 Feb 8, 2025
e024b4e
Add performance test for global profile
benwoo1110 Feb 8, 2025
4e0c4e4
Refactor global profile to improve efficiency
benwoo1110 Feb 8, 2025
499e903
Abstract out file operations to ProfileFileIO
benwoo1110 Feb 8, 2025
b2cc300
Improve player profile performance with config cache
benwoo1110 Feb 8, 2025
6580584
Clear profile cache with profile key predicate
benwoo1110 Feb 8, 2025
43db3ff
Invalidate configCache as well
benwoo1110 Feb 8, 2025
8fb6d0c
Fix profile being updated for ungrouped world even when default_ungro…
benwoo1110 Feb 8, 2025
4fa7502
Merge pull request #567 from Multiverse/ben/mv5/import
benwoo1110 Feb 8, 2025
a791580
Merge pull request #569 from Multiverse/ben/mv5/improve-global-profile
benwoo1110 Feb 8, 2025
6e2e514
Merge pull request #568 from Multiverse/ben/mv5/fix-default-group
benwoo1110 Feb 8, 2025
60cc22d
Write last_location for gamemode change
benwoo1110 Feb 8, 2025
7965303
Only verify player name if global profile exists for player
benwoo1110 Feb 8, 2025
2922dc4
Cleanup share handling classes
benwoo1110 Feb 9, 2025
d2e9509
Convert all messages to use core's locale system
benwoo1110 Feb 9, 2025
55b9325
Some minor code cleanup
benwoo1110 Feb 9, 2025
2143369
Log world change sharehandle time taken
benwoo1110 Feb 10, 2025
acc420a
Improve null checking for maxhealth attribute
benwoo1110 Feb 10, 2025
eae0b35
Use separate thread and implement async write for global profile
benwoo1110 Feb 11, 2025
3d24c1a
Reduce number of global profile writes when player join
benwoo1110 Feb 11, 2025
56c9892
Minor cleanup
benwoo1110 Feb 15, 2025
91ed12d
Add max_health sharable
benwoo1110 Feb 10, 2025
5db12e7
Fix javadocs return
benwoo1110 Feb 15, 2025
9a1c102
Merge pull request #571 from Multiverse/ben/mv5/max-health
benwoo1110 Feb 15, 2025
d80ad60
Add group modification commands
benwoo1110 Feb 15, 2025
af16d59
Add worlds and shares params to create command
benwoo1110 Feb 15, 2025
1da061d
Further optimize player profile
benwoo1110 Feb 16, 2025
9cf3295
Add cache command
benwoo1110 Feb 16, 2025
40e9b33
Refactor profile source with cache info
benwoo1110 Feb 16, 2025
d2be8ef
Add health stats test on world change
benwoo1110 Feb 22, 2025
de6a720
Remove useless put to cache
benwoo1110 Feb 22, 2025
b41e21f
Return Future<Void> for threaded profile task
benwoo1110 Feb 22, 2025
5a893e6
Remove handling of config file from ProfileFileIO
benwoo1110 Feb 22, 2025
af5ace4
Save spawn location to disk on change
benwoo1110 Feb 22, 2025
307251f
Clone last location object before storing it
benwoo1110 Feb 22, 2025
b0e2a8f
Improve debug logs for SingleShareWriter
benwoo1110 Feb 22, 2025
6d405b6
Merge pull request #573 from Multiverse/single-share-writer
benwoo1110 Feb 22, 2025
da9a130
Merge branch 'MV5' into ben/mv5/refactor-profile-source
benwoo1110 Feb 22, 2025
fcf4c92
Merge pull request #572 from Multiverse/ben/mv5/refactor-profile-source
benwoo1110 Feb 22, 2025
58d430e
Implement command completion for toggle and import command
benwoo1110 Feb 22, 2025
1458781
Update to 1.0.2 of gradle plugins.
benwoo1110 Feb 26, 2025
9e9dcc3
Restructure configuration
benwoo1110 Mar 1, 2025
98dc909
Refactor share handling to reduce complexity
benwoo1110 Mar 1, 2025
0d63d52
Move mvcore events handling to a seperate listener class
benwoo1110 Mar 1, 2025
6534239
Add config options for last-location and PlayerSpawnChangeEvent
benwoo1110 Mar 1, 2025
c9d2c2a
Implement disabled share feature
benwoo1110 Mar 1, 2025
e7882ee
Rename to playerFileCache
benwoo1110 Mar 1, 2025
ab755c8
Merge pull request #575 from Multiverse/ben/mv5/disabled-shares
benwoo1110 Mar 1, 2025
1eeaa06
Add basic config test
benwoo1110 Mar 1, 2025
f88dd5e
Add config command
benwoo1110 Mar 2, 2025
ab9c231
Add disable share command
benwoo1110 Mar 2, 2025
c3c16cd
Add safe multithreaded file io with CountDownLatch
benwoo1110 Mar 2, 2025
4e91c7f
Use caffine asynccache
benwoo1110 Mar 2, 2025
d8ee476
Remove use of weakhashmap in container
benwoo1110 Mar 2, 2025
0980c30
Revamp share handling order
benwoo1110 Mar 3, 2025
49943c9
Add async methods for getGlobalProfile
benwoo1110 Mar 3, 2025
06a5174
Implement always write world profile config option
benwoo1110 Mar 3, 2025
9f5120d
Fix relocate dep issue
benwoo1110 Mar 3, 2025
d653854
Add ability to preload profile data on player join
benwoo1110 Mar 3, 2025
f1589fa
Fix config test issue
benwoo1110 Mar 3, 2025
82ff8ca
Ignore PlayerSpawnChangeEvent if its called by sharable
benwoo1110 Mar 5, 2025
8a785d2
Remove debugging messages
benwoo1110 Mar 5, 2025
5c85eb0
Improve teleport performance test with actual playerdata
benwoo1110 Mar 5, 2025
b1455fe
Merge pull request #576 from Multiverse/ben/mv5/async-cache
benwoo1110 Mar 5, 2025
cd89bfa
Improve config comments
benwoo1110 Mar 5, 2025
c0879aa
Implement apply-last-location-for-all-teleports config option
benwoo1110 Mar 5, 2025
2f2fd0d
Use runTaskLater instead of scheduleSyncDelayTask
benwoo1110 Mar 6, 2025
d0d2ab5
Remove old test
benwoo1110 Mar 6, 2025
85a36d3
Add tests config migration
benwoo1110 Mar 6, 2025
3ee9564
Add cache stats to debug dumps info
benwoo1110 Mar 6, 2025
356a776
Add luckperms context support for worldgroup
benwoo1110 Mar 22, 2025
441a867
Make luckperms dependency compileOnly
benwoo1110 Mar 22, 2025
fe309f7
Implement advancement, recipe and gamestats optional sharables.
benwoo1110 Mar 22, 2025
0112f50
Update to suppport core api changes
benwoo1110 Mar 24, 2025
3b0c567
Improve advancement sharable logic
benwoo1110 Mar 24, 2025
b005151
Fix creategroup CommandCompletion string
benwoo1110 Mar 24, 2025
661f3d3
Add support for paper's better ItemStack byte serialization
benwoo1110 Mar 28, 2025
0b29e1d
Fix Sharables and ItemStackConverter init
benwoo1110 Mar 29, 2025
431b1c6
Add colour to log share handling time taken
benwoo1110 Mar 29, 2025
2f049a9
Optimise recipe NamespacedKey storage
benwoo1110 Mar 29, 2025
3e69bd0
Fix config tests
benwoo1110 Mar 29, 2025
74f21d1
Merge pull request #579 from Multiverse/ben/mv5/recipe
benwoo1110 Mar 29, 2025
83659fa
Merge pull request #578 from Multiverse/ben/mv5/byte-serialization
benwoo1110 Mar 29, 2025
f30c5da
Refactor CountDownLatch checking and properly pass CompletableFuture …
benwoo1110 Mar 29, 2025
b645c10
Add sleep to gamemode test
benwoo1110 Mar 29, 2025
5d4fbd1
Improve comments explanation on byte serialisation
benwoo1110 Mar 29, 2025
959c152
Refactor some class access modifiers
benwoo1110 Mar 29, 2025
f906395
Update for latest core api changes
benwoo1110 Mar 29, 2025
20abba6
Spectator gamemode has their own profile
benwoo1110 Mar 29, 2025
d17179e
Improve handling of save on exit and apply on login
benwoo1110 Mar 30, 2025
09a3237
Implement give command
benwoo1110 Mar 30, 2025
d75fa6d
Fix GameModeShareHandler profile type logic error
benwoo1110 Apr 2, 2025
3b25d3d
Initial implementation of nbt migration
benwoo1110 Apr 2, 2025
2ad41bf
Refactor out some FlatFileProfileDataSource functions into smaller in…
benwoo1110 Apr 2, 2025
4c41187
Further refactor ProfileDataSource
benwoo1110 Apr 3, 2025
c3c65d1
Improve migrate inventory-serialization logic
benwoo1110 Apr 3, 2025
25e10ff
Scaffold bulkedit commands
benwoo1110 Apr 3, 2025
13d4f08
Add counter and duration to migration output
benwoo1110 Apr 3, 2025
fbc1151
Merge pull request #581 from Multiverse/ben/mv5/profile-refactor
benwoo1110 Apr 3, 2025
ffb176b
Fix profileCacheManager provider to be private
benwoo1110 Apr 4, 2025
bfe2395
Fix command conditions not registering
benwoo1110 Apr 4, 2025
183089c
Update for core's api changes
benwoo1110 Apr 6, 2025
2b99c3c
Remove save-playerdata-on-quit and make it a standard behaviour
benwoo1110 Apr 8, 2025
4214f98
Update to latest core api
benwoo1110 Apr 8, 2025
2651426
Simplify profile type handling for give command
benwoo1110 Apr 8, 2025
0ee0bf9
Add confirmation for migrate inventory serialization command
benwoo1110 Apr 8, 2025
6f9ad7f
Implement legacy command alias
benwoo1110 Apr 9, 2025
66723f3
Cleanup use of @CommandAlias("mvinv")
benwoo1110 Apr 9, 2025
7c4ea39
Fix command injection test
benwoo1110 Apr 9, 2025
2b2c753
Fix give command syntax
benwoo1110 Apr 9, 2025
1d87788
Use shared methods from MultiverseModule
benwoo1110 Apr 13, 2025
c5de7b3
Properly shutdown dependency injection
benwoo1110 Apr 13, 2025
3c45808
Make bulkdedit command classes non public
benwoo1110 Apr 13, 2025
0fe2ebb
Use profilekeys for PersistingProfile instead of loading the profile …
benwoo1110 Apr 13, 2025
ed2e533
use `-` for multi-word subcommands
benwoo1110 Apr 13, 2025
13a1500
Add bulkedit migrate player-name
benwoo1110 Apr 13, 2025
5291484
Implement global profile modify and clear command
benwoo1110 Apr 13, 2025
70bed2a
Fix global profile clear command
benwoo1110 Apr 13, 2025
02819b3
Whoops command injection test again
benwoo1110 Apr 13, 2025
8095efc
Implement player name mapper
benwoo1110 Apr 14, 2025
bffb291
Improve player name mapper loading and add tests
benwoo1110 Apr 14, 2025
d60259d
Use player names mapper data to tab complete and parse profile for bu…
benwoo1110 Apr 14, 2025
df08d84
Improve itemstack empty check
benwoo1110 Apr 14, 2025
ba5f7f8
Merge pull request #584 from Multiverse/ben/mv5/playername-mapper
benwoo1110 Apr 14, 2025
cc9fb13
Implement basic clear and delete playerprofile bulkedit
benwoo1110 Apr 19, 2025
dae2d8e
Implement bulkedit action abstraction
benwoo1110 Apr 20, 2025
2eb11f3
Improve `/mvinv give` tab complete and add profile type support
benwoo1110 Apr 20, 2025
42cbb11
Merge pull request #585 from Multiverse/ben/mv5/player-profile-bulkedit
benwoo1110 Apr 20, 2025
f070647
Keys to use playernamemapper instead of bukkit's offlineplayer api
benwoo1110 Apr 20, 2025
c13fd1d
Add javadocs to ProfileDataSource
benwoo1110 Apr 22, 2025
723a8fd
Refactor ProfileData classes to separate package
benwoo1110 Apr 22, 2025
4bcee54
Implement MultiverseInventoriesApi
benwoo1110 Apr 24, 2025
83d9675
Refactor bulkedit api to expose less classes, and implement BulkEditC…
benwoo1110 Apr 25, 2025
f136dcc
Implement global profile clear as a BulkEditAction
benwoo1110 Apr 25, 2025
e0b73cb
Add more tests for share handling
benwoo1110 Apr 25, 2025
50545ee
Rename import command to migrate command
benwoo1110 Apr 25, 2025
f7b7f1d
Improve error message of global profile load/save
benwoo1110 Apr 25, 2025
4742952
Merge branch 'main' into MV5
benwoo1110 Apr 25, 2025
4dcbaff
Change migrate command permissions
benwoo1110 Apr 28, 2025
da4000b
Bump multiverse gradle plugin version
benwoo1110 Apr 28, 2025
0733654
A cool new banner!
benwoo1110 Apr 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ on:

jobs:
test:
uses: Multiverse/Multiverse-Core/.github/workflows/generic.test.yml@main
uses: Multiverse/Multiverse-Core/.github/workflows/generic.test.yml@MV5 # todo: Change back to main before release
with:
plugin_name: multiverse-inventories
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<p align="center">
<img src="https://raw.githubusercontent.com/Multiverse/Multiverse-Core/main/config/multiverse2-long.png" alt="Multiverse Logo">
<img src="config/multiverse-banner.png" alt="Multiverse Logo">
</p>

# Multiverse Inventories

[![Modrinth](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/modrinth_vector.svg)](https://modrinth.com/plugin/multiverse-inventories)
[![Hangar](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/hangar_vector.svg)](https://hangar.papermc.io/Multiverse/Multiverse-Inventories)
[![Bukkit](https://raw.githubusercontent.com/intergrav/devins-badges/refs/heads/v3/assets/cozy/available/bukkit_vector.svg)](https://dev.bukkit.org/projects/multiverse-inventories)
Expand All @@ -17,11 +15,11 @@

[Multiverse Inventories](https://dev.bukkit.org/projects/multiverse-inventories) is an add-on Plugin for [Multiverse core](https://dev.bukkit.org/projects/multiverse-core) that lets players have separate inventories **per world!** This makes it possible to create multi gamemode servers without Velocity or Bungee!

Now it's time to create your very own server with Multiverse Inventories, do check out our [Wiki](https://github.com/Multiverse/Multiverse-Core/wiki/Home-(Inventories)) and [Usage Guide](https://github.com/Multiverse/Multiverse-Core/wiki/Basics-(Inventories)) to get started. Feel free to hop onto our [Discord](https://discord.gg/NZtfKky) if you have any questions or just want to have a chat with us!
Now it's time to create your very own server with Multiverse Inventories, do check out our [Wiki](https://mvplugins.org) and [Usage Guide](https://mvplugins.org/inventories/fundamentals/basic-usage/) to get started. Feel free to hop onto our [Discord](https://discord.gg/NZtfKky) if you have any questions or just want to have a chat with us!

## Our other amazing sub-modules:

With just [Multiverse Core](https://github.com/multiverse/multiverse) and any of the below plugins, you can access all of these other related features in the Multiverse ecosystem.
With just [Multiverse Core](https://github.com/multiverse/multiverse-core) and any of the below plugins, you can access all of these other related features in the Multiverse ecosystem.

* [Multiverse-NetherPortals](https://github.com/Multiverse/Multiverse-NetherPortals) -> Have separate nether and end worlds for each of your overworlds!
* [Multiverse-Portals](https://github.com/Multiverse/Multiverse-Portals) -> Make custom portals to go to any destination!
Expand All @@ -38,7 +36,7 @@ Simply build the source with Gradle:
**Want to help improve Multiverse Inventories?** There are several ways you can support and contribute to the project.
* Take a look at our "Bug: Unconfirmed" issues, where you can find issues that need extra testing and investigation.
* Want others to love Multiverse too? You can join the [Multiverse Discord community](https://discord.gg/NZtfKky) and help others with issues and setup!
* A Multiverse guru? You can update our [Wiki](https://github.com/Multiverse/Multiverse-Core/wiki) with your latest tips, tricks and guides! The wiki open for all to edit and improve.
* A Multiverse guru? You can update our [Wiki](https://github.com/Multiverse/multiverse-web) with your latest tips, tricks and guides! The wiki open for all to edit and improve.
* Love coding? You could look at ["State: Open to PR"](https://github.com/Multiverse/Multiverse-Inventories/labels/State%3A%20Open%20to%20PR) and ["Resolution: Accepted"](https://github.com/Multiverse/Multiverse-Inventories/labels/Resolution%3A%20Accepted) issues. We're always happy to receive bug fixes and feature additions as [pull requests](https://www.freecodecamp.org/news/how-to-make-your-first-pull-request-on-github-3/).
* If you'd like to make a financial contribution to the project, do consider joining our [Patreon](https://www.patreon.com/dumptruckman) or make a one-time donation [here](https://paypal.me/dumptruckman)!

Expand Down
171 changes: 59 additions & 112 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,106 +1,98 @@
plugins {
id 'java-library'
id 'maven-publish'
id 'checkstyle'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'org.mvplugins.multiverse-plugin' version '1.1.0'
}

version = System.getenv('GITHUB_VERSION') ?: 'local'
group = 'com.onarandombox.multiverseinventories'
group = 'org.mvplugins.multiverse.inventories'
description = 'Multiverse-Inventories'

java.sourceCompatibility = JavaVersion.VERSION_11

repositories {
mavenLocal()
mavenCentral()

maven {
name = 'onarandombox'
url = uri('https://repo.onarandombox.com/content/groups/public')
name = 'codemc'
url = uri('https://repo.codemc.org/repository/maven-releases')
}

maven {
name ='papermc'
url = uri('https://papermc.io/repo/repository/maven-public/')
name = 'benwoo1110'
url = uri('https://repo.c0ding.party/multiverse-beta')
}
}

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

dependencies {
// Spigot
implementation('org.bukkit:bukkit:1.14.4-R0.1-SNAPSHOT') {
exclude group: 'junit', module: 'junit'
}
// Server API
// TODO make our custom plugin target paper instead of spigot
externalPlugin 'io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT'

// Core
implementation('com.onarandombox.multiversecore:Multiverse-Core:4.2.2') {
exclude group: 'me.main__.util', module: 'SerializationConfig'
}
// TODO update to correct version once we have it published
externalPlugin 'org.mvplugins.multiverse.core:multiverse-core:5.0.0-SNAPSHOT'

// Config
api 'com.dumptruckman.minecraft:JsonConfiguration:1.1'
api ('com.googlecode.json-simple:json-simple:1.1.1') {
exclude group: 'junit', module: 'junit'
}
shadowed 'com.dumptruckman.minecraft:JsonConfiguration:1.2-SNAPSHOT'
shadowed 'net.minidev:json-smart:2.5.1'

// Utils
api 'io.papermc:paperlib:1.0.7'
api('com.dumptruckman.minecraft:Logging:1.1.1') {
shadowed('com.dumptruckman.minecraft:Logging:1.1.1') {
exclude group: 'junit', module: 'junit'
}

// Caching
shadowed("com.github.ben-manes.caffeine:caffeine:3.2.0")

// Luckperms for group context
compileOnly 'net.luckperms:api:5.4'

// Other plugins for import
implementation('uk.co:MultiInv:3.0.6') {
compileOnly('uk.co:MultiInv:3.0.6') {
exclude group: '*', module: '*'
}
implementation('me.drayshak:WorldInventories:1.0.2') {
compileOnly('me.drayshak:WorldInventories:1.0.2') {
exclude group: '*', module: '*'
}

// Legacy Multiverse-Adventure
implementation('com.onarandombox.multiverseadventure:Multiverse-Adventure:2.5.0-SNAPSHOT') {
// perworldinventory is weird and has snakeyaml included in the jar, so we can only use compileOnly for build to work properly
compileOnly('me.ebonjaeger:perworldinventory-kt:2.3.2') {
exclude group: '*', module: '*'
}

// Tests
testImplementation 'com.github.MilkBowl:VaultAPI:1.7.1'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:3.11.2'
}


java {
withSourcesJar()
withJavadocJar()
}

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
// hk2 for annotation processing only
compileOnly('org.glassfish.hk2:hk2-api:3.0.3') {
exclude group: '*', module: '*'
}
annotationProcessor 'org.glassfish.hk2:hk2-metadata-generator:3.0.3'
testAnnotationProcessor 'org.glassfish.hk2:hk2-metadata-generator:3.0.3'
}

tasks.withType(Javadoc).configureEach {
options.encoding = 'UTF-8'
shadowJar {
relocate 'com.dumptruckman.minecraft.util.Logging', 'org.mvplugins.multiverse.inventories.utils.InvLogging'
relocate 'com.dumptruckman.minecraft.util.DebugLog', 'org.mvplugins.multiverse.inventories.utils.DebugFileLogger'
relocate 'com.dumptruckman.bukkit.configuration', 'org.mvplugins.multiverse.inventories.utils.configuration'
relocate 'net.minidev', 'org.mvplugins.multiverse.inventories.utils.minidev'
relocate 'com.github.benmanes', 'org.mvplugins.multiverse.inventories.utils.benmanes'
relocate 'com.google.errorprone', 'org.mvplugins.multiverse.inventories.utils.errorprone'

dependencies {
exclude(dependency {
it.moduleGroup == 'org.ow2.asm'
})
exclude(dependency {
it.moduleGroup == 'org.jetbrains'
})
}
}


configurations {
[apiElements, runtimeElements].each {
it.outgoing.artifacts.removeIf { it.buildDependencies.getDependencies(null).contains(jar) }
it.outgoing.artifact(shadowJar)
}
checkstyle {
toolVersion = '6.1.1'
configFile file('config/mv_checks.xml')
ignoreFailures = true
}

publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
repositories {
maven {
name = "GitHubPackages"
Expand All @@ -110,57 +102,12 @@ publishing {
password = System.getenv("GITHUB_TOKEN")
}
}

maven {
name = "multiverse"
def releasesRepoUrl = "https://repo.onarandombox.com/multiverse-releases"
def snapshotsRepoUrl = "https://repo.onarandombox.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)
}
}
}


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 }
}


checkstyle {
toolVersion = '6.1.1'
configFile file('config/mv_checks.xml')
ignoreFailures = true
}


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


project.configurations.api.canBeResolved = true

shadowJar {
relocate 'com.dumptruckman.minecraft.util.Logging', 'com.onarandombox.multiverseinventories.utils.InvLogging'
relocate 'com.dumptruckman.minecraft.util.DebugLog', 'com.onarandombox.multiverseinventories.utils.DebugFileLogger'
relocate 'com.dumptruckman.bukkit.configuration', 'com.onarandombox.multiverseinventories.utils.configuration'
relocate 'io.papermc.lib', 'com.onarandombox.multiverseinventories.utils.paperlib'
relocate 'net.minidev.json', 'com.onarandombox.multiverseinventories.utils.json'

configurations = [project.configurations.api]

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

build.dependsOn shadowJar
jar.enabled = false
Binary file added config/multiverse-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
9 changes: 9 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,13 @@
* This file was generated by the Gradle 'init' task.
*/

pluginManagement {
repositories {
gradlePluginPortal()
maven {
url = uri('https://repo.onarandombox.com/multiverse-releases')
}
}
}

rootProject.name = 'multiverse-inventories'

This file was deleted.

This file was deleted.

Loading
Loading