mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +01:00
Getting correct name descriptions
This commit is contained in:
parent
2253266b4b
commit
d10ee9f1d4
@ -2,19 +2,14 @@ package com.gamingmesh.jobs.config;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
import com.gamingmesh.jobs.Jobs;
|
||||
import com.gamingmesh.jobs.container.JobInfo;
|
||||
import com.gamingmesh.jobs.container.LocaleReader;
|
||||
@ -35,7 +30,6 @@ public class NameTranslatorManager {
|
||||
}
|
||||
|
||||
public String Translate(String materialName, JobInfo info) {
|
||||
|
||||
// Translating name to user friendly
|
||||
if (Jobs.getGCManager().UseCustomNames)
|
||||
switch (info.getActionType()) {
|
||||
@ -49,6 +43,13 @@ public class NameTranslatorManager {
|
||||
case REPAIR:
|
||||
case BREW:
|
||||
case FISH:
|
||||
|
||||
for (NameList one : ListOfNames) {
|
||||
String ids = one.getName();
|
||||
if (ids.equalsIgnoreCase(materialName)) {
|
||||
return one.getName();
|
||||
}
|
||||
}
|
||||
for (NameList one : ListOfNames) {
|
||||
String ids = one.getId() + ":" + one.getMeta();
|
||||
if (!one.getMeta().equalsIgnoreCase("") && ids.equalsIgnoreCase(info.getId() + ":" + info.getMeta()) && !one.getId().equalsIgnoreCase("0")) {
|
||||
@ -169,7 +170,6 @@ public class NameTranslatorManager {
|
||||
Bukkit.getConsoleSender().sendMessage(ChatColor.YELLOW + "[Jobs] Loaded " + ListOfColors.size() + " custom color names!");
|
||||
}
|
||||
|
||||
|
||||
synchronized void load() {
|
||||
|
||||
File file = new File(plugin.getDataFolder(), "TranslatableWords.yml");
|
||||
|
Loading…
Reference in New Issue
Block a user