-
-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #824 from GeyserMC/feature/1.21
1.21
- Loading branch information
Showing
31 changed files
with
419 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/ServerLink.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.geysermc.mcprotocollib.protocol.data.game; | ||
|
||
import net.kyori.adventure.text.Component; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public record ServerLink(@Nullable ServerLinkType knownType, @Nullable Component unknownType, String link) { | ||
} |
20 changes: 20 additions & 0 deletions
20
protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/ServerLinkType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.geysermc.mcprotocollib.protocol.data.game; | ||
|
||
public enum ServerLinkType { | ||
BUG_REPORT, | ||
COMMUNITY_GUIDELINES, | ||
SUPPORT, | ||
STATUS, | ||
FEEDBACK, | ||
COMMUNITY, | ||
WEBSITE, | ||
FORUMS, | ||
NEWS, | ||
ANNOUNCEMENTS; | ||
|
||
private static final ServerLinkType[] VALUES = values(); | ||
|
||
public static ServerLinkType from(int id) { | ||
return VALUES[id]; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chat/ChatType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.geysermc.mcprotocollib.protocol.data.game.chat; | ||
|
||
import org.cloudburstmc.nbt.NbtMap; | ||
|
||
import java.util.List; | ||
|
||
public record ChatType(ChatTypeDecoration chat, ChatTypeDecoration narration) { | ||
public record ChatTypeDecorationImpl(String translationKey, | ||
List<ChatTypeDecoration.Parameter> parameters, | ||
NbtMap style) implements ChatTypeDecoration { | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
.../src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chat/ChatTypeDecoration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.geysermc.mcprotocollib.protocol.data.game.chat; | ||
|
||
import org.cloudburstmc.nbt.NbtMap; | ||
|
||
import java.util.List; | ||
|
||
// Here for implementation if one wants to cache the Style tag while we don't have DFU Codecs. | ||
public interface ChatTypeDecoration { | ||
String translationKey(); | ||
|
||
List<Parameter> parameters(); | ||
|
||
NbtMap style(); | ||
|
||
enum Parameter { | ||
CONTENT, | ||
SENDER, | ||
TARGET; | ||
|
||
public static final Parameter[] VALUES = values(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.