api-old/API Main

Do you need to link your plugin with DungeonMaze ? Now you can with our API !

just import the API like this :

import com.timvisee.DungeonMaze.API.DungeonMazeAPI;

and hook to our plugin like this :
In your onEnable :

if (getDungeonMaze() != null) {
 //do something ( like register event , etc... )

And create a public function like this :

    public DungeonMaze getDungeonMaze() {
    	Plugin plugin = getServer().getPluginManager().getPlugin("DungeonMaze");
        if (plugin == null && !(plugin instanceof DungeonMaze)) {
        	return null;
    	return (DungeonMaze) plugin;

and now you can use our simple API with some functions :

Method nameargumentseffect
getDMWorldsNoneReturn a List<String> with all DungeonMaze Worlds
getLoadedDMWorldsNoneReturn a List<String> with all loaded DM Worlds
isDMWorldWorldReturn true if the world is a DM World , false if it is not
isDMWorldString(WorldName)Return true if the name of the world is associated to a DM Worlds, false if it is not
isInDMWorldPlayerReturn true if the player is in a DM World, false if not
getDMWorldPlayerReturn a string with the DM World where is the player if he is one, return null if he isn't in a DMW
getDMWorldNamePlayerReturn the world where is the player, return null if he isn't in a DMW
canBuildInDMWorld(String(WorldName),Player)Return true if the player can build in the given DM World , return true too if he isn't in a DMW
isPlayerAllowedOnDMWorldSurface(String(WorldName),Player)Return true if the player can acces to the DM World surface , return true too if he isn't in a DMW
isInWhiteListObject(item type ID (int))Return true if the item is in the white list from config, return false if it isn't
allowMobSpawnerString (MobName)Return true if the mob spawner is allow , return false if it isn't
getDMLevelBlock (block)Get the Dungeon Maze level a block is on

Default WhiteList : null
Default MobSpawner List :
- Blaze
- Creeper
- Enderman
- Ghast
- MagmaCube
- Pig
- PigZombie
- Silverfish
- Skeleton
- Spider
- Zombie

API Events

Dungeon Maze does have it's own events, witch are very easy to listen to. Please go to this page to find out more information about the Dungeon Maze events.

Page: Dungeon Maze API / Events / Main


Posts Quoted:
Clear All Quotes