Removing the small ugly language file

This commit is contained in:
Olof Larsson
2011-10-10 01:59:36 +02:00
parent 27c45bf7f3
commit e402797c54
5 changed files with 21 additions and 35 deletions

View File

@@ -12,6 +12,7 @@ import org.bukkit.plugin.Plugin;
import ru.tehkode.permissions.PermissionManager;
import ru.tehkode.permissions.bukkit.PermissionsEx;
import com.massivecraft.factions.zcore.Lang;
import com.massivecraft.factions.zcore.MPlugin;
import com.nijiko.permissions.PermissionHandler;
import com.nijikokun.bukkit.Permissions.Permissions;
@@ -33,7 +34,7 @@ public class PermUtil {
public String getForbiddenMessage(String perm)
{
return p.txt.get("perm.forbidden", getPermissionDescription(perm));
return p.txt.parse(Lang.permForbidden, getPermissionDescription(perm));
}
/**
@@ -69,7 +70,7 @@ public class PermUtil {
String desc = permissionDescriptions.get(perm);
if (desc == null)
{
return p.txt.get("perm.dothat");
return Lang.permDoThat;
}
return desc;
}

View File

@@ -10,24 +10,18 @@ import org.bukkit.Material;
public class TextUtil
{
private Map<String, String> tags = new HashMap<String, String>();
private Map<String, String> lang = new HashMap<String, String>();
public TextUtil(Map<String, String> tags, Map<String, String> lang)
public TextUtil(Map<String, String> tags)
{
if (tags != null)
{
this.tags.putAll(tags);
}
if (lang != null)
{
this.lang.putAll(lang);
}
}
// Get is supposed to be the way we reach registered lang
// TODO: Is the parse
public String get(String name)
/*public String get(String name)
{
String str = lang.get(name);
if (str == null) str = name;
@@ -41,7 +35,7 @@ public class TextUtil
if (str == null) str = name;
return this.parse(str, args);
}
}*/
// Parse is used to handle non registered text
public String parse(String str, Object... args)
@@ -58,11 +52,6 @@ public class TextUtil
{
return tags;
}
public Map<String, String> getLang()
{
return lang;
}
public String tags(String str)
{