mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-22 10:36:06 +01:00
Add support for dynmap destinations :D
This commit is contained in:
parent
0209099e15
commit
20b1fc3a3e
7
pom.xml
7
pom.xml
@ -234,6 +234,13 @@
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dynmap</groupId>
|
||||
<artifactId>dynmap</artifactId>
|
||||
<version>0.34.1</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- End DynMap Dependency -->
|
||||
<!-- Start of Test Dependencies -->
|
||||
<dependency>
|
||||
|
@ -44,6 +44,11 @@ public class MVPluginListener implements Listener {
|
||||
this.plugin.setSpout();
|
||||
this.plugin.log(Level.INFO, "Spout integration enabled.");
|
||||
}
|
||||
|
||||
if (event.getPlugin().getDescription().getName().equals("dynmap")) {
|
||||
this.plugin.setDynmap();
|
||||
this.plugin.log(Level.INFO, "Dynmap integration enabled.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -6,6 +6,7 @@ import com.onarandombox.MultiverseCore.plugins.destination.DynmapMarkerDestinati
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.dynmap.DynmapCore;
|
||||
import org.dynmap.bukkit.DynmapPlugin;
|
||||
import org.dynmap.markers.Marker;
|
||||
import org.dynmap.markers.MarkerSet;
|
||||
|
||||
@ -16,14 +17,14 @@ import java.util.List;
|
||||
*/
|
||||
public class DynmapConnector {
|
||||
|
||||
private DynmapCore plugin;
|
||||
private DynmapPlugin plugin;
|
||||
private MultiverseCore core;
|
||||
|
||||
/**
|
||||
* This class should only ever get initialized ONCE!
|
||||
*/
|
||||
public DynmapConnector(Plugin dynmapCore, MultiverseCore core) {
|
||||
this.plugin = (DynmapCore) dynmapCore;
|
||||
this.plugin = ((DynmapPlugin) dynmapCore);
|
||||
this.core = core;
|
||||
this.addDestinationToManager();
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ public class DynmapMarkerDestination implements MVDestination{
|
||||
this.isValid = false;
|
||||
return;
|
||||
}
|
||||
this.dynmap.getLocation(parsed.get(1), parsed.get(2));
|
||||
this.location = this.dynmap.getLocation(parsed.get(1), parsed.get(2));
|
||||
if (this.location == null) {
|
||||
this.isValid = false;
|
||||
return;
|
||||
|
@ -164,6 +164,10 @@ public class MVPermissions implements PermissionsInterface {
|
||||
"The player will spawn at an %sindeterminate location%s. Talk to the MV Devs if you see this",
|
||||
ChatColor.RED, ChatColor.WHITE));
|
||||
cango = false;
|
||||
asker.sendMessage(String.format(
|
||||
"Here are some more details for you:"));
|
||||
asker.sendMessage(d.toString());
|
||||
return;
|
||||
}
|
||||
String worldName = d.getLocation(p).getWorld().getName();
|
||||
if (!this.worldMgr.isMVWorld(worldName)) {
|
||||
|
Loading…
Reference in New Issue
Block a user