Skip to content

Commit

Permalink
Resolve api breakage issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
benwoo1110 committed Jul 3, 2021
1 parent b3d1169 commit 0ec15d4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public boolean addWorldLink(String from, String to, PortalType type) {
return this.saveMVNPConfig();
}

public boolean removeWorldLink(String from, String to, PortalType type) {
public boolean deleteWorldLink(String from, String to, PortalType type) {
if (type == PortalType.NETHER) {
this.linkMap.remove(from);
} else if (type == PortalType.ENDER) {
Expand All @@ -278,6 +278,14 @@ public boolean removeWorldLink(String from, String to, PortalType type) {
return this.saveMVNPConfig();
}

/**
* @deprecated Use {@link MultiverseNetherPortals#deleteWorldLink(String, String, PortalType)} instead.
*/
@Deprecated
public void removeWorldLink(String from, String to, PortalType type) {
deleteWorldLink(from, to, type);
}

public boolean saveMVNPConfig() {
try {
this.MVNPConfiguration.save(new File(this.getDataFolder(), NETHER_PORTALS_CONFIG));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void runCommand(CommandSender sender, List<String> args) {
return;
}

if (!this.plugin.removeWorldLink(fromWorldString, toWorldString, type)) {
if (!this.plugin.deleteWorldLink(fromWorldString, toWorldString, type)) {
sender.sendMessage(ChatColor.RED + "There was an error unlinking the portals! Please check console for errors.");
return;
}
Expand Down

0 comments on commit 0ec15d4

Please sign in to comment.