3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 02:50:06 +01:00

Update Upstream

d7b3c4c Clone the returned getRegion on BlockArrayClipboard (2144)
Dieser Commit ist enthalten in:
Alexander Brandes 2022-07-16 11:08:42 +02:00
Ursprung 7a1a33aff0
Commit 4fc2a25a9a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 158F5701A6AAD00C
2 geänderte Dateien mit 8 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -138,7 +138,7 @@ public class BlockArrayClipboard implements Clipboard {
@Override @Override
public Region getRegion() { public Region getRegion() {
return region; return region.clone();
} }
@Override @Override

Datei anzeigen

@ -29,15 +29,17 @@ import com.sk89q.worldedit.util.formatting.text.event.HoverEvent;
* Simple class for handling error reporting to users. * Simple class for handling error reporting to users.
*/ */
public class ErrorReporting { public class ErrorReporting {
private ErrorReporting() { private ErrorReporting() {
} }
public static void trigger(Actor actor, Throwable error) { public static void trigger(Actor actor, Throwable error) {
actor.printError(Caption.of("worldedit.command.error.report")); actor.printError(Caption.of("worldedit.command.error.report"));
actor.print( TextComponent.Builder errorBuilder = TextComponent.builder(error.getClass().getName() + ": " + error.getMessage());
TextComponent.builder(error.getClass().getName() + ": " + error.getMessage()) if (actor.hasPermission("worldedit.error.detailed")) {
.hoverEvent(HoverEvent.showText(TextComponent.of(Throwables.getStackTraceAsString(error)))) errorBuilder = errorBuilder.hoverEvent(HoverEvent.showText(TextComponent.of(Throwables.getStackTraceAsString(error))));
.build()
);
} }
actor.print(errorBuilder.build());
}
} }