diff --git a/bukkit-helper-117/src/main/java/org/dynmap/bukkit/helper/v117/BukkitVersionHelperSpigot117.java b/bukkit-helper-117/src/main/java/org/dynmap/bukkit/helper/v117/BukkitVersionHelperSpigot117.java index 1d27cde0..96116e88 100644 --- a/bukkit-helper-117/src/main/java/org/dynmap/bukkit/helper/v117/BukkitVersionHelperSpigot117.java +++ b/bukkit-helper-117/src/main/java/org/dynmap/bukkit/helper/v117/BukkitVersionHelperSpigot117.java @@ -11,13 +11,10 @@ import org.dynmap.bukkit.helper.BukkitMaterial; import org.dynmap.bukkit.helper.BukkitVersionHelper; import org.dynmap.bukkit.helper.BukkitWorld; import org.dynmap.bukkit.helper.BukkitVersionHelperGeneric.TexturesPayload; -import org.dynmap.bukkit.helper.v117.MapChunkCache117; import org.dynmap.renderer.DynmapBlockState; import org.dynmap.utils.MapChunkCache; import org.dynmap.utils.Polygon; -import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; -import com.google.common.base.Charsets; import com.google.common.collect.Iterables; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -49,8 +46,8 @@ import net.minecraft.world.level.block.entity.TileEntity; import net.minecraft.world.level.block.state.IBlockData; import net.minecraft.world.level.material.Material; -import java.lang.reflect.Field; -import java.lang.reflect.Method; +import java.nio.charset.StandardCharsets; +import java.util.Base64; import java.util.Collection; import java.util.HashMap; import java.util.IdentityHashMap; @@ -387,7 +384,7 @@ public class BukkitVersionHelperSpigot117 extends BukkitVersionHelper { if (val != null) { TexturesPayload result = null; try { - String json = new String(Base64Coder.decode(val), Charsets.UTF_8); + String json = new String(Base64.getDecoder().decode(val), StandardCharsets.UTF_8); result = gson.fromJson(json, TexturesPayload.class); } catch (JsonParseException e) { } catch (IllegalArgumentException x) { diff --git a/bukkit-helper-118/src/main/java/org/dynmap/bukkit/helper/v118/BukkitVersionHelperSpigot118.java b/bukkit-helper-118/src/main/java/org/dynmap/bukkit/helper/v118/BukkitVersionHelperSpigot118.java index 44ab642a..d5381c60 100644 --- a/bukkit-helper-118/src/main/java/org/dynmap/bukkit/helper/v118/BukkitVersionHelperSpigot118.java +++ b/bukkit-helper-118/src/main/java/org/dynmap/bukkit/helper/v118/BukkitVersionHelperSpigot118.java @@ -14,9 +14,7 @@ import org.dynmap.bukkit.helper.BukkitVersionHelperGeneric.TexturesPayload; import org.dynmap.renderer.DynmapBlockState; import org.dynmap.utils.MapChunkCache; import org.dynmap.utils.Polygon; -import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; -import com.google.common.base.Charsets; import com.google.common.collect.Iterables; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -29,7 +27,6 @@ import net.minecraft.core.RegistryBlockID; import net.minecraft.core.RegistryBlocks; import net.minecraft.core.BlockPosition; import net.minecraft.core.IRegistry; -import net.minecraft.core.Registry; import net.minecraft.nbt.NBTTagByteArray; import net.minecraft.nbt.NBTTagByte; import net.minecraft.nbt.NBTTagCompound; @@ -50,8 +47,10 @@ import net.minecraft.world.level.block.BlockFluids; import net.minecraft.world.level.block.entity.TileEntity; import net.minecraft.world.level.block.state.IBlockData; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; +import java.util.Base64; import java.util.Collection; import java.util.HashMap; import java.util.IdentityHashMap; @@ -415,7 +414,7 @@ public class BukkitVersionHelperSpigot118 extends BukkitVersionHelper { if (val != null) { TexturesPayload result = null; try { - String json = new String(Base64Coder.decode(val), Charsets.UTF_8); + String json = new String(Base64.getDecoder().decode(val), StandardCharsets.UTF_8); result = gson.fromJson(json, TexturesPayload.class); } catch (JsonParseException e) { } catch (IllegalArgumentException x) { diff --git a/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelper.java b/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelper.java index bd243709..8724eac8 100644 --- a/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelper.java +++ b/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelper.java @@ -9,7 +9,6 @@ import org.bukkit.ChunkSnapshot; import org.bukkit.World; import org.bukkit.entity.Player; import org.dynmap.DynmapChunk; -import org.dynmap.Log; import org.dynmap.common.chunk.GenericChunkCache; import org.dynmap.renderer.DynmapBlockState; import org.dynmap.utils.MapChunkCache; diff --git a/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperCB.java b/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperCB.java index e5897549..05da8fbe 100644 --- a/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperCB.java +++ b/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperCB.java @@ -4,7 +4,6 @@ import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; -import java.util.Arrays; import java.util.Map; import java.util.Set; diff --git a/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperGeneric.java b/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperGeneric.java index 29086bb9..22eec1cf 100644 --- a/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperGeneric.java +++ b/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperGeneric.java @@ -3,7 +3,8 @@ package org.dynmap.bukkit.helper; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.Base64; import java.util.Collection; import java.util.Collections; import java.util.Map; @@ -16,9 +17,7 @@ import org.bukkit.Server; import org.bukkit.World; import org.bukkit.entity.Player; import org.dynmap.Log; -import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; -import com.google.common.base.Charsets; import com.google.common.collect.ForwardingMultimap; import com.google.common.collect.Iterables; import com.google.gson.Gson; @@ -566,7 +565,7 @@ public abstract class BukkitVersionHelperGeneric extends BukkitVersionHelper { if (val != null) { TexturesPayload result = null; try { - String json = new String(Base64Coder.decode(val), Charsets.UTF_8); + String json = new String(Base64.getDecoder().decode(val), StandardCharsets.UTF_8); result = gson.fromJson(json, TexturesPayload.class); } catch (JsonParseException e) { } catch (IllegalArgumentException x) {