Skip to content

Commit

Permalink
code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mlus-asuka committed May 2, 2024
1 parent 0dfab35 commit 17ad40f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/vip/fubuki/playersync/sync/ModsSupport.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ public void onPlayerJoin(Player player) throws SQLException {
if(curios_data.length()>2) {
Map<Integer, String> curios = LocalJsonUtil.StringToEntryMap(curios_data);
itemHandler.ifPresent(handler -> {
handler.reset();
for (int i = 0; i < handler.getSlots(); i++) {
try {
if (curios.get(i) == null){
handler.getEquippedCurios().setStackInSlot(i,ItemStack.EMPTY);
}else{
handler.getEquippedCurios().setStackInSlot(i,ItemStack.EMPTY);
if (curios.get(i) != null){
handler.getEquippedCurios().setStackInSlot(i, ItemStack.of(NbtUtils.snbtToStructure(curios.get(i).replace("|", ","))));
}

Expand Down

0 comments on commit 17ad40f

Please sign in to comment.