mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-06 02:51:32 +01:00
Catch exceptions while loading warps.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1515 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
b790a1b404
commit
df29d80e5d
@ -6,6 +6,7 @@ import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Server;
|
||||
@ -99,12 +100,19 @@ public class Warps implements IConf
|
||||
String filename = listOfFiles[i].getName();
|
||||
if (listOfFiles[i].isFile() && filename.endsWith(".yml"))
|
||||
{
|
||||
EssentialsConf conf = new EssentialsConf(listOfFiles[i]);
|
||||
conf.load();
|
||||
String name = conf.getString("name");
|
||||
if (name != null)
|
||||
try
|
||||
{
|
||||
warpPoints.put(new StringIgnoreCase(name), conf);
|
||||
EssentialsConf conf = new EssentialsConf(listOfFiles[i]);
|
||||
conf.load();
|
||||
String name = conf.getString("name");
|
||||
if (name != null)
|
||||
{
|
||||
warpPoints.put(new StringIgnoreCase(name), conf);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.log(Level.WARNING, Util.format("loadWarpError", filename), ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -304,3 +304,4 @@ illegalDate = Illegal date format.
|
||||
timePattern = (?:([0-9]+)\\s*y[a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*h[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
|
||||
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
||||
kits = \u00a77Kits: {0}
|
||||
loadWarpError = Failed to load warp {0}
|
@ -304,3 +304,4 @@ illegalDate = Ung\u00fcltiges Datumsformat.
|
||||
timePattern = (?:([0-9]+)\\s*[yj][a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*[dt][a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:h|st)[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
|
||||
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
||||
kits = \u00a77Ausr\u00fcstungen: {0}
|
||||
loadWarpError = Fehler beim Laden von Warp-Punkt {0}
|
@ -304,3 +304,4 @@ illegalDate = Illegal date format.
|
||||
timePattern = (?:([0-9]+)\\s*y[a-z]*[,\\s]*)?(?:([0-9]+)\\s*mo[a-z]*[,\\s]*)?(?:([0-9]+)\\s*w[a-z]*[,\\s]*)?(?:([0-9]+)\\s*d[a-z]*[,\\s]*)?(?:([0-9]+)\\s*h[a-z]*[,\\s]*)?(?:([0-9]+)\\s*m[a-z]*[,\\s]*)?(?:([0-9]+)\\s*(?:s[a-z]*)?)?
|
||||
msgFormat = \u00a77[{0}\u00a77 -> {1}\u00a77] \u00a7f{2}
|
||||
kits = \u00a77Kits: {0}
|
||||
loadWarpError = Failed to load warp {0}
|
Loading…
Reference in New Issue
Block a user