multi-sleep improved #9

Merged
Malte merged 5 commits from multi-sleep into main 2024-01-23 17:24:57 +01:00
1 changed files with 9 additions and 5 deletions
Showing only changes of commit e4a54ed36f - Show all commits

View File

@ -26,12 +26,16 @@ public class setAndGetMultiButtonsSpawn {
fullArray[2] = (int) player.getZ();
try {
assert subNbt != null;
if (subNbt != null) {
subNbt.putIntArray(String.valueOf(spawn), fullArray); //speichert unseren array an der entsprechenden nummer ab
topNbt.put("multi_sleep", subNbt); //speichert den tag unter multi_sleep im top-tag ab
castedPlayer.setDataSaver(topNbt); //speichert den top-tag wieder im spieler ab
} else {
REServerMod.LOGGER.info("Error when trying to write spawn to file!");
player.sendMessage(Text.translatable("chat.modchest.multispawn.spawnnotsaved"));
}
} catch (Exception e) {
REServerMod.LOGGER.info("Sorry! Error when saving Spawnpoint! Exception: " + e);
REServerMod.LOGGER.info("Error when saving Spawnpoint! Exception: " + e);
player.sendMessage(Text.translatable("chat.modchest.multispawn.spawnnotsaved"));
}
}