public final class SmartMobs
extends org.bukkit.plugin.java.JavaPlugin
implements org.bukkit.event.Listener
| Modifier and Type | Field and Description |
|---|---|
static de.slikey.effectlib.EffectManager |
EFFECT_MANAGER
The EffectLib plugin, or null if EffectLib is not installed.
|
static SmartMobs |
PLUGIN
This plugin.
|
private static java.lang.String |
PREFIX
A pre-formatted log prefix for this plugin.
|
(package private) static com.sk89q.worldguard.bukkit.WorldGuardPlugin |
WORLDGUARD
The WorldGuard plugin, or null if WorldGuard is not installed.
|
| Constructor and Description |
|---|
SmartMobs() |
| Modifier and Type | Method and Description |
|---|---|
private void |
findEffectLib()
Determines if the
EffectLib plugin is present. |
private void |
findWorldGuard()
Determines if the
WorldGuardPlugin is present. |
(package private) static void |
log(java.lang.String message)
A logging convenience method, used instead of
Logger for colorizing this
plugin's name in console. |
protected void |
onCreatureSpawn(org.bukkit.event.entity.CreatureSpawnEvent e)
Handles entity spawns, checking to ensure the spawn occurred in a supported World, not inside a WG
exemption region, and inside a defined
Zone. |
void |
onDisable()
See
JavaPlugin.onDisable(). |
void |
onEnable()
See
JavaPlugin.onEnable(). |
protected void |
onEntityDamage(org.bukkit.event.entity.EntityDamageEvent e)
Updates a mob's health name tag whenever it takes damage.
|
protected void |
onEntityDeath(org.bukkit.event.entity.EntityDeathEvent e)
Handles entity deaths by modifying dropped items and xp according to zone rules.
|
protected void |
onPlayerDeath(org.bukkit.event.entity.PlayerDeathEvent e)
Colorizes death messages in chat.
|
getClassLoader, getCommand, getConfig, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toStringpublic static SmartMobs PLUGIN
public static de.slikey.effectlib.EffectManager EFFECT_MANAGER
static com.sk89q.worldguard.bukkit.WorldGuardPlugin WORLDGUARD
private static final java.lang.String PREFIX
public void onEnable()
JavaPlugin.onEnable().onEnable in interface org.bukkit.plugin.PluginonEnable in class org.bukkit.plugin.java.JavaPluginpublic void onDisable()
JavaPlugin.onDisable().onDisable in interface org.bukkit.plugin.PluginonDisable in class org.bukkit.plugin.java.JavaPluginprivate void findWorldGuard()
WorldGuardPlugin is present. If it is, a reference to it is stored.private void findEffectLib()
EffectLib plugin is present. If it is, a reference to it is stored.static void log(java.lang.String message)
Logger for colorizing this
plugin's name in console.message - the message to log.protected void onCreatureSpawn(org.bukkit.event.entity.CreatureSpawnEvent e)
Zone. The entity's current custom name is stored in
metadata via EntityMeta so that entities spawned with custom names don't lose those names.e - the CreatureSpawnEvent.protected void onPlayerDeath(org.bukkit.event.entity.PlayerDeathEvent e)
e - the PlayerDeathEvent.protected void onEntityDeath(org.bukkit.event.entity.EntityDeathEvent e)
e - the EntityDeathEvent.protected void onEntityDamage(org.bukkit.event.entity.EntityDamageEvent e)
e - the EntityDamageEvent.