mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 02:27:42 +01:00
Added toString to LazyLocation to fix /rg info with the teleport flag.
This commit is contained in:
parent
83b375b6e1
commit
015f192193
@ -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 < appear before in the sorted list):</p>
|
||||
*
|
||||
* <ul>
|
||||
* <li>[aaa, aab, aac] < aa < a</li>
|
||||
* <li>[ba, bc] < b</li>
|
||||
* <li>[aaa, aab, aac] < aa < a</li>
|
||||
* <li>[ba, bc] < b</li>
|
||||
* </ul>
|
||||
*
|
||||
* <p>In the case of "[aaa, aab, aac]," the relative order between these
|
||||
|
@ -68,7 +68,7 @@ public interface SessionManager {
|
||||
* @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) {
|
||||
|
Loading…
Reference in New Issue
Block a user