Package net.playavalon.mythicdungeons
Class MythicDungeons
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
net.playavalon.mythicdungeons.MythicDungeons
- All Implemented Interfaces:
MythicDungeonsService
,org.bukkit.command.CommandExecutor
,org.bukkit.command.TabCompleter
,org.bukkit.command.TabExecutor
,org.bukkit.plugin.Plugin
public final class MythicDungeons
extends org.bukkit.plugin.java.JavaPlugin
implements MythicDungeonsService
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptPartyInvite
(org.bukkit.entity.Player target) Accepts the pending party invite for a player if one exists.boolean
createParty
(org.bukkit.entity.Player target) Creates a party for a player.boolean
declinePartyInvite
(org.bukkit.entity.Player target) Declines the pending party invite for a player if one exists.boolean
disbandParty
(MythicParty party) Disbands a party.boolean
disbandParty
(org.bukkit.entity.Player target) Disbands the party that a player is a part of.Get all registered dungeon objects.Returns the MythicDungeons development build versiongetDungeonInstance
(String worldName) Get the dungeon instance associated with the passed in world name.getDungeonInstance
(org.bukkit.entity.Player player) Returns the instance the player is in.getMythicPlayer
(UUID uuid) getMythicPlayer
(org.bukkit.entity.Player player) getParty
(org.bukkit.entity.Player player) Returns the party that a player is in.Returns the MythicDungeons plugin versionvoid
boolean
initiateDungeonForPlayer
(org.bukkit.entity.Player player, String dungeonName) Initiate a dungeon instance for a player (and coordinating party) based on the dungeon name.static MythicDungeons
inst()
boolean
inviteToParty
(org.bukkit.entity.Player source, org.bukkit.entity.Player target) Invites a player to a party based on the inviter's party.Returns the party that a player is in.isPartyQueuedForDungeon
(org.bukkit.entity.Player player) Returns the party that a player is in.boolean
isPlayerInDungeon
(org.bukkit.entity.Player player) Returns true if the player is in a dungeon.void
void
onEnable()
<T extends TriggerCondition>
voidregisterCondition
(Class<T> condition) void
registerConditions
(String conditionsPackage) <T extends DungeonFunction>
voidregisterFunction
(Class<T> function) void
registerFunctions
(String functionsPackage) <T extends DungeonTrigger>
voidregisterTrigger
(Class<T> trigger) void
registerTriggers
(String triggersPackage) void
reload()
void
void
void
reloadDungeon
(Dungeon dungeon) boolean
removeFromParty
(org.bukkit.entity.Player target) Removes a player from the current party they are in.boolean
sendToDungeon
(org.bukkit.entity.Player player, String dungeonName) boolean
setPartyLeader
(org.bukkit.entity.Player player) Sets the party leader for a player's party.Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, isEnabled, isNaggable, onCommand, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setNaggable, toString
Methods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode
-
Field Details
-
debugPrefix
-
-
Constructor Details
-
MythicDungeons
public MythicDungeons()
-
-
Method Details
-
onEnable
public void onEnable()- Specified by:
onEnable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onEnable
in classorg.bukkit.plugin.java.JavaPlugin
-
onDisable
public void onDisable()- Specified by:
onDisable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onDisable
in classorg.bukkit.plugin.java.JavaPlugin
-
reload
public void reload() -
reloadAllDungeons
public void reloadAllDungeons() -
reloadDungeon
-
reloadConfigs
public void reloadConfigs() -
initEditMenu
public void initEditMenu() -
getVersion
Returns the MythicDungeons plugin version- Returns:
- int
-
getBuildNumber
Returns the MythicDungeons development build version- Returns:
- int
-
getMythicPlayer
-
getMythicPlayer
-
sendToDungeon
-
getDungeonsFolder
-
getDungeonManager
-
registerFunction
-
registerTrigger
-
registerCondition
-
registerFunctions
-
registerTriggers
-
registerConditions
-
inst
-
isPlayerInDungeon
public boolean isPlayerInDungeon(org.bukkit.entity.Player player) Description copied from interface:MythicDungeonsService
Returns true if the player is in a dungeon.- Specified by:
isPlayerInDungeon
in interfaceMythicDungeonsService
- Parameters:
player
- The player to check.
-
getDungeonInstance
Description copied from interface:MythicDungeonsService
Returns the instance the player is in.- Specified by:
getDungeonInstance
in interfaceMythicDungeonsService
- Parameters:
player
- The player to check for.- Returns:
- The instance the player is in, or null if not in a dungeon.
-
getDungeonInstance
Description copied from interface:MythicDungeonsService
Get the dungeon instance associated with the passed in world name.- Specified by:
getDungeonInstance
in interfaceMythicDungeonsService
- Returns:
- The dungeon instance associated with the passed in world name, or null if not found.
-
getAllDungeons
Description copied from interface:MythicDungeonsService
Get all registered dungeon objects.- Specified by:
getAllDungeons
in interfaceMythicDungeonsService
- Returns:
- A collection of all the registered dungeons on the server.
-
initiateDungeonForPlayer
Description copied from interface:MythicDungeonsService
Initiate a dungeon instance for a player (and coordinating party) based on the dungeon name.- Specified by:
initiateDungeonForPlayer
in interfaceMythicDungeonsService
- Parameters:
player
- The player to initiate for.dungeonName
- The name of the dungeon to initiate.- Returns:
- True if the player successfully initiated a dungeon instance, else false.
-
createParty
public boolean createParty(org.bukkit.entity.Player target) Description copied from interface:MythicDungeonsService
Creates a party for a player.- Specified by:
createParty
in interfaceMythicDungeonsService
- Parameters:
target
- The player to create a party for.- Returns:
- True if the player was successfully added to a party, else false.
-
removeFromParty
public boolean removeFromParty(org.bukkit.entity.Player target) Description copied from interface:MythicDungeonsService
Removes a player from the current party they are in.- Specified by:
removeFromParty
in interfaceMythicDungeonsService
- Parameters:
target
- The player to remove from the party they are currently in.- Returns:
- True if the player was successfully removed from their party, else false.
-
disbandParty
Description copied from interface:MythicDungeonsService
Disbands a party.- Specified by:
disbandParty
in interfaceMythicDungeonsService
- Parameters:
party
- The party to disband.- Returns:
- True if the party was successfully disbanded, else false.
-
disbandParty
public boolean disbandParty(org.bukkit.entity.Player target) Description copied from interface:MythicDungeonsService
Disbands the party that a player is a part of. NOTE: This will effectively remove ALL players that are in a party from that party!- Specified by:
disbandParty
in interfaceMythicDungeonsService
- Parameters:
target
- The player to disband the party for.- Returns:
- True if the party was successfully disbanded, else false.
-
inviteToParty
public boolean inviteToParty(org.bukkit.entity.Player source, org.bukkit.entity.Player target) Description copied from interface:MythicDungeonsService
Invites a player to a party based on the inviter's party.- Specified by:
inviteToParty
in interfaceMythicDungeonsService
- Parameters:
source
- The player who owns the party to invite to.target
- The player to invite to the party.- Returns:
- True if the player was successfully invited to the party, else false.
-
acceptPartyInvite
public boolean acceptPartyInvite(org.bukkit.entity.Player target) Description copied from interface:MythicDungeonsService
Accepts the pending party invite for a player if one exists.- Specified by:
acceptPartyInvite
in interfaceMythicDungeonsService
- Parameters:
target
- The player to accept the party invite for.- Returns:
- True if the player successfully accepted a pending party invite, else false.
-
declinePartyInvite
public boolean declinePartyInvite(org.bukkit.entity.Player target) Description copied from interface:MythicDungeonsService
Declines the pending party invite for a player if one exists.- Specified by:
declinePartyInvite
in interfaceMythicDungeonsService
- Parameters:
target
- The player to decline the party invite for.- Returns:
- True if the player successfully declined a pending party invite, else false.
-
setPartyLeader
public boolean setPartyLeader(org.bukkit.entity.Player player) Description copied from interface:MythicDungeonsService
Sets the party leader for a player's party.- Specified by:
setPartyLeader
in interfaceMythicDungeonsService
- Parameters:
player
- The player to set as party leader of their party.- Returns:
- True if the player successfully set the party leader, else false.
-
getParty
Description copied from interface:MythicDungeonsService
Returns the party that a player is in.- Specified by:
getParty
in interfaceMythicDungeonsService
- Parameters:
player
- The player to get the party from.- Returns:
- The party that the player is in, or null if the player is not in a party.
-
isPartyQueuedForDungeon
Description copied from interface:MythicDungeonsService
Returns the party that a player is in.- Specified by:
isPartyQueuedForDungeon
in interfaceMythicDungeonsService
- Parameters:
player
- The player to check their party's queue status for.- Returns:
- The dungeon name for the dungeon the party is queued for, otherwise null.
-
isPartyQueuedForDungeon
Description copied from interface:MythicDungeonsService
Returns the party that a player is in.- Specified by:
isPartyQueuedForDungeon
in interfaceMythicDungeonsService
- Parameters:
party
- The party to check the queue status for.- Returns:
- The dungeon name for the dungeon the party is queued for, otherwise null.
-