mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-22 02:25:41 +01:00
Actually fixed #294
This commit is contained in:
parent
f6e49bd8eb
commit
3a5bc6adda
@ -77,6 +77,7 @@ public class LocationConfigProperty implements MVConfigProperty<Location> {
|
||||
this.section.set(configNode + ".pitch", this.value.getPitch());
|
||||
this.section.set(configNode + ".yaw", this.value.getYaw());
|
||||
this.section.set(configNode + ".world", this.value.getWorld().getName());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -173,10 +173,7 @@ public class MVPlayerListener extends PlayerListener {
|
||||
// TODO: Fix this. Currently, we only check for PORTAL blocks. I'll have to figure out what
|
||||
// TODO: we want to do here.
|
||||
if (newloc != null) {
|
||||
System.out.println("Found a new location!");
|
||||
event.setFrom(newloc);
|
||||
} else {
|
||||
System.out.println("Did NOT find a new location!");
|
||||
}
|
||||
}
|
||||
// Wait for the adjust, then return!
|
||||
|
@ -15,6 +15,7 @@ import org.bukkit.entity.Vehicle;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Formatter;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -93,11 +94,11 @@ public class LocationManipulation {
|
||||
try {
|
||||
float pitch = 0;
|
||||
float yaw = 0;
|
||||
if (split.length == 3) {
|
||||
if (split.length >= 3) {
|
||||
yaw = (float) Double.parseDouble(split[2]);
|
||||
}
|
||||
if (split.length == 4) {
|
||||
pitch = (float) Double.parseDouble(split[2]);
|
||||
pitch = (float) Double.parseDouble(split[3]);
|
||||
}
|
||||
return new Location(w, Double.parseDouble(xyzsplit[0]), Double.parseDouble(xyzsplit[1]), Double.parseDouble(xyzsplit[2]), yaw, pitch);
|
||||
} catch (NumberFormatException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user