assert-statement removed
für mehr stabilität noch ien assert statement mit if ersetzt
This commit is contained in:
parent
527ea812db
commit
e4a54ed36f
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue