API Methods
Complete reference of public API methods available in AdvanceMMO.
Getting the Plugin Instance
Plugin plugin = Bukkit.getPluginManager().getPlugin("AdvanceMMO");
if (plugin instanceof AdvanceMMO) {
AdvanceMMO advanceMMO = (AdvanceMMO) plugin;
// Use API
}
PlayerDataManager
Access player data and statistics.
Methods
| Method |
Description |
getPlayerData(UUID uuid) |
Get PlayerData for a player |
savePlayerData(UUID uuid) |
Save player data to database |
loadPlayerData(UUID uuid) |
Load player data from database |
PlayerData Methods
| Method |
Description |
getLevel() |
Get player level |
getXp() |
Get current XP |
getMoney() |
Get player money |
setLevel(int level) |
Set player level |
addXp(long xp) |
Add XP to player |
hasSelectedClass() |
Check if player has selected a class |
getClassId() |
Get player's class ID |
SystemManager
Access to all plugin systems.
Methods
| Method |
Description |
getClassSystem() |
Get ClassSystem instance |
getSkillTreeManager() |
Get SkillTreeManager instance |
getManaManager() |
Get ManaManager instance |
getSkillEffectHandler() |
Get SkillEffectHandler instance |
getActiveSkillManager() |
Get ActiveSkillManager instance |
getSkillComboSystem() |
Get SkillComboSystem instance |
getRaceSystem() |
Get RaceSystem instance |
getAbilitySystem() |
Get AbilitySystem instance |
getQuestSystem() |
Get QuestSystem instance |
getProfessionSystem() |
Get ProfessionSystem instance |
getAchievementManager() |
Get AchievementManager instance |
getLevelSystem() |
Get LevelSystem instance |
ClassSystem
| Method |
Description |
getClass(int id) |
Get class by ID |
getAllClasses() |
Get all available classes |
selectClass(UUID uuid, int classId) |
Select a class for a player |
QuestSystem
| Method |
Description |
getQuest(int id) |
Get quest by ID |
getAvailableQuests(UUID uuid) |
Get available quests for player |
getActiveQuests(UUID uuid) |
Get active quests for player |
acceptQuest(UUID uuid, int questId) |
Accept a quest |
completeQuest(UUID uuid, int questId) |
Complete a quest |
ProfessionSystem
| Method |
Description |
getProfession(int id) |
Get profession by ID |
getPlayerProfession(UUID uuid) |
Get player's profession |
selectProfession(UUID uuid, int professionId) |
Select a profession for a player |
LevelSystem
| Method |
Description |
getXPForLevel(int level) |
Get XP required for a level |
addXP(UUID uuid, long xp) |
Add XP to a player |
setLevel(UUID uuid, int level) |
Set player level |
DungeonSystem
Access dungeon system functionality.
Methods
| Method |
Description |
getDungeonSystem() |
Get the DungeonSystem instance |
createDungeonInstance(Player player, String dungeonName) |
Create a new dungeon instance for a player |
teleportToDungeon(Player player, String dungeonName) |
Teleport player to a dungeon (creates instance if needed) |
handleExit(Player player) |
Handle player exiting a dungeon |
getDungeonDefinition(String name) |
Get dungeon definition by name |
getAllDungeonDefinitions() |
Get all available dungeon definitions |
getDungeonWorldManager() |
Get the DungeonWorldManager instance |
getPortalSystem() |
Get the PortalSystem instance |
getDungeonGenerator() |
Get the DungeonGenerator instance |
DungeonWorldManager Methods
| Method |
Description |
createDungeonInstance(Player player, String dungeonName) |
Create a new dungeon world instance |
deleteDungeonInstance(UUID playerUuid) |
Delete a dungeon instance world |
getDungeonWorld(UUID playerUuid) |
Get the dungeon world for a player |
teleportToDungeon(Player player, String dungeonName) |
Teleport player to their dungeon instance |
teleportFromDungeon(Player player) |
Teleport player back from dungeon |
isDungeonWorld(String worldName) |
Check if a world is a dungeon world |
PortalSystem Methods
| Method |
Description |
createPortal(Location location, PortalType type, String targetWorld, String dungeonName) |
Create a portal at the specified location |
handlePortalEnter(Player player, Location portalLocation) |
Handle player entering a portal |
isPortal(Location location) |
Check if a location is a portal |
getPortal(Location location) |
Get portal information at location |
removePortal(Location location) |
Remove a portal |
DungeonGenerator Methods
| Method |
Description |
generateDungeon(World world, String dungeonType, int size) |
Generate a complete dungeon in the specified world |
generateRooms(World world, int gridSize, int roomSizeMin, int roomSizeMax) |
Generate rooms in a dungeon |
generateCorridors(World world, List<Room> rooms) |
Generate corridors connecting rooms |
placeFeatures(World world, List<Room> rooms, DungeonDefinition definition) |
Place features (bosses, loot, spawners, etc.) in rooms |
LanguageManager
| Method |
Description |
getMessage(String key) |
Get message by key |
getMessage(String key, Map<String, String> replacements) |
Get message with replacements |
getLanguage() |
Get current language |
Example Usage
// Get player data
PlayerData data = plugin.getPlayerDataManager().getPlayerData(player.getUniqueId());
int level = data.getLevel();
// Add XP
plugin.getSystemManager().getLevelSystem().addXP(player.getUniqueId(), 100);
// Get player's class
ClassSystem classSystem = plugin.getSystemManager().getClassSystem();
if (data.hasSelectedClass()) {
PlayerClass playerClass = classSystem.getClass(data.getClassId());
String className = playerClass.getDisplayName();
}
// Get available quests
QuestSystem questSystem = plugin.getSystemManager().getQuestSystem();
List<Quest> availableQuests = questSystem.getAvailableQuests(player.getUniqueId());
Important: Always check for null values and handle exceptions when using the API.