本文整理汇总了Java中org.dynmap.DynmapAPI类的典型用法代码示例。如果您正苦于以下问题:Java DynmapAPI类的具体用法?Java DynmapAPI怎么用?Java DynmapAPI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DynmapAPI类属于org.dynmap包,在下文中一共展示了DynmapAPI类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateCore
import org.dynmap.DynmapAPI; //导入依赖的package包/类
public boolean updateCore() {
// Get DynmapAPI
this.dynmapApi = (DynmapAPI) Bukkit.getPluginManager().getPlugin("dynmap");
if (this.dynmapApi == null) {
severe("Could not retrieve the DynmapAPI.");
return false;
}
// Get MarkerAPI
this.markerApi = this.dynmapApi.getMarkerAPI();
if (this.markerApi == null) {
severe("Could not retrieve the MarkerAPI.");
return false;
}
return true;
}
示例2: DynmapHandler
import org.dynmap.DynmapAPI; //导入依赖的package包/类
public DynmapHandler(Parties instance) {
plugin = instance;
api = (DynmapAPI) plugin.getServer().getPluginManager().getPlugin("dynmap");
markerapi = api.getMarkerAPI();
layer = markerapi.getMarkerSet("Parties");
if (layer != null) {
if (!layer.getMarkerSetLabel().equals(Variables.dynmap_marker_layer)) {
layer.setMarkerSetLabel(Variables.dynmap_marker_layer);
}
} else {
layer = markerapi.createMarkerSet("Parties", Variables.dynmap_marker_layer, null, true);
layer.setHideByDefault(Variables.dynmap_hidedefault);
}
}
示例3: RPDynmap
import org.dynmap.DynmapAPI; //导入依赖的package包/类
public RPDynmap(DynmapAPI dyn){
Dyn = dyn;
MApi = Dyn.getMarkerAPI();
MSet = MApi.getMarkerSet(RPConfig.getString("hooks.dynmap.marks-groupname"));
if (MSet == null){
MSet = MApi.createMarkerSet("RedProtect", RPConfig.getString("hooks.dynmap.marks-groupname"), null, false);
}
MSet.setHideByDefault(RPConfig.getBool("hooks.dynmap.hide-by-default"));
MSet.setLayerPriority(RPConfig.getInt("hooks.dynmap.layer-priority"));
MSet.setLabelShow(RPConfig.getBool("hooks.dynmap.show-label"));
MSet.setDefaultMarkerIcon(MApi.getMarkerIcon(RPConfig.getString("hooks.dynmap.marker-icon")));
int minzoom = RPConfig.getInt("hooks.dynmap.min-zoom");
if (minzoom > 0) {
MSet.setMinZoom(minzoom);
} else {
MSet.setMinZoom(0);
}
//start set markers
for (World w:RedProtect.get().serv.getWorlds()){
for (Region r:RedProtect.get().rm.getRegionsByWorld(w)){
addMark(r);
}
}
}
示例4: OurServerListener
import org.dynmap.DynmapAPI; //导入依赖的package包/类
public OurServerListener(Beaconz plugin, Plugin dynmap) {
super(plugin);
this.plugin = plugin;
this.dynmap = dynmap;
api = (DynmapAPI)dynmap; /* Get API */
dynmapFile = new File(getBeaconzPlugin().getDataFolder(),"dynmap.yml");
if (!dynmapFile.exists()) {
getBeaconzPlugin().saveResource("dynmap.yml", false);
}
cfg = new YamlConfiguration();
if (dynmapFile.exists()) {
try {
cfg.load(dynmapFile);
} catch (Exception e) {
e.printStackTrace();
}
}
activate(dynmap);
}
示例5: onEnable
import org.dynmap.DynmapAPI; //导入依赖的package包/类
@Override
public void onEnable() {
final PluginManager pm = getServer().getPluginManager();
this.dynmap = pm.getPlugin("dynmap");
if (this.dynmap == null) {
severe("Dynmap not found, disabling Plot2Dynmap");
return;
}
this.dynAPI = (DynmapAPI) this.dynmap;
this.plot2 = pm.getPlugin("PlotSquared");
getServer().getPluginManager().registerEvents(this, this);
if (this.dynmap.isEnabled() && this.plot2.isEnabled()) {
initialize();
}
}
示例6: updateDynmap
import org.dynmap.DynmapAPI; //导入依赖的package包/类
private void updateDynmap() {
Plugin dynmapPlugin = Bukkit.getServer().getPluginManager().getPlugin("dynmap");
if (dynmapPlugin == null || !(dynmapPlugin instanceof DynmapAPI)){
print("Critical error accessing the dynmap plugin, dynmap will not be used.");
return;
} //dynmap contract assumes none of the below null
DynmapAPI dynmapAPI = (DynmapAPI)dynmapPlugin;
MarkerAPI markerAPI = dynmapAPI.getMarkerAPI();
MarkerIcon planetIcon = markerAPI.getMarkerIcon("world");
MarkerSet markers = markerAPI.getMarkerSet("markers");
for (String name : centreCoordinates.keySet()){
Integer[] coords = centreCoordinates.get(name);
Marker planetMarker = markers.findMarker(name);
if (planetMarker == null){
markers.createMarker(name, name, worldName, coords[0], coords[1], coords[2], planetIcon,true);
} else {
planetMarker.setLocation(worldName, coords[0], coords[1], coords[2]);
}
}
}
示例7: registerAndSuch
import org.dynmap.DynmapAPI; //导入依赖的package包/类
public boolean registerAndSuch() {
Plugin plugin = ClaimChunk.getInstance().getServer().getPluginManager().getPlugin("dynmap");
if (plugin != null && plugin instanceof DynmapAPI) {
dynmap = (DynmapAPI) plugin;
return true;
}
return false;
}
示例8: CubitDynmap
import org.dynmap.DynmapAPI; //导入依赖的package包/类
public CubitDynmap(CubitBukkitPlugin plugin) {
this.plugin = plugin;
this.regionPending = new HashMap<>();
this.dynmap = Bukkit.getServer().getPluginManager().getPlugin("dynmap");
if (this.dynmap == null) {
System.out.println("Cannot find dynmap!");
return;
} else {
this.api = (DynmapAPI) this.dynmap;
WorldGuardPlugin wg = this.plugin.getWorldGuardPlugin();
this.plugin.getServer().getPluginManager().registerEvents(new PluginLoadListener(this), this.plugin);
if (this.dynmap.isEnabled() && wg.isEnabled())
initialize();
}
}
示例9: init
import org.dynmap.DynmapAPI; //导入依赖的package包/类
/**
* Inits the manager
*/
public void init() {
if(plugin.getDependencyManager().isEnabled(Dependency.DYNMAP) && Config.DYNMAP.getBoolean()) {
DynmapAPI api = (DynmapAPI) plugin.getDependencyManager().get(Dependency.DYNMAP, Plugin.class);
markerSet = api.getMarkerAPI().createMarkerSet("novaguilds.markerset", "NovaGuilds", null, false);
InputStream inputStream = plugin.getResource("guildhomeicon.png");
guildHomeIcon = api.getMarkerAPI().createMarkerIcon("novaguilds.guildhome", "Guild Home", inputStream);
enabled = true;
}
}
示例10: CivCraftUpdateTask
import org.dynmap.DynmapAPI; //导入依赖的package包/类
public CivCraftUpdateTask(DynmapAPI api, MarkerAPI markerapi, MarkerSet townset, MarkerSet cultureset, MarkerSet structureSet) {
this.api = api;
this.markerapi = markerapi;
this.townBorderSet = townset;
this.cultureSet = cultureset;
this.structureSet = structureSet;
}
示例11: onEnable
import org.dynmap.DynmapAPI; //导入依赖的package包/类
@Override
public void onEnable() {
log.info("enabled...");
PluginManager pm = getServer().getPluginManager();
dynmap = pm.getPlugin("dynmap");
api = (DynmapAPI)dynmap;
civcraft = pm.getPlugin("civcraft");
markerapi = api.getMarkerAPI();
townBorderSet = markerapi.createMarkerSet("townborder.markerset", "Town Borders", null, false);
townBorderSet.setLayerPriority(10);
townBorderSet.setHideByDefault(false);
cultureSet = markerapi.createMarkerSet("townculture.markerset", "Culture", null, false);
cultureSet.setLayerPriority(15);
cultureSet.setHideByDefault(false);
structureSet = markerapi.createMarkerSet("structures.markerset", "Structures", null, false);
structureSet.setLayerPriority(20);
structureSet.setHideByDefault(false);
getServer().getScheduler().scheduleSyncRepeatingTask(this,
new CivCraftUpdateTask(this.api, this.markerapi, this.townBorderSet, this.cultureSet, this.structureSet), 40, 40);
}
示例12: getApi
import org.dynmap.DynmapAPI; //导入依赖的package包/类
public DynmapAPI getApi() {
return dynmap;
}
示例13: BukkitMCDynmapAPI
import org.dynmap.DynmapAPI; //导入依赖的package包/类
public BukkitMCDynmapAPI(Plugin dynmapPlugin) {
this((DynmapAPI) dynmapPlugin);
}
示例14: getHandle
import org.dynmap.DynmapAPI; //导入依赖的package包/类
@Override
public DynmapAPI getHandle() {
return _api;
}