mirror of
https://github.com/Zrips/Jobs.git
synced 2024-12-31 21:37:57 +01:00
Lets keep loading in plugin when some none essential files fail to load
This commit is contained in:
parent
6051c78d21
commit
14b7e837d8
@ -273,11 +273,24 @@ public class GeneralConfigManager {
|
||||
// Load locale
|
||||
Jobs.getLanguageManager().load();
|
||||
// title settings
|
||||
Jobs.getTitleManager().load();
|
||||
try {
|
||||
Jobs.getTitleManager().load();
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// restricted areas
|
||||
Jobs.getRestrictedAreaManager().load();
|
||||
try {
|
||||
Jobs.getRestrictedAreaManager().load();
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// restricted blocks
|
||||
Jobs.getRestrictedBlockManager().load();
|
||||
try {
|
||||
Jobs.getRestrictedBlockManager().load();
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
// Item/Block/mobs name list
|
||||
Jobs.getNameTranslatorManager().load();
|
||||
// signs information
|
||||
|
@ -3,6 +3,7 @@ package com.gamingmesh.jobs.stuff;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
@ -63,6 +64,12 @@ public final class Util {
|
||||
return blocks;
|
||||
}
|
||||
|
||||
private final static DecimalFormat dcf = new DecimalFormat("##.##");
|
||||
|
||||
public static String format2Decimals(double number) {
|
||||
return dcf.format(number);
|
||||
}
|
||||
|
||||
public static String getRealType(Entity entity) {
|
||||
if (Version.isCurrentEqualOrHigher(Version.v1_11_R1)) {
|
||||
return entity.getType().name();
|
||||
|
Loading…
Reference in New Issue
Block a user