mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-23 13:30:06 +00:00
Use EnumAddressee instead of String to identify mail carriers
This commit is contained in:
1 parent
d6c3c8093c
commit
dff81eb85c
6 files changed
+20
-29
No files matched your search
@@ -26,24 +26,22 @@ import forestry.plugins.PluginMail;
|
||||
|
||||
public class PostalCarrier implements IPostalCarrier {
|
||||
|
||||
private final String uid;
|
||||
private final String iconID;
|
||||
private final EnumAddressee type;
|
||||
|
||||
public PostalCarrier(EnumAddressee type) {
|
||||
uid = type.toString().toLowerCase(Locale.ENGLISH);
|
||||
iconID = "mail/carrier." + uid;
|
||||
iconID = "mail/carrier." + type;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUID() {
|
||||
return uid;
|
||||
public EnumAddressee getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return StringUtil.localize("gui.addressee." + uid);
|
||||
return StringUtil.localize("gui.addressee." + type);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user