mirror of https://github.com/Minestom/Minestom.git
Address styling issues
This commit is contained in:
parent
8fd66442a2
commit
6f36d2404a
|
@ -60,11 +60,12 @@ public interface PacketGroupingAudience extends ForwardingAudience {
|
|||
|
||||
@Override
|
||||
default void sendMessage(@NotNull Identity source, @NotNull Component message, @NotNull MessageType type) {
|
||||
if (type == MessageType.SYSTEM)
|
||||
if (type == MessageType.SYSTEM) {
|
||||
Messenger.sendSystemMessage(getPlayers(), message, ChatType.SYSTEM);
|
||||
else
|
||||
} else {
|
||||
Messenger.sendUnsignedMessage(getPlayers(), new MessageSender(Component.text("UNKNOWN SENDER",
|
||||
NamedTextColor.RED), null), message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -15,13 +15,9 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
public record ArgumentsSignature(long timestamp, long salt, Map<String, byte[]> signatures, boolean signedPreview)
|
||||
implements Writeable {
|
||||
public ArgumentsSignature(long timestamp, long salt, Map<String, byte[]> signatures, boolean signedPreview) {
|
||||
this.timestamp = timestamp;
|
||||
this.salt = salt;
|
||||
this.signatures = Map.copyOf(signatures);
|
||||
this.signedPreview = signedPreview;
|
||||
public record ArgumentsSignature(long timestamp, long salt, Map<String, byte[]> signatures, boolean signedPreview) implements Writeable {
|
||||
public ArgumentsSignature {
|
||||
signatures = Map.copyOf(signatures);
|
||||
}
|
||||
|
||||
public ArgumentsSignature(BinaryReader reader) {
|
||||
|
|
|
@ -667,11 +667,12 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
|||
|
||||
@Override
|
||||
public void sendMessage(@NotNull Identity source, @NotNull Component message, @NotNull MessageType type) {
|
||||
if (type == MessageType.SYSTEM)
|
||||
if (type == MessageType.SYSTEM) {
|
||||
Messenger.sendSystemMessage(List.of(this), message, ChatType.SYSTEM);
|
||||
else
|
||||
} else {
|
||||
Messenger.sendUnsignedMessage(List.of(this), new MessageSender(Component.text("UNKNOWN SENDER",
|
||||
NamedTextColor.RED), null), message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,8 +13,14 @@ public final class KeyUtils {
|
|||
private static final String RSA_HEADER = "-----BEGIN RSA PUBLIC KEY-----\n";
|
||||
private static final String RSA_FOOTER = "\n-----END RSA PUBLIC KEY-----\n";
|
||||
|
||||
public enum SignatureAlgorithm {SHA256withRSA,SHA1withRSA}
|
||||
public enum KeyAlgorithm {RSA}
|
||||
public enum SignatureAlgorithm {
|
||||
SHA256withRSA,
|
||||
SHA1withRSA
|
||||
}
|
||||
|
||||
public enum KeyAlgorithm {
|
||||
RSA
|
||||
}
|
||||
|
||||
private KeyUtils() {
|
||||
//no instance
|
||||
|
|
Loading…
Reference in New Issue