Permalink
Browse files

Added toString to LazyLocation to fix /rg info with the teleport flag.

  • Loading branch information...
me4502 committed Nov 17, 2018
1 parent 83b375b commit 015f1921930e874ced36c3be20844479450a329a
@@ -68,4 +68,13 @@ public LazyLocation add(double x, double y, double z) {
return this.setPosition(toVector().add(x, y, z));
}
@Override
public String toString() {
if (getPitch() == 0 && getYaw() == 0) {
return String.join(", ", "World=" + worldName, "X=" + getX(), "Y=" + getY(), "Z=" + getZ());
} else {
return String.join(", ", "World=" + worldName, "X=" + getX(), "Y=" + getY(),
"Z=" + getZ(), "Pitch=" + getPitch(), "Yaw=" + getYaw());
}
}
}
@@ -40,8 +40,8 @@
* left of &lt; appear before in the sorted list):</p>
*
* <ul>
* <li>[aaa, aab, aac] < aa < a</li>
* <li>[ba, bc] < b</li>
* <li>[aaa, aab, aac] &lt; aa &lt; a</li>
* <li>[ba, bc] &lt; b</li>
* </ul>
*
* <p>In the case of "[aaa, aab, aac]," the relative order between these
@@ -68,7 +68,7 @@
* @param after the handler factory to insert the first handler after, to ensure a specific order when creating new sessions
*
* @return {@code true} (as specified by {@link Collection#add})
* {@code false} if {@param after} is not registered, or {@param factory} is null
* {@code false} if after is not registered, or factory is null
*/
boolean registerHandler(Handler.Factory<? extends Handler> factory, @Nullable Handler.Factory<? extends Handler> after);
@@ -164,7 +164,7 @@ public void appendParentTree(boolean useColors) {
return;
}
List<ProtectedRegion> inheritance = new ArrayList<ProtectedRegion>();
List<ProtectedRegion> inheritance = new ArrayList<>();
ProtectedRegion r = region;
inheritance.add(r);
@@ -182,7 +182,7 @@ public void resetState(LocalPlayer player) {
* @param after the handler factory to insert the first handler after, to ensure a specific order when creating new sessions
*
* @return {@code true} (as specified by {@link Collection#add})
* {@code false} if {@param after} is not registered, or {@param factory} is null
* {@code false} if after is not registered, or factory is null
*/
@Override
public boolean registerHandler(Factory<? extends Handler> factory, @Nullable Factory<? extends Handler> after) {

0 comments on commit 015f192

Please sign in to comment.