From 0ec15d4940ee130bc9135d9a80ab4b0d2881966c Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Sat, 3 Jul 2021 20:44:47 +0800 Subject: [PATCH] Resolve api breakage issue. --- .../MultiverseNetherPortals.java | 10 +++++++++- .../commands/UnlinkCommand.java | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseNetherPortals/MultiverseNetherPortals.java b/src/main/java/com/onarandombox/MultiverseNetherPortals/MultiverseNetherPortals.java index 0207876..1e5deff 100644 --- a/src/main/java/com/onarandombox/MultiverseNetherPortals/MultiverseNetherPortals.java +++ b/src/main/java/com/onarandombox/MultiverseNetherPortals/MultiverseNetherPortals.java @@ -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) { @@ -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)); diff --git a/src/main/java/com/onarandombox/MultiverseNetherPortals/commands/UnlinkCommand.java b/src/main/java/com/onarandombox/MultiverseNetherPortals/commands/UnlinkCommand.java index 9fd259f..22b54ce 100644 --- a/src/main/java/com/onarandombox/MultiverseNetherPortals/commands/UnlinkCommand.java +++ b/src/main/java/com/onarandombox/MultiverseNetherPortals/commands/UnlinkCommand.java @@ -71,7 +71,7 @@ public void runCommand(CommandSender sender, List 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; }