Skip to content

Commit

Permalink
Fix end links not working after restart.
Browse files Browse the repository at this point in the history
  • Loading branch information
benwoo1110 committed Dec 11, 2020
1 parent fe48a87 commit fe0d6f2
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,26 @@ public void loadConfig() {
Set<String> worldKeys = this.MVNPconfiguration.getConfigurationSection("worlds").getKeys(false);
if (worldKeys != null) {
for (String worldString : worldKeys) {
String nether = this.MVNPconfiguration.getString("worlds." + worldString + ".portalgoesto.NETHER", null);
String ender = this.MVNPconfiguration.getString("worlds." + worldString + ".portalgoesto.END", null);
String nether = this.MVNPconfiguration.getString("worlds." + worldString + ".portalgoesto." + PortalType.NETHER, null);
String ender = this.MVNPconfiguration.getString("worlds." + worldString + ".portalgoesto." + PortalType.ENDER, null);
if (nether != null) {
this.linkMap.put(worldString, nether);
}
if (ender != null) {
this.endLinkMap.put(worldString, ender);
}

// Convert from old version enum which used END not ENDER
String oldEnder = this.MVNPconfiguration.getString("worlds." + worldString + ".portalgoesto.END", null);
if (oldEnder != null) {
if (this.addWorldLink(worldString, oldEnder, PortalType.ENDER)) {
this.MVNPconfiguration.set("worlds." + worldString + ".portalgoesto.END", null);
}
else {
Logging.warning("Error converting old end link of '%s' to '%s'", worldString, oldEnder);
}
}

}
}
this.saveMVNPConfig();
Expand Down Expand Up @@ -374,8 +385,6 @@ public String getVersionInfo() {
+ "[Multiverse-NetherPortals] Teleport Entities: " + this.isTeleportingEntities() + '\n'
+ "[Multiverse-NetherPortals] Send Disabled Portal Message: " + this.isSendingDisabledPortalMessage() + '\n'
+ "[Multiverse-NetherPortals] Send No Destination Message: " + this.isSendingNoDestinationMessage() + '\n'
+ "[Multiverse-NetherPortals] Server Allow Nether: " + this.getServer().getAllowNether() + '\n'
+ "[Multiverse-NetherPortals] Server Allow End: " + this.getServer().getAllowEnd() + '\n'
+ "[Multiverse-NetherPortals] Special Code: " + "FRN001" + '\n';
}
}

0 comments on commit fe0d6f2

Please sign in to comment.