当前位置: 首页>>代码示例>>Java>>正文


Java DynmapAPI类代码示例

本文整理汇总了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;
}
 
开发者ID:DRE2N,项目名称:FactionsXL,代码行数:18,代码来源:EngineDynmap.java

示例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);
	}
	
}
 
开发者ID:AlessioDP,项目名称:Parties,代码行数:18,代码来源:DynmapHandler.java

示例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);
   		}
	}
}
 
开发者ID:FabioZumbi12,项目名称:RedProtect,代码行数:26,代码来源:RPDynmap.java

示例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);
}
 
开发者ID:tastybento,项目名称:beaconz,代码行数:20,代码来源:OurServerListener.java

示例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();
    }
}
 
开发者ID:boy0001,项目名称:plot2dynmap,代码行数:17,代码来源:Main.java

示例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]);
		}
	}	
	
}
 
开发者ID:StarQuestMinecraft,项目名称:StarQuestCode,代码行数:25,代码来源:SQOrbitsPlanetMover.java

示例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;
}
 
开发者ID:cjburkey01,项目名称:ClaimChunk,代码行数:9,代码来源:ClaimChunkDynmap.java

示例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();
    }
}
 
开发者ID:MineGaming,项目名称:cubit,代码行数:18,代码来源:CubitDynmap.java

示例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;
	}
}
 
开发者ID:MarcinWieczorek,项目名称:NovaGuilds,代码行数:13,代码来源:DynmapManager.java

示例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;
}
 
开发者ID:netizen539,项目名称:civcraft,代码行数:8,代码来源:CivCraftUpdateTask.java

示例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);
}
 
开发者ID:netizen539,项目名称:civcraft,代码行数:28,代码来源:DynmapCivcraftPlugin.java

示例12: getApi

import org.dynmap.DynmapAPI; //导入依赖的package包/类
public DynmapAPI getApi() {
	return dynmap;
}
 
开发者ID:cjburkey01,项目名称:ClaimChunk,代码行数:4,代码来源:ClaimChunkDynmap.java

示例13: BukkitMCDynmapAPI

import org.dynmap.DynmapAPI; //导入依赖的package包/类
public BukkitMCDynmapAPI(Plugin dynmapPlugin) {
	this((DynmapAPI) dynmapPlugin);
}
 
开发者ID:Hekta,项目名称:CHDynmap,代码行数:4,代码来源:BukkitMCDynmapAPI.java

示例14: getHandle

import org.dynmap.DynmapAPI; //导入依赖的package包/类
@Override
public DynmapAPI getHandle() {
	return _api;
}
 
开发者ID:Hekta,项目名称:CHDynmap,代码行数:5,代码来源:BukkitMCDynmapAPI.java


注:本文中的org.dynmap.DynmapAPI类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。