mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 11:44:42 +02:00
Added health display for mobs during combat.
During combat, players will now see a healthbar appear over the head of hostile mobs when they are damaged. This healthbar will have two display options - HEARTS and BAR - which can be changed via the /mobhealth command. New Permissions: mcmmo.mobhealthdisplay - Allows viewing of mob health display mcmmo.commands.mobhealth - Allows access to the /mobhealth command New Config Options (config.yml): Mob_Healthbar.Display_Type - the default health display type Mob_Healthbar.Display_Time - the amount of time to show health display
This commit is contained in:
@ -6,6 +6,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import com.gmail.nossr50.datatypes.MobHealthbarType;
|
||||
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||
import com.gmail.nossr50.util.StringUtils;
|
||||
@ -48,6 +49,18 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
public boolean getPartyDisplayNames() { return config.getBoolean("Commands.p.Use_Display_Names", true); }
|
||||
public boolean getAdminDisplayNames() { return config.getBoolean("Commands.a.Use_Display_Names", true); }
|
||||
|
||||
/* Mob Healthbar */
|
||||
public MobHealthbarType getMobHealthbarDefault() {
|
||||
try {
|
||||
return MobHealthbarType.valueOf(config.getString("Mob_Healthbar.Display_Type", "HEARTS").toUpperCase().trim());
|
||||
}
|
||||
catch (IllegalArgumentException ex) {
|
||||
return MobHealthbarType.HEARTS;
|
||||
}
|
||||
}
|
||||
|
||||
public int getMobHealthbarTime() { return config.getInt("Mob_Healthbar.Display_Time", 3); }
|
||||
|
||||
/* Database Purging */
|
||||
public int getPurgeInterval() { return config.getInt("Database_Purging.Purge_Interval", -1); }
|
||||
public int getOldUsersCutoff() { return config.getInt("Database_Purging.Old_User_Cutoff", 6); }
|
||||
|
Reference in New Issue
Block a user