feat: Reduce any spam caused by exceptions thrown when writing history (#1976)

- Closes #1960
This commit is contained in:
Jordan
2022-10-13 18:21:02 +01:00
committed by GitHub
parent ccb31c0ecc
commit 8971d7064c
4 changed files with 26 additions and 6 deletions

View File

@ -91,6 +91,7 @@ public class FaweException extends RuntimeException {
PLAYER_ONLY,
ACTOR_REQUIRED,
CLIPBOARD,
HISTORY,
OTHER
}

View File

@ -0,0 +1,15 @@
package com.fastasyncworldedit.core.internal.exception;
import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
public class FaweSmallEditUnsupportedException extends FaweException {
private static final Component message = TextComponent.of(
"y cannot be outside range 0-255 for small-edits=true. History will NOT work on edits outside this range.");
public FaweSmallEditUnsupportedException() {
super(message, Type.HISTORY);
}
}