mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-19 13:01:20 +02:00
cleanup last commit a bit
This commit is contained in:
@@ -135,29 +135,14 @@ public class Warps implements IConf, IWarps
|
|||||||
@Override
|
@Override
|
||||||
public Collection<String> getList()
|
public Collection<String> getList()
|
||||||
{
|
{
|
||||||
final List<String> keys = new ArrayList<String>();
|
return getWarpNames();
|
||||||
for (StringIgnoreCase stringIgnoreCase : warpPoints.keySet())
|
|
||||||
{
|
|
||||||
keys.add(stringIgnoreCase.getString());
|
|
||||||
}
|
|
||||||
Collections.sort(keys, String.CASE_INSENSITIVE_ORDER);
|
|
||||||
return keys;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is for api support, and so 3.x will not break this api
|
// This is for api support, and so 3.x will not break this api
|
||||||
@Override
|
@Override
|
||||||
public void removeWarp(String name) throws Exception
|
public void removeWarp(String name) throws Exception
|
||||||
{
|
{
|
||||||
EssentialsConf conf = warpPoints.get(new StringIgnoreCase(name));
|
delWarp(name);
|
||||||
if (conf == null)
|
|
||||||
{
|
|
||||||
throw new Exception(_("warpNotExist"));
|
|
||||||
}
|
|
||||||
if (!conf.getFile().delete())
|
|
||||||
{
|
|
||||||
throw new Exception(_("warpDeleteError"));
|
|
||||||
}
|
|
||||||
warpPoints.remove(new StringIgnoreCase(name));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//This is here for future 3.x api support. Not implemented here becasue storage is handled differently
|
//This is here for future 3.x api support. Not implemented here becasue storage is handled differently
|
||||||
|
Reference in New Issue
Block a user