Skip to content

Commit 5e354d8

Browse files
authored
Merge pull request #554 from Multiverse/ben/mv5/mv5-core
Ben/mv5/mv5 core
2 parents 67f0532 + d86eff6 commit 5e354d8

File tree

123 files changed

+4965
-4673
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+4965
-4673
lines changed

.github/workflows/pr.test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ on:
66

77
jobs:
88
test:
9-
uses: Multiverse/Multiverse-Core/.github/workflows/generic.test.yml@main
9+
uses: Multiverse/Multiverse-Core/.github/workflows/generic.test.yml@MV5 # todo: Change back to main before release
1010
with:
1111
plugin_name: multiverse-inventories

build.gradle

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,22 @@ plugins {
22
id 'java-library'
33
id 'maven-publish'
44
id 'checkstyle'
5-
id 'com.github.johnrengelman.shadow' version '7.1.2'
5+
id 'com.gradleup.shadow' version '8.3.5'
66
}
77

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

12-
java.sourceCompatibility = JavaVersion.VERSION_11
12+
compileJava {
13+
sourceCompatibility = JavaVersion.VERSION_17
14+
targetCompatibility = JavaVersion.VERSION_17
15+
}
16+
17+
// todo: Enable test when convert them to use mockbukkit like mv-core
18+
compileTestJava {
19+
enabled = false
20+
}
1321

1422
repositories {
1523
mavenLocal()
@@ -29,6 +37,11 @@ repositories {
2937
name = 'jitpack.io'
3038
url = uri('https://jitpack.io/')
3139
}
40+
41+
maven {
42+
name = 'benwoo1110'
43+
url = uri('https://repo.c0ding.party/multiverse-beta')
44+
}
3245
}
3346

3447
dependencies {
@@ -38,9 +51,8 @@ dependencies {
3851
}
3952

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

4557
// Config
4658
api 'com.dumptruckman.minecraft:JsonConfiguration:1.1'
@@ -62,11 +74,6 @@ dependencies {
6274
exclude group: '*', module: '*'
6375
}
6476

65-
// Legacy Multiverse-Adventure
66-
implementation('com.onarandombox.multiverseadventure:Multiverse-Adventure:2.5.0-SNAPSHOT') {
67-
exclude group: '*', module: '*'
68-
}
69-
7077
// Tests
7178
testImplementation 'com.github.MilkBowl:VaultAPI:1.7.1'
7279
testImplementation 'junit:junit:4.13.2'
@@ -144,16 +151,28 @@ javadoc {
144151
project.configurations.api.canBeResolved = true
145152

146153
shadowJar {
147-
relocate 'com.dumptruckman.minecraft.util.Logging', 'com.onarandombox.multiverseinventories.utils.InvLogging'
148-
relocate 'com.dumptruckman.minecraft.util.DebugLog', 'com.onarandombox.multiverseinventories.utils.DebugFileLogger'
149-
relocate 'com.dumptruckman.bukkit.configuration', 'com.onarandombox.multiverseinventories.utils.configuration'
150-
relocate 'io.papermc.lib', 'com.onarandombox.multiverseinventories.utils.paperlib'
151-
relocate 'net.minidev.json', 'com.onarandombox.multiverseinventories.utils.json'
154+
relocate 'com.dumptruckman.minecraft.util.Logging', 'org.mvplugins.multiverse.inventories.utils.InvLogging'
155+
relocate 'com.dumptruckman.minecraft.util.DebugLog', 'org.mvplugins.multiverse.inventories.utils.DebugFileLogger'
156+
relocate 'com.dumptruckman.bukkit.configuration', 'org.mvplugins.multiverse.inventories.utils.configuration'
157+
relocate 'io.papermc.lib', 'org.mvplugins.multiverse.inventories.utils.paperlib'
158+
relocate 'net.minidev.json', 'org.mvplugins.multiverse.inventories.utils.json'
152159

153160
configurations = [project.configurations.api]
154161

155-
archiveFileName = "$baseName-$version.$extension"
162+
archiveClassifier.set('')
156163
}
157164

158165
build.dependsOn shadowJar
159166
jar.enabled = false
167+
168+
169+
tasks.register('runHabitatGenerator', JavaExec) {
170+
classpath = configurations["compileClasspath"]
171+
mainClass.set('org.mvplugins.multiverse.external.jvnet.hk2.generator.HabitatGenerator')
172+
173+
args = [
174+
'--file', "build/libs/multiverse-inventories-$version" + ".jar",
175+
'--locator', 'Multiverse-Inventories',
176+
]
177+
}
178+
tasks.named("build") { finalizedBy("runHabitatGenerator") }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

src/main/java/com/onarandombox/multiverseinventories/AdventureListener.java

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/main/java/com/onarandombox/multiverseinventories/command/package-info.java

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/main/java/com/onarandombox/multiverseinventories/share/package-info.java

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/main/java/com/onarandombox/multiverseinventories/util/package-info.java

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/main/java/com/onarandombox/multiverseinventories/AbstractWorldGroupManager.java renamed to src/main/java/org/mvplugins/multiverse/inventories/AbstractWorldGroupManager.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
package com.onarandombox.multiverseinventories;
1+
package org.mvplugins.multiverse.inventories;
22

33
import com.dumptruckman.minecraft.util.Logging;
4-
import com.onarandombox.multiverseinventories.profile.WorldGroupManager;
5-
import com.onarandombox.multiverseinventories.profile.GroupingConflict;
6-
import com.onarandombox.multiverseinventories.share.Sharables;
7-
import com.onarandombox.multiverseinventories.share.Shares;
8-
import com.onarandombox.multiverseinventories.locale.Message;
4+
import org.mvplugins.multiverse.inventories.profile.WorldGroupManager;
5+
import org.mvplugins.multiverse.inventories.profile.GroupingConflict;
6+
import org.mvplugins.multiverse.inventories.share.Sharables;
7+
import org.mvplugins.multiverse.inventories.share.Shares;
8+
import org.mvplugins.multiverse.inventories.locale.Message;
99
import org.bukkit.Bukkit;
1010
import org.bukkit.World;
1111
import org.bukkit.command.CommandSender;
12+
import org.mvplugins.multiverse.core.world.WorldManager;
1213

1314
import java.util.ArrayList;
1415
import java.util.Collections;
@@ -25,9 +26,11 @@ abstract class AbstractWorldGroupManager implements WorldGroupManager {
2526
static final String DEFAULT_GROUP_NAME = "default";
2627
protected final Map<String, WorldGroup> groupNamesMap = new LinkedHashMap<>();
2728
protected final MultiverseInventories plugin;
29+
protected final WorldManager worldManager;
2830

2931
public AbstractWorldGroupManager(final MultiverseInventories plugin) {
3032
this.plugin = plugin;
33+
this.worldManager = plugin.getServiceLocator().getService(WorldManager.class);
3134
}
3235

3336
/**
@@ -60,7 +63,7 @@ public List<WorldGroup> getGroupsForWorld(String worldName) {
6063
}
6164
// Only use the default group for worlds managed by MV-Core
6265
if (worldGroups.isEmpty() && plugin.getMVIConfig().isDefaultingUngroupedWorlds() &&
63-
plugin.getCore().getMVWorldManager().isMVWorld(worldName)) {
66+
this.worldManager.isWorld(worldName)) {
6467
Logging.finer("Returning default group for world: " + worldName);
6568
worldGroups.add(getDefaultGroup());
6669
}

src/main/java/com/onarandombox/multiverseinventories/CoreDebugListener.java renamed to src/main/java/org/mvplugins/multiverse/inventories/CoreDebugListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package com.onarandombox.multiverseinventories;
1+
package org.mvplugins.multiverse.inventories;
22

33
import com.dumptruckman.minecraft.util.Logging;
4-
import com.onarandombox.MultiverseCore.event.MVDebugModeEvent;
4+
import org.mvplugins.multiverse.core.event.MVDebugModeEvent;
55
import org.bukkit.event.EventHandler;
66
import org.bukkit.event.Listener;
77

src/main/java/com/onarandombox/multiverseinventories/DataStrings.java renamed to src/main/java/org/mvplugins/multiverse/inventories/DataStrings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.onarandombox.multiverseinventories;
1+
package org.mvplugins.multiverse.inventories;
22

33
import com.dumptruckman.minecraft.util.Logging;
44
import net.minidev.json.JSONArray;

0 commit comments

Comments
 (0)