Add support for dynmap destinations :D

This commit is contained in:
Eric Stokes 2012-03-12 22:52:03 -06:00
parent 0209099e15
commit 20b1fc3a3e
5 changed files with 20 additions and 3 deletions

View File

@ -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>

View File

@ -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.");
}
}
/**

View File

@ -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();
}

View File

@ -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;

View File

@ -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)) {