Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed lib/multiverse.jar
Binary file not shown.
40 changes: 23 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,28 @@

<groupId>net.rymate</groupId>
<artifactId>bChatManager</artifactId>
<version>3.1</version>
<version>4.0.0</version>
<packaging>jar</packaging>

<name>bChatManager</name>
<url>http://maven.apache.org</url>
<repositories>
<!-- Spigot -->
<repository>
<id>Spigot Repo</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
</repository>

<!-- Vault -->
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>

<!-- Multiverse -->
<repository>
<id>vault-repo</id>
<url>http://nexus.theyeticave.net/content/repositories/pub_releases</url>
<id>onarandombox</id>
<url>https://repo.onarandombox.com/content/groups/public/</url>
</repository>
</repositories>

Expand All @@ -32,9 +41,10 @@
</dependency>

<dependency>
<groupId>net.milkbowl.vault</groupId>
<artifactId>Vault</artifactId>
<version>1.4.1</version>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7.1</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand All @@ -53,16 +63,12 @@
<systemPath>${project.basedir}/lib/MassiveCore.jar</systemPath>
</dependency>

<!-- Start of Multiverse Core Dependency -->
<dependency>
<groupId>com.onarandombox.multiversecore</groupId>
<artifactId>Multiverse-Core</artifactId>
<version>2.5</version>
<type>jar</type>
<scope>system</scope>
<systemPath>${project.basedir}/lib/multiverse.jar</systemPath>
<groupId>org.mvplugins.multiverse.core</groupId> <!-- Replace for other sub-modules -->
<artifactId>multiverse-core</artifactId> <!-- Replace for other sub-modules -->
<version>5.4.0</version> <!-- Replace with the version you need -->
<scope>provided</scope>
</dependency>
<!-- End of Multiverse Core Dependency -->

</dependencies>

Expand All @@ -86,8 +92,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>8</source>
<target>8</target>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<fork>true</fork>
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/net/rymate/bchatmanager/bChatManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand All @@ -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");
Expand Down Expand Up @@ -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", "");
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down