mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Update Upstream
d7b3c4c Clone the returned getRegion on BlockArrayClipboard (2144)
This commit is contained in:
parent
7a1a33aff0
commit
4fc2a25a9a
@ -138,7 +138,7 @@ public class BlockArrayClipboard implements Clipboard {
|
||||
|
||||
@Override
|
||||
public Region getRegion() {
|
||||
return region;
|
||||
return region.clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -29,15 +29,17 @@ import com.sk89q.worldedit.util.formatting.text.event.HoverEvent;
|
||||
* Simple class for handling error reporting to users.
|
||||
*/
|
||||
public class ErrorReporting {
|
||||
|
||||
private ErrorReporting() {
|
||||
}
|
||||
|
||||
public static void trigger(Actor actor, Throwable error) {
|
||||
actor.printError(Caption.of("worldedit.command.error.report"));
|
||||
actor.print(
|
||||
TextComponent.builder(error.getClass().getName() + ": " + error.getMessage())
|
||||
.hoverEvent(HoverEvent.showText(TextComponent.of(Throwables.getStackTraceAsString(error))))
|
||||
.build()
|
||||
);
|
||||
TextComponent.Builder errorBuilder = TextComponent.builder(error.getClass().getName() + ": " + error.getMessage());
|
||||
if (actor.hasPermission("worldedit.error.detailed")) {
|
||||
errorBuilder = errorBuilder.hoverEvent(HoverEvent.showText(TextComponent.of(Throwables.getStackTraceAsString(error))));
|
||||
}
|
||||
actor.print(errorBuilder.build());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user