Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
53 changes: 8 additions & 45 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
<!-- Non-minecraft related dependencies -->
<powermock.version>2.0.9</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.21.7-R0.1-SNAPSHOT</spigot.version>
<paper.version>1.21.8-R0.1-SNAPSHOT</paper.version>
<bentobox.version>3.3.0</bentobox.version> <!-- Errors with later versions regarding kyori-->
<spigot.version>1.21.10-R0.1-SNAPSHOT</spigot.version>
<paper.version>1.21.10-R0.1-SNAPSHOT</paper.version>
<bentobox.version>3.9.0</bentobox.version> <!-- Errors with later versions regarding kyori-->
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>3.2.1</build.version>
<build.version>3.3.0</build.version>

<sonar.projectKey>BentoBoxWorld_Boxed</sonar.projectKey>
<sonar.organization>bentobox-world</sonar.organization>
Expand Down Expand Up @@ -176,48 +176,11 @@
<version>${bentobox.version}</version>
<scope>provided</scope>
</dependency>
<!-- Spigot NMS. Used for chunk deletion and pasting. -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>${spigot.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc......</groupId>
<artifactId>spigot</artifactId>
<version>1.21.7-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc.....</groupId>
<artifactId>spigot</artifactId>
<version>1.21.6-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc....</groupId>
<artifactId>spigot</artifactId>
<version>1.21.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc...</groupId>
<artifactId>spigot</artifactId>
<version>1.21.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc..</groupId>
<artifactId>spigot</artifactId>
<version>1.21.3-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc......</groupId>
<artifactId>spigot</artifactId>
<version>1.21.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<groupId>net.kyori</groupId>
<artifactId>adventure-api</artifactId>
<version>4.24.0</version>
<scope>test</scope>
</dependency>
</dependencies>

Expand Down
5 changes: 0 additions & 5 deletions src/main/java/world/bentobox/boxed/Boxed.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ public void onEnable() {
if (this.getPlugin().getAddonsManager().getAddonByName("InvSwitcher").isEmpty()) {
this.logWarning("Boxed normally requires the InvSwitcher addon for per-world Advancements.");
}
if (Bukkit.getPluginManager().isPluginEnabled("MultiverseCore")) {
this.logError("Boxed is not compatible with Multiverse! Disabling!");
this.setState(State.DISABLED);
return;
}
// Advancements manager
advManager = new AdvancementsManager(this);
// Make flags only applicable to this game mode
Expand Down
28 changes: 3 additions & 25 deletions src/main/java/world/bentobox/boxed/listeners/NewAreaListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
import world.bentobox.bentobox.api.events.island.IslandResettedEvent;
import world.bentobox.bentobox.database.Database;
import world.bentobox.bentobox.database.objects.Island;
import world.bentobox.bentobox.nms.AbstractMetaData;
import world.bentobox.bentobox.util.Pair;
import world.bentobox.bentobox.util.Util;
import world.bentobox.boxed.Boxed;
import world.bentobox.boxed.nms.AbstractMetaData;
import world.bentobox.boxed.objects.BoxedJigsawBlock;
import world.bentobox.boxed.objects.BoxedStructureBlock;
import world.bentobox.boxed.objects.IslandStructures;
Expand Down Expand Up @@ -537,7 +537,7 @@ public static BoundingBox removeJigsaw(StructureRecord item) {
*/
private static void processStructureBlock(Block b) {
// I would like to read the data from the block and do something with it!
String data = nmsData(b);
String data = Util.getMetaData().nmsData(b);
if (data.isEmpty()) {
return;
}
Expand Down Expand Up @@ -570,7 +570,7 @@ private static void processStructureBlock(Block b) {
*/
private static void processJigsaw(Block b, StructureRotation structureRotation, boolean pasteMobs) {
try {
String data = nmsData(b);
String data = Util.getMetaData().nmsData(b);
if (data.isEmpty()) {
return;
}
Expand Down Expand Up @@ -693,28 +693,6 @@ private static BlockFace getDirection(String finalState) {
.orElse(BlockFace.SELF);
}

/**
* Gets NMS data from a block using the appropriate handler.
*
* @param block The block.
* @return The NMS data string.
*/
private static String nmsData(Block block) {
AbstractMetaData handler;
try {
Class<?> clazz = Class.forName(pluginPackageName + ".nms." + bukkitVersion + ".GetMetaData");
if (AbstractMetaData.class.isAssignableFrom(clazz)) {
handler = (AbstractMetaData) clazz.getConstructor().newInstance();
} else {
throw new IllegalStateException("Class " + clazz.getName() + " does not implement AbstractGetMetaData");
}
} catch (Exception e) {
BentoBox.getInstance().logError("No metadata handler found for " + bukkitVersion + " in Boxed (yet).");
handler = new world.bentobox.boxed.nms.fallback.GetMetaData();
}
return handler.nmsData(block);
}

/**
* Loads the list of structures to be placed from the database.
*
Expand Down
45 changes: 0 additions & 45 deletions src/main/java/world/bentobox/boxed/nms/AbstractMetaData.java

This file was deleted.

17 changes: 0 additions & 17 deletions src/main/java/world/bentobox/boxed/nms/fallback/GetMetaData.java

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/resources/addon.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Boxed
main: world.bentobox.boxed.Boxed
version: ${version}${build.number}
api-version: 3.3.3
api-version: 3.9.0
metrics: true
icon: "COMPOSTER"
repository: "BentoBoxWorld/Boxed"
Expand Down
Loading