Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-06 00:00:47 +01:00
Make this permissive enough for FeatherBoard
Dieser Commit ist enthalten in:
Ursprung
2d4d9e42b5
Commit
9b59587e58
@ -225,8 +225,6 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void handleServerScoreboardPacket(MinecraftPacket packet) {
|
public void handleServerScoreboardPacket(MinecraftPacket packet) {
|
||||||
logger.info("Server scoreboard packet: {}", packet);
|
|
||||||
|
|
||||||
if (packet instanceof ScoreboardDisplay) {
|
if (packet instanceof ScoreboardDisplay) {
|
||||||
ScoreboardDisplay sd = (ScoreboardDisplay) packet;
|
ScoreboardDisplay sd = (ScoreboardDisplay) packet;
|
||||||
serverScoreboard.setPosition(sd.getPosition());
|
serverScoreboard.setPosition(sd.getPosition());
|
||||||
@ -278,7 +276,6 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void clearServerScoreboard() {
|
private void clearServerScoreboard() {
|
||||||
logger.info("Scoreboard prior to cleaning: {}", serverScoreboard);
|
|
||||||
for (Objective objective : serverScoreboard.getObjectives().values()) {
|
for (Objective objective : serverScoreboard.getObjectives().values()) {
|
||||||
for (Score score : objective.getScores().values()) {
|
for (Score score : objective.getScores().values()) {
|
||||||
ScoreboardSetScore sss = new ScoreboardSetScore();
|
ScoreboardSetScore sss = new ScoreboardSetScore();
|
||||||
|
@ -58,8 +58,8 @@ public class ScoreboardObjective implements MinecraftPacket {
|
|||||||
this.id = ProtocolUtils.readString(buf, 16);
|
this.id = ProtocolUtils.readString(buf, 16);
|
||||||
this.mode = buf.readByte();
|
this.mode = buf.readByte();
|
||||||
if (this.mode != 1) {
|
if (this.mode != 1) {
|
||||||
this.displayName = ProtocolUtils.readString(buf, 32);
|
this.displayName = ProtocolUtils.readString(buf);
|
||||||
this.type = ProtocolUtils.readString(buf, 16);
|
this.type = ProtocolUtils.readString(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,9 +125,9 @@ public class ScoreboardTeam implements MinecraftPacket {
|
|||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 0: // create
|
case 0: // create
|
||||||
case 2: // update
|
case 2: // update
|
||||||
this.displayName = ProtocolUtils.readString(buf, 32);
|
this.displayName = ProtocolUtils.readString(buf);
|
||||||
this.prefix = ProtocolUtils.readString(buf, 16);
|
this.prefix = ProtocolUtils.readString(buf);
|
||||||
this.suffix = ProtocolUtils.readString(buf, 16);
|
this.suffix = ProtocolUtils.readString(buf);
|
||||||
this.flags = buf.readByte();
|
this.flags = buf.readByte();
|
||||||
this.nameTagVisibility = ProtocolUtils.readString(buf, 32);
|
this.nameTagVisibility = ProtocolUtils.readString(buf, 32);
|
||||||
this.collisionRule = ProtocolUtils.readString(buf, 32);
|
this.collisionRule = ProtocolUtils.readString(buf, 32);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren