From 1168b8859a431b5b511915a6acf3eab31eed8ad6 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Mon, 10 May 2021 15:45:48 +0200 Subject: [PATCH] Changed data-yml format --- .../LinkedBeaconTeleporterManager.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/linkedBeaconTeleporter/LinkedBeaconTeleporterManager.java b/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/linkedBeaconTeleporter/LinkedBeaconTeleporterManager.java index f94bc37..a52ab90 100644 --- a/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/linkedBeaconTeleporter/LinkedBeaconTeleporterManager.java +++ b/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/linkedBeaconTeleporter/LinkedBeaconTeleporterManager.java @@ -44,16 +44,15 @@ public class LinkedBeaconTeleporterManager { // New list for this id List linkedBeaconTeleporters = new ArrayList(); - for(String blockId : teleportersData.getKeys(false)) { - ConfigurationSection teleporterData = teleportersData.getConfigurationSection(blockId); + for(String serializedLoc : teleportersData.getKeys(false)) { + ConfigurationSection teleporterData = teleportersData.getConfigurationSection(serializedLoc); // Load location - String serializedLoc = teleporterData.getString("loc"); Location loc; try { loc = Function.deserializeBlockLocation(teleporterData.getString("loc")); } catch (InvalidPropertiesFormatException e) { - Main.log.severe("Could not load location='"+ serializedLoc +"' from "+ teleporterId +" > "+ blockId); + Main.log.severe("Could not load location='"+ serializedLoc +"' from "+ teleporterId); continue; } @@ -61,7 +60,7 @@ public class LinkedBeaconTeleporterManager { Block block = loc.getBlock(); if(block.getType() != Material.BEACON){ // Data out of sync! Skipping - Main.log.warning(teleporterId +" > "+ blockId +" at location "+ serializedLoc +" changed and is no longer LinkedBlockTeleporter! (Changed without the plugin running?)"); + Main.log.warning(teleporterId +" at location "+ serializedLoc +" changed and is no longer LinkedBlockTeleporter! (Changed without the plugin running?)"); continue; }