diff --git a/lib/multiverse.jar b/lib/multiverse.jar deleted file mode 100644 index 347b2ec..0000000 Binary files a/lib/multiverse.jar and /dev/null differ diff --git a/pom.xml b/pom.xml index f37cf4c..9e53e8d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,19 +4,28 @@ net.rymate bChatManager - 3.1 + 4.0.0 jar bChatManager http://maven.apache.org + Spigot Repo https://hub.spigotmc.org/nexus/content/groups/public/ - + + + + + jitpack.io + https://jitpack.io + + + - vault-repo - http://nexus.theyeticave.net/content/repositories/pub_releases + onarandombox + https://repo.onarandombox.com/content/groups/public/ @@ -32,9 +41,10 @@ - net.milkbowl.vault - Vault - 1.4.1 + com.github.MilkBowl + VaultAPI + 1.7.1 + provided @@ -53,16 +63,12 @@ ${project.basedir}/lib/MassiveCore.jar - - com.onarandombox.multiversecore - Multiverse-Core - 2.5 - jar - system - ${project.basedir}/lib/multiverse.jar + org.mvplugins.multiverse.core + multiverse-core + 5.4.0 + provided - @@ -86,8 +92,8 @@ maven-compiler-plugin 2.3.2 - 1.6 - 1.6 + 8 + 8 true true true diff --git a/src/main/java/net/rymate/bchatmanager/bChatManager.java b/src/main/java/net/rymate/bchatmanager/bChatManager.java index 3fdfc70..0d55503 100644 --- a/src/main/java/net/rymate/bchatmanager/bChatManager.java +++ b/src/main/java/net/rymate/bchatmanager/bChatManager.java @@ -2,8 +2,8 @@ import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.MPlayer; -import com.onarandombox.MultiverseCore.MultiverseCore; -import com.onarandombox.MultiverseCore.api.MultiverseWorld; +import org.mvplugins.multiverse.core.MultiverseCoreApi; +import org.mvplugins.multiverse.core.world.*; import net.milkbowl.vault.chat.Chat; import org.bukkit.ChatColor; import org.bukkit.Location; @@ -40,7 +40,7 @@ public class bChatManager extends JavaPlugin { private YamlConfiguration config; private boolean factions; private boolean mv; - private MultiverseCore core; + private MultiverseCoreApi core; private PluginCommand meCmd; public void onEnable() { @@ -63,7 +63,7 @@ public void onEnable() { //check if Multiverse-Core is installed if (this.getServer().getPluginManager().isPluginEnabled("Multiverse-Core")) { mv = true; - core = (MultiverseCore) getServer().getPluginManager().getPlugin("Multiverse-Core"); + core = MultiverseCoreApi.get(); } System.out.println("[bChatManager] Enabled"); @@ -124,10 +124,10 @@ public String replacePlayerPlaceholders(Player player, String format) { MultiverseWorld mvWorld = null; if (mv) { - mvWorld = core.getMVWorldManager().getMVWorld(player.getWorld()); + mvWorld = core.getWorldManager().getWorld(player.getWorld()).getOrElse((MultiverseWorld) null); } if (mvWorld != null) { - format = format.replaceAll("%mvworld", mvWorld.getColoredWorldString()); + format = format.replaceAll("%mvworld", mvWorld.getAliasOrName()); } else { format = format.replaceAll("%mvworld", ""); } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index a712eab..d12bd85 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -2,7 +2,7 @@ name: bChatManager main: net.rymate.bchatmanager.bChatManager depend: [ Vault ] softdepend: [ Factions, Multiverse-Core] -version: 3.1.6 +version: 4.0.0 author: rymate1234 website: www.rymate.co.uk description: Chat management plugin for bPermissions based of PEX ChatManager