untested rework of dependent scoreboard source
Dieser Commit ist enthalten in:
Ursprung
28c84fa5e2
Commit
7453f0d39b
@ -1,25 +1,23 @@
|
|||||||
package de.steamwar.scoreboard;
|
package de.steamwar.scoreboard;
|
||||||
|
|
||||||
import com.comphenix.protocol.events.PacketContainer;
|
|
||||||
|
|
||||||
public class SWScoreboard_12 {
|
public class SWScoreboard_12 {
|
||||||
|
|
||||||
private SWScoreboard_12() {}
|
private SWScoreboard_12() {}
|
||||||
|
|
||||||
static PacketContainer getRemovePacket() {
|
static void sendRemovePacket() {
|
||||||
return SWScoreboard_8.getRemovePacket();
|
SWScoreboard_8.sendRemovePacket();
|
||||||
}
|
}
|
||||||
|
|
||||||
static PacketContainer getCreatePacket(String title) {
|
static void sendCreatePacket(String title) {
|
||||||
return SWScoreboard_8.getCreatePacket(title);
|
SWScoreboard_8.sendCreatePacket(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PacketContainer getUpdatePacket(String content, Integer line) {
|
static void sendUpdatePacket(String content, Integer line) {
|
||||||
return SWScoreboard_8.getUpdatePacket(content, line);
|
SWScoreboard_8.sendUpdatePacket(content, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PacketContainer getDisplayPacket(String title) {
|
static void sendDisplayPacket() {
|
||||||
return SWScoreboard_8.getDisplayPacket(title);
|
SWScoreboard_8.sendDisplayPacket();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,36 +8,33 @@ public class SWScoreboard_8 {
|
|||||||
|
|
||||||
private SWScoreboard_8() {}
|
private SWScoreboard_8() {}
|
||||||
|
|
||||||
static PacketContainer getRemovePacket() {
|
static void sendRemovePacket() {
|
||||||
PacketContainer remove = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.SCOREBOARD_OBJECTIVE);
|
PacketContainer removePacket = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.SCOREBOARD_OBJECTIVE);
|
||||||
remove.getStrings().write(0, "AAA");
|
removePacket.getStrings().write(0, "AAA");
|
||||||
remove.getBytes().write(0, (byte) 1);
|
removePacket.getIntegers().write(0, 1);
|
||||||
return remove;
|
//TODO kann vlt entfernt werden -> remove.getStrings().write(1, "integer");
|
||||||
}
|
}
|
||||||
|
|
||||||
static PacketContainer getCreatePacket(String title) {
|
static void sendCreatePacket(String title) {
|
||||||
PacketContainer createpacket = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.SCOREBOARD_OBJECTIVE);
|
PacketContainer createPacket = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.SCOREBOARD_OBJECTIVE);
|
||||||
createpacket.getStrings().write(0, "AAA");
|
createPacket.getStrings().write(0, "AAA");
|
||||||
createpacket.getBytes().write(0, (byte) 0);
|
createPacket.getIntegers().write(0, 0);
|
||||||
createpacket.getStrings().write(1, title);
|
createPacket.getStrings().write(1, title);
|
||||||
createpacket.getStrings().write(2, "integer");
|
createPacket.getStrings().write(2, "integer");
|
||||||
return createpacket;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static PacketContainer getUpdatePacket(String content, Integer line) {
|
static void sendUpdatePacket(String content, Integer line) {
|
||||||
PacketContainer update = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.SCOREBOARD_SCORE);
|
PacketContainer updatePacket = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.SCOREBOARD_SCORE);
|
||||||
update.getStrings().write(0, content);
|
updatePacket.getStrings().write(0, content);
|
||||||
update.getBytes().write(0, (byte) 0);
|
updatePacket.getStrings().write(1, "AAA");
|
||||||
update.getStrings().write(1, "AAA");
|
updatePacket.getIntegers().write(0, line);
|
||||||
update.getIntegers().write(0, line);
|
updatePacket.getBytes().write(0, (byte) 0);
|
||||||
return update;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static PacketContainer getDisplayPacket(String title) {
|
static void sendDisplayPacket() {
|
||||||
PacketContainer display = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.SCOREBOARD_DISPLAY_OBJECTIVE);
|
PacketContainer displayPacket = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.SCOREBOARD_DISPLAY_OBJECTIVE);
|
||||||
display.getBytes().write(0, (byte) 1);
|
displayPacket.getIntegers().write(0, 1);
|
||||||
display.getStrings().write(0, title);
|
displayPacket.getStrings().write(0, "AAA");
|
||||||
return display;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren