Update to 1.19.3 for NMS (#2107)

* Update to 1.19.3 for NMS

Clean up some imports and deprecation notifications.

* Added 1.19.4 to compatible servers
This commit is contained in:
tastybento 2023-03-18 10:28:19 -07:00 committed by GitHub
parent ca604f893c
commit 2cb561b943
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 23 additions and 19 deletions

View File

@ -73,10 +73,10 @@
<postgresql.version>42.2.18</postgresql.version>
<hikaricp.version>5.0.1</hikaricp.version>
<!-- More visible way to change dependency versions -->
<spigot.version>1.19.3-R0.1-SNAPSHOT</spigot.version>
<spigot.version>1.19.4-R0.1-SNAPSHOT</spigot.version>
<!-- Might differ from the last Spigot release for short periods
of time -->
<paper.version>1.19.3-R0.1-SNAPSHOT</paper.version>
<paper.version>1.19.4-R0.1-SNAPSHOT</paper.version>
<bstats.version>3.0.0</bstats.version>
<vault.version>1.7.1</vault.version>
<placeholderapi.version>2.10.9</placeholderapi.version>

View File

@ -17,8 +17,6 @@ import org.bukkit.inventory.ItemStack;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import world.bentobox.bentobox.api.panels.reader.ItemTemplateRecord.ActionRecords;
/**
* This Record contains all necessary information about Item Template that can be used to craft panel item.
*

View File

@ -15,7 +15,6 @@ import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import world.bentobox.bentobox.api.panels.Panel;
import world.bentobox.bentobox.api.panels.reader.PanelTemplateRecord.TemplateItem;
/**
* This is template object for the panel reader. It contains data that can exist in the panel.

View File

@ -1,7 +1,6 @@
package world.bentobox.bentobox.listeners.flags.clicklisteners;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

View File

@ -74,6 +74,9 @@ public class BreakBlocksListener extends FlagListener {
case SPAWNER -> this.checkIsland(e, p, l, Flags.BREAK_SPAWNERS);
case DRAGON_EGG -> this.checkIsland(e, p, l, Flags.DRAGON_EGG);
case HOPPER -> this.checkIsland(e, p, l, Flags.BREAK_HOPPERS);
default -> {
// Do nothing
}
}
}

View File

@ -1,10 +1,10 @@
package world.bentobox.bentobox.nms.v1_19_R2;
package world.bentobox.bentobox.nms.v1_19_R3;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.data.BlockData;
import org.bukkit.craftbukkit.v1_19_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_19_R2.block.data.CraftBlockData;
import org.bukkit.craftbukkit.v1_19_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_19_R3.block.data.CraftBlockData;
import net.minecraft.core.BlockPosition;
import net.minecraft.world.level.World;

View File

@ -14,22 +14,23 @@ import org.eclipse.jdt.annotation.NonNull;
* @author tastybento
*
*/
@SuppressWarnings("deprecation")
public class MyBiomeGrid implements BiomeGrid {
Map<Vector, Biome> map = new HashMap<>();
private Biome defaultBiome;
public MyBiomeGrid(Environment environment) {
switch (environment) {
case NETHER -> {
try {
// 1.16 onwards
defaultBiome = Biome.valueOf("NETHER_WASTES");
} catch (Exception e) {
// Before 1.16
defaultBiome = Biome.valueOf("NETHER");
}
case NETHER -> {
try {
// 1.16 onwards
defaultBiome = Biome.valueOf("NETHER_WASTES");
} catch (Exception e) {
// Before 1.16
defaultBiome = Biome.valueOf("NETHER");
}
case THE_END -> defaultBiome = Biome.THE_END;
default -> defaultBiome = Biome.PLAINS;
}
case THE_END -> defaultBiome = Biome.THE_END;
default -> defaultBiome = Biome.PLAINS;
}
}

View File

@ -214,6 +214,10 @@ public class ServerCompatibility {
* @since 1.22.0
*/
V1_19_3(Compatibility.COMPATIBLE),
/**
* @since 1.22.1
*/
V1_19_4(Compatibility.COMPATIBLE),
;
private final Compatibility compatibility;