chore: pre-commit changes

This commit is contained in:
github-actions[bot] 2024-06-16 23:32:11 +00:00 committed by Sekwah
parent 069cd746f1
commit ed3eb6b868
3 changed files with 6 additions and 9 deletions

View File

@ -75,9 +75,8 @@ public abstract class CreateTaggedSubCommand implements SubCommand {
String baseString = endsWithSplit
? argData
: argData.substring(
0,
argData.lastIndexOf(multiTagSplit)
+ 1);
0,
argData.lastIndexOf(multiTagSplit) + 1);
tagSuggestions =
tagSuggestions

View File

@ -127,8 +127,8 @@ public class ReflectiveConstructor<T> extends Constructor {
}
} catch (Exception e) {
infoLogger.warning("Failed to set field " + field.getName()
+ " in " + currentClass.getName()
+ ": " + e.getMessage());
+ " in " + currentClass.getName() + ": "
+ e.getMessage());
infoLogger.error(e);
throw new RuntimeException("Failed to set field "
+ field.getName() + " in "

View File

@ -51,15 +51,13 @@ public class FriendlyDataOutput {
public void writeUtf(String text, int maxLength) {
if (text.length() > maxLength) {
throw new EncoderException("String too big (was " + text.length()
+ " characters, max " + maxLength
+ ")");
+ " characters, max " + maxLength + ")");
} else {
byte[] abyte = text.getBytes(StandardCharsets.UTF_8);
int i = getMaxEncodedUtfLength(maxLength);
if (abyte.length > i) {
throw new EncoderException("String too big (was " + abyte.length
+ " bytes encoded, max " + i
+ ")");
+ " bytes encoded, max " + i + ")");
} else {
this.writeVarInt(abyte.length);
this.writeBytes(abyte);