mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-16 19:44:15 +02:00
@@ -1,4 +1,3 @@
|
||||
|
||||
package com.earth2me.essentials.storage;
|
||||
|
||||
import com.earth2me.essentials.api.IReload;
|
||||
@@ -7,7 +6,6 @@ import java.io.File;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
|
||||
interface IStorageObjectMap<I> extends IReload
|
||||
{
|
||||
boolean objectExists(final String name);
|
||||
|
@@ -56,13 +56,16 @@ public class Location
|
||||
if (loc == null)
|
||||
{
|
||||
World world = null;
|
||||
if (worldUID != null) {
|
||||
if (worldUID != null)
|
||||
{
|
||||
world = Bukkit.getWorld(worldUID);
|
||||
}
|
||||
if (world == null) {
|
||||
if (world == null)
|
||||
{
|
||||
world = Bukkit.getWorld(worldname);
|
||||
}
|
||||
if (world == null) {
|
||||
if (world == null)
|
||||
{
|
||||
throw new WorldNotLoadedException(worldname);
|
||||
}
|
||||
loc = new org.bukkit.Location(world, getX(), getY(), getZ(), getYaw(), getPitch());
|
||||
@@ -101,6 +104,7 @@ public class Location
|
||||
return pitch;
|
||||
}
|
||||
|
||||
|
||||
public static class WorldNotLoadedException extends Exception
|
||||
{
|
||||
public WorldNotLoadedException(String worldname)
|
||||
|
@@ -45,7 +45,8 @@ public class YamlStorageReader implements IStorageReader
|
||||
try
|
||||
{
|
||||
T object = (T)yaml.load(reader);
|
||||
if (object == null) {
|
||||
if (object == null)
|
||||
{
|
||||
object = clazz.newInstance();
|
||||
}
|
||||
return object;
|
||||
|
Reference in New Issue
Block a user