mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-25 12:06:17 +01:00
chore: pre-commit changes
This commit is contained in:
parent
069cd746f1
commit
ed3eb6b868
@ -75,9 +75,8 @@ public abstract class CreateTaggedSubCommand implements SubCommand {
|
|||||||
String baseString = endsWithSplit
|
String baseString = endsWithSplit
|
||||||
? argData
|
? argData
|
||||||
: argData.substring(
|
: argData.substring(
|
||||||
0,
|
0,
|
||||||
argData.lastIndexOf(multiTagSplit)
|
argData.lastIndexOf(multiTagSplit) + 1);
|
||||||
+ 1);
|
|
||||||
|
|
||||||
tagSuggestions =
|
tagSuggestions =
|
||||||
tagSuggestions
|
tagSuggestions
|
||||||
|
@ -127,8 +127,8 @@ public class ReflectiveConstructor<T> extends Constructor {
|
|||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
infoLogger.warning("Failed to set field " + field.getName()
|
infoLogger.warning("Failed to set field " + field.getName()
|
||||||
+ " in " + currentClass.getName()
|
+ " in " + currentClass.getName() + ": "
|
||||||
+ ": " + e.getMessage());
|
+ e.getMessage());
|
||||||
infoLogger.error(e);
|
infoLogger.error(e);
|
||||||
throw new RuntimeException("Failed to set field "
|
throw new RuntimeException("Failed to set field "
|
||||||
+ field.getName() + " in "
|
+ field.getName() + " in "
|
||||||
|
@ -51,15 +51,13 @@ public class FriendlyDataOutput {
|
|||||||
public void writeUtf(String text, int maxLength) {
|
public void writeUtf(String text, int maxLength) {
|
||||||
if (text.length() > maxLength) {
|
if (text.length() > maxLength) {
|
||||||
throw new EncoderException("String too big (was " + text.length()
|
throw new EncoderException("String too big (was " + text.length()
|
||||||
+ " characters, max " + maxLength
|
+ " characters, max " + maxLength + ")");
|
||||||
+ ")");
|
|
||||||
} else {
|
} else {
|
||||||
byte[] abyte = text.getBytes(StandardCharsets.UTF_8);
|
byte[] abyte = text.getBytes(StandardCharsets.UTF_8);
|
||||||
int i = getMaxEncodedUtfLength(maxLength);
|
int i = getMaxEncodedUtfLength(maxLength);
|
||||||
if (abyte.length > i) {
|
if (abyte.length > i) {
|
||||||
throw new EncoderException("String too big (was " + abyte.length
|
throw new EncoderException("String too big (was " + abyte.length
|
||||||
+ " bytes encoded, max " + i
|
+ " bytes encoded, max " + i + ")");
|
||||||
+ ")");
|
|
||||||
} else {
|
} else {
|
||||||
this.writeVarInt(abyte.length);
|
this.writeVarInt(abyte.length);
|
||||||
this.writeBytes(abyte);
|
this.writeBytes(abyte);
|
||||||
|
Loading…
Reference in New Issue
Block a user