From 70c048808356716e05a7dc268f1783d876f38d0e Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 13 Sep 2022 15:24:45 +0200 Subject: [PATCH] Fix Hotbar errors Signed-off-by: yoyosource --- .../de/steamwar/bausystem/features/hotbar/DefaultHotbar.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/DefaultHotbar.java b/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/DefaultHotbar.java index 2625f0da..927cc1e5 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/DefaultHotbar.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/hotbar/DefaultHotbar.java @@ -20,6 +20,7 @@ package de.steamwar.bausystem.features.hotbar; import de.steamwar.bausystem.configplayer.Config; +import de.steamwar.core.Core; import lombok.experimental.UtilityClass; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; @@ -47,7 +48,7 @@ public class DefaultHotbar { yapionArray.add(new YAPIONValue<>(null)); } } - Config.getInstance().get(p).add("hotbar", yapionArray); + Config.getInstance().get(p).add("hotbar-" + Core.getVersion(), yapionArray); Config.getInstance().save(p); } @@ -62,7 +63,7 @@ public class DefaultHotbar { } public ItemStack[] getItems(Player p) { - YAPIONArray yapionArray = Config.getInstance().get(p).getYAPIONArrayOrSetDefault("hotbar", defaultHotbar()); + YAPIONArray yapionArray = Config.getInstance().get(p).getYAPIONArrayOrSetDefault("hotbar-" + Core.getVersion(), defaultHotbar()); ItemStack[] hotbar = new ItemStack[13]; yapionArray.forEach((integer, yapionAnyType) -> { if (yapionAnyType instanceof YAPIONValue) {