Zones API
Overview
The zone system manages player progression through different dungeon areas, each with multiple stages and mob encounters. Players can join zone sessions, progress through stages, and interact with zone-specific mobs through both manual and automatic combat systems.
Session Management
Zone Sessions
void joinSession(Player player, String zoneId)
Description: Places a player into a specific zone session
Parameters:
player- Player to join the zonezoneId- Identifier of the zone to join
Usage: Zone teleportation, progression advancement, zone switching
void leaveSession(Player player)
Description: Removes a player from their current zone session
Parameters:
player- Player to remove from zoneUsage: Zone exit, session cleanup, player logout handling
boolean isPlayerInSession(Player player)
Description: Checks if a player is currently in any zone session
Parameters:
player- Player to checkReturns: True if player is in a zone session, false otherwise
Usage: Session validation, conditional zone features
Zone Information
String getPlayerZoneId(Player player)
Description: Gets the ID of the zone the player is currently in
Parameters:
player- Player to checkReturns: Zone identifier or null if not in a zone
Usage: Display current location, zone-specific features, conditional logic
Stage Progression
Stage Management
void setPlayerZoneStageId(Player player, String zoneId, String stageId)
Description: Sets a player's progress stage within a specific zone
Parameters:
player- Player whose stage to setzoneId- Zone identifierstageId- Stage identifier to set
Usage: Progression rewards, stage unlocking, administrative advancement
String getPlayerZoneStageId(Player player, String zoneId)
Description: Gets a player's current stage in a specific zone
Parameters:
player- Player to checkzoneId- Zone to check stage for
Returns: Stage identifier or null if no progress
Usage: Display progression, unlock requirements, stage-specific features
Mob Interaction
Mob Management
Set<Integer> getPlayerMobsInZone(Player player)
Description: Gets the set of mob entity IDs available to the player in their current zone
Parameters:
player- Player to get mobs forReturns: Set of mob entity IDs in the player's zone
Usage: Combat system integration, mob targeting, zone population
Combat System
void startAutoHitMob(Player player, int mobId)
Description: Starts automatic combat with a specific mob
Parameters:
player- Player to start auto-combat formobId- Entity ID of the mob to auto-attack
Usage: AFK combat systems, idle farming, automated progression
void hitMob(Player player, int mobId, BigDecimal damage, boolean giveSwingCurrencies, boolean triggerEnchants)
Description: Performs a single manual attack on a mob
Parameters:
player- Player performing the attackmobId- Entity ID of the target mob
Usage: Manual combat, click-based attacks, interactive combat
EdEntity getMobEntity(Player player, int mobId)
Description: Gets the mob EdEntity of a player (EdEntity class from EdLib)
Parameters:
player- Player owning the mobmobId- Entity ID of the target mob
Last updated
Was this helpful?