mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-03-01 15:51:03 +01:00
Stations name update
This commit is contained in:
parent
5e55049369
commit
d2ad83e218
@ -20,7 +20,9 @@ import java.util.*;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class CraftingStation extends PostLoadObject {
|
public class CraftingStation extends PostLoadObject {
|
||||||
private final String id, name;
|
private final String id;
|
||||||
|
private final String name;
|
||||||
|
private final String unparsedName;
|
||||||
private final Layout layout;
|
private final Layout layout;
|
||||||
private final Sound sound;
|
private final Sound sound;
|
||||||
private final StationItemOptions itemOptions;
|
private final StationItemOptions itemOptions;
|
||||||
@ -42,7 +44,8 @@ public class CraftingStation extends PostLoadObject {
|
|||||||
super(config);
|
super(config);
|
||||||
|
|
||||||
this.id = id.toLowerCase().replace("_", "-").replace(" ", "-");
|
this.id = id.toLowerCase().replace("_", "-").replace(" ", "-");
|
||||||
this.name = config.getString("name", "Unnamed");
|
this.unparsedName = config.getString("name", "Unnamed");
|
||||||
|
this.name = MythicLib.plugin.parseColors(unparsedName);
|
||||||
this.layout = MMOItems.plugin.getLayouts().getLayout(config.getString("layout", "default"));
|
this.layout = MMOItems.plugin.getLayouts().getLayout(config.getString("layout", "default"));
|
||||||
this.sound = Sound.valueOf(config.getString("sound", "ENTITY_EXPERIENCE_ORB_PICKUP").toUpperCase());
|
this.sound = Sound.valueOf(config.getString("sound", "ENTITY_EXPERIENCE_ORB_PICKUP").toUpperCase());
|
||||||
|
|
||||||
@ -66,7 +69,8 @@ public class CraftingStation extends PostLoadObject {
|
|||||||
Validate.notNull(sound, "Crafting station sound must not be null");
|
Validate.notNull(sound, "Crafting station sound must not be null");
|
||||||
|
|
||||||
this.id = id.toLowerCase().replace("_", "-").replace(" ", "-");
|
this.id = id.toLowerCase().replace("_", "-").replace(" ", "-");
|
||||||
this.name = name;
|
this.unparsedName = name;
|
||||||
|
this.name = MythicLib.plugin.parseColors(name);
|
||||||
this.layout = layout;
|
this.layout = layout;
|
||||||
this.sound = sound;
|
this.sound = sound;
|
||||||
this.itemOptions = itemOptions;
|
this.itemOptions = itemOptions;
|
||||||
@ -80,11 +84,11 @@ public class CraftingStation extends PostLoadObject {
|
|||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return MythicLib.plugin.parseColors(name);
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUnformattedName() {
|
public String getUnparsedName() {
|
||||||
return name;
|
return unparsedName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Layout getLayout() {
|
public Layout getLayout() {
|
||||||
|
Loading…
Reference in New Issue
Block a user