fix: 地区初始化失败返回null

Signed-off-by: 502647092 <admin@yumc.pw>
merge/1/MERGE
502647092 2016-12-24 16:42:54 +08:00
parent 309530e610
commit fbe19de5db
1 changed files with 1 additions and 4 deletions

View File

@ -39,10 +39,7 @@ public class L {
*/
public static Location deserialize(Map<String, Object> args) {
World world = Bukkit.getWorld((String) args.get("world"));
if (world == null) {
throw new IllegalArgumentException("unknown world");
}
if (world == null) { return null; }
return new Location(world, NumberConversions.toDouble(args.get("x")), NumberConversions.toDouble(args.get("y")), NumberConversions.toDouble(args.get("z")), NumberConversions
.toFloat(args.get("yaw")), NumberConversions.toFloat(args.get("pitch")));
}