mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
Fix italicized potion names
This commit is contained in:
@ -259,18 +259,17 @@ public class PotionConfig extends LegacyConfigLoader {
|
||||
private void setPotionDisplayName(ConfigurationSection section, PotionMeta potionMeta) {
|
||||
String configuredName = section.getString("Name", null);
|
||||
if (configuredName != null) {
|
||||
potionMeta.setDisplayName(configuredName);
|
||||
return;
|
||||
}
|
||||
|
||||
// Potion is water, but has effects
|
||||
if (isPotionTypeWater(potionMeta)
|
||||
&& (PotionUtil.hasBasePotionEffects(potionMeta) || !potionMeta.getCustomEffects().isEmpty())) {
|
||||
// If we don't set a name for these potions, they will simply be called "Water Potion"
|
||||
final String name = section.getName().toUpperCase().replace("_", " ");
|
||||
potionMeta.setDisplayName(name);
|
||||
System.out.println("DEBUG: Renaming potion to " + name);
|
||||
potionMeta.setItemName(configuredName);
|
||||
}
|
||||
//
|
||||
// // Potion is water, but has effects
|
||||
// if (isPotionTypeWater(potionMeta)
|
||||
// && (PotionUtil.hasBasePotionEffects(potionMeta) || !potionMeta.getCustomEffects().isEmpty())) {
|
||||
// // If we don't set a name for these potions, they will simply be called "Water Potion"
|
||||
// final String name = section.getName().toUpperCase().replace("_", " ");
|
||||
// potionMeta.setDisplayName(name);
|
||||
// System.out.println("DEBUG: Renaming potion to " + name);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user