Fix Hotbar errors
Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
dfcaac5045
Commit
70c0488083
@ -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) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren