Merge branch 'development'

This commit is contained in:
Christian Koop 2021-12-18 18:18:51 +01:00
commit 7c7330b45e
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
25 changed files with 37 additions and 35 deletions

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -14,21 +14,24 @@ public enum MethodMapping {
MC_NBT_TAG_COMPOUND__SET_STRING("setString", "setString", "a", String.class, String.class),
MC_NBT_TAG_COMPOUND__REMOVE("remove", "remove", "r", String.class),
MC_NBT_TAG_LIST__ADD("add", "a", "add", "a", ClassMapping.NBT_BASE.getClazz()),
MC_CHUNK__GET_WORLD("getWorld", "D"),
CB_GENERIC__GET_HANDLE("getHandle"),
CB_BLOCK__GET_NMS("getNMS"),
CB_BLOCK__GET_NMS("getNMSBlock", "getNMS"),
CB_BLOCK__GET_POSITION("getPosition"),
CB_BLOCK_DATA__GET_STATE("getState"),
CB_ITEM_STACK__AS_NMS_COPY("asNMSCopy", ItemStack.class),
CB_ITEM_STACK__AS_CRAFT_MIRROR("asCraftMirror", ClassMapping.ITEM_STACK.getClazz()),
CRAFT_MAGIC_NUMBERS__GET_BLOCK__MATERIAL("getBlock", Material.class),
MC_CHUNK__GET_WORLD("getWorld", "D"),
MC_NBT_TAG_LIST__ADD("add", "a", "add", "c", ClassMapping.NBT_BASE.getClazz()),
I_BLOCK_DATA__GET_BLOCK("getBlock", "b"),
BLOCK__GET_BLOCK_DATA("getBlockData", "n"),
CHUNK__SET_BLOCK_STATE("setType", "setBlockState", ClassMapping.BLOCK_POSITION.getClazz(), ClassMapping.I_BLOCK_DATA.getClazz(), boolean.class, boolean.class),
@ -42,7 +45,6 @@ public enum MethodMapping {
WORLD_BOARDER__SET_CENTER("setCenter", "setCenter", "setCenter", "c", double.class, double.class),
WORLD_BOARDER__SET_SIZE("setSize", "setSize", "setSize", "a", double.class),
WORLD_BOARDER__SET_WARNING_TIME("setWarningTime", "setWarningTime", "setWarningTime", "b", int.class),
WORLD_BOARDER__SET_WARNING_DISTANCE("setWarningDistance", "setWarningDistance", "setWarningDistance", "c", int.class),
WORLD_BOARDER__TRANSITION_SIZE_BETWEEN("transitionSizeBetween", "transitionSizeBetween", "transitionSizeBetween", "a", double.class, double.class, long.class),

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -53,7 +53,7 @@ public class SongodaCore {
/**
* @since coreRevision 6
*/
private final static String coreVersion = "2.6.5";
private final static String coreVersion = "2.6.8";
/**
* This is specific to the website api

View File

@ -45,7 +45,7 @@ public class GuiLootableEditor extends Gui {
gui.setAction((event1 -> {
try {
lootable.registerLoot(new LootBuilder().setMaterial(CompatibleMaterial
.valueOf(gui.getInputText().trim())).build());
.valueOf(gui.getInputText().trim().toUpperCase())).build());
} catch (IllegalArgumentException ex) {
event.player.sendMessage("That is not a valid material.");
}

View File

@ -2,6 +2,7 @@ package com.songoda.core.utils;
import com.songoda.core.SongodaCore;
import com.songoda.core.compatibility.ClassMapping;
import com.songoda.core.compatibility.MethodMapping;
import com.songoda.core.compatibility.ServerVersion;
import org.bukkit.Effect;
import org.bukkit.Material;
@ -95,15 +96,15 @@ public class BlockUtilsModern {
clazzCraftWorld = ClassMapping.CRAFT_WORLD.getClazz();
clazzCraftBlock = ClassMapping.CRAFT_BLOCK.getClazz();
craftWorld_getHandle = clazzCraftWorld.getMethod("getHandle");
craftBlock_getPostition = clazzCraftBlock.getDeclaredMethod("getPosition");
craftWorld_getHandle = MethodMapping.CB_GENERIC__GET_HANDLE.getMethod(clazzCraftWorld);
craftBlock_getPostition = MethodMapping.CB_BLOCK__GET_POSITION.getMethod(clazzCraftBlock);
craftBlock_getNMS = clazzCraftBlock.getDeclaredMethod("getNMS");
craftBlock_getNMS = MethodMapping.CB_BLOCK__GET_NMS.getMethod(clazzCraftBlock);
Class<?> clazzBlockData = ClassMapping.BLOCK_BASE.getClazz("BlockData");
nmsBlockData_getBlock = clazzBlockData.getDeclaredMethod("getBlock");
nmsBlockData_getBlock = MethodMapping.I_BLOCK_DATA__GET_BLOCK.getMethod(clazzBlockData);
Class<?> clazzCraftBlockData = ClassMapping.CRAFT_BLOCK_DATA.getClazz();
craftBlockData_getState = clazzCraftBlockData.getDeclaredMethod("getState");
craftBlockData_getState = MethodMapping.CB_BLOCK_DATA__GET_STATE.getMethod(clazzCraftBlockData);
Class<?> clazzWorld = ClassMapping.WORLD.getClazz();
Class<?> clazzBlockState = ClassMapping.I_BLOCK_DATA.getClazz();
@ -112,7 +113,6 @@ public class BlockUtilsModern {
clazzButtonBlock = ClassMapping.BLOCK_BUTTON_ABSTRACT.getClazz();
clazzPressurePlateBlock = ClassMapping.BLOCK_PRESSURE_PLATE_ABSTRACT.getClazz();
// nmsLever_updateNeighbours, nmsButton_updateNeighbours, nmsPlate_updateNeighbours
nmsLever_updateNeighbours = clazzLeverBlock.getDeclaredMethod(ServerVersion.isServerVersionAbove(ServerVersion.V1_13)
? "e" : "b", clazzBlockState, clazzWorld, clazzBlockPos);
nmsLever_updateNeighbours.setAccessible(true);

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -19,7 +19,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -6,7 +6,7 @@
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.7</version>
<version>2.6.8</version>
<packaging>pom</packaging>
<!-- Run 'mvn versions:set -DgenerateBackupPoms=false -DnewVersion=X.Y.Z' to update version recursively -->