hotfix
Dieser Commit ist enthalten in:
Ursprung
5705e1d87d
Commit
1c748cc5b9
@ -21,8 +21,8 @@ public class SWScoreboard_10 {
|
||||
}
|
||||
|
||||
public void sendScoreboard(Player player) {
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(obj, 1);
|
||||
PacketPlayOutScoreboardObjective createpacket = new PacketPlayOutScoreboardObjective(obj, 0);
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(this.obj, 1);
|
||||
PacketPlayOutScoreboardObjective createpacket = new PacketPlayOutScoreboardObjective(this.obj, 0);
|
||||
|
||||
sendPacket(player, removePacket);
|
||||
sendPacket(player, createpacket);
|
||||
@ -40,6 +40,11 @@ public class SWScoreboard_10 {
|
||||
sendPacket(player, displayPacket);
|
||||
}
|
||||
|
||||
public void deleteScoreboard(Player player) {
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(this.obj, 1);
|
||||
sendPacket(player, removePacket);
|
||||
}
|
||||
|
||||
private void sendPacket(Player p, Packet<?> packet) {
|
||||
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
@ -21,8 +21,8 @@ public class SWScoreboard_12 {
|
||||
}
|
||||
|
||||
public void sendScoreboard(Player player) {
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(obj, 1);
|
||||
PacketPlayOutScoreboardObjective createpacket = new PacketPlayOutScoreboardObjective(obj, 0);
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(this.obj, 1);
|
||||
PacketPlayOutScoreboardObjective createpacket = new PacketPlayOutScoreboardObjective(this.obj, 0);
|
||||
|
||||
sendPacket(player, removePacket);
|
||||
sendPacket(player, createpacket);
|
||||
@ -40,6 +40,11 @@ public class SWScoreboard_12 {
|
||||
sendPacket(player, displayPacket);
|
||||
}
|
||||
|
||||
public void deleteScoreboard(Player player) {
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(this.obj, 1);
|
||||
sendPacket(player, removePacket);
|
||||
}
|
||||
|
||||
private void sendPacket(Player p, Packet<?> packet) {
|
||||
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
@ -21,8 +21,8 @@ public class SWScoreboard_14 {
|
||||
}
|
||||
|
||||
public void sendScoreboard(Player player) {
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(obj, 1);
|
||||
PacketPlayOutScoreboardObjective createpacket = new PacketPlayOutScoreboardObjective(obj, 0);
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(this.obj, 1);
|
||||
PacketPlayOutScoreboardObjective createpacket = new PacketPlayOutScoreboardObjective(this.obj, 0);
|
||||
|
||||
sendPacket(player, removePacket);
|
||||
sendPacket(player, createpacket);
|
||||
@ -40,6 +40,11 @@ public class SWScoreboard_14 {
|
||||
sendPacket(player, displayPacket);
|
||||
}
|
||||
|
||||
public void deleteScoreboard(Player player) {
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(this.obj, 1);
|
||||
sendPacket(player, removePacket);
|
||||
}
|
||||
|
||||
private void sendPacket(Player p, Packet<?> packet) {
|
||||
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
@ -40,6 +40,11 @@ public class SWScoreboard_15 {
|
||||
sendPacket(player, displayPacket);
|
||||
}
|
||||
|
||||
public void deleteScoreboard(Player player) {
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(this.obj, 1);
|
||||
sendPacket(player, removePacket);
|
||||
}
|
||||
|
||||
private void sendPacket(Player p, Packet<?> packet) {
|
||||
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
@ -21,8 +21,8 @@ public class SWScoreboard_8 {
|
||||
}
|
||||
|
||||
public void sendScoreboard(Player player) {
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(obj, 1);
|
||||
PacketPlayOutScoreboardObjective createpacket = new PacketPlayOutScoreboardObjective(obj, 0);
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(this.obj, 1);
|
||||
PacketPlayOutScoreboardObjective createpacket = new PacketPlayOutScoreboardObjective(this.obj, 0);
|
||||
|
||||
sendPacket(player, removePacket);
|
||||
sendPacket(player, createpacket);
|
||||
@ -40,6 +40,11 @@ public class SWScoreboard_8 {
|
||||
sendPacket(player, displayPacket);
|
||||
}
|
||||
|
||||
public void deleteScoreboard(Player player) {
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(this.obj, 1);
|
||||
sendPacket(player, removePacket);
|
||||
}
|
||||
|
||||
private void sendPacket(Player p, Packet<?> packet) {
|
||||
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
@ -21,8 +21,8 @@ public class SWScoreboard_9 {
|
||||
}
|
||||
|
||||
public void sendScoreboard(Player player) {
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(obj, 1);
|
||||
PacketPlayOutScoreboardObjective createpacket = new PacketPlayOutScoreboardObjective(obj, 0);
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(this.obj, 1);
|
||||
PacketPlayOutScoreboardObjective createpacket = new PacketPlayOutScoreboardObjective(this.obj, 0);
|
||||
|
||||
sendPacket(player, removePacket);
|
||||
sendPacket(player, createpacket);
|
||||
@ -40,6 +40,11 @@ public class SWScoreboard_9 {
|
||||
sendPacket(player, displayPacket);
|
||||
}
|
||||
|
||||
public void deleteScoreboard(Player player) {
|
||||
PacketPlayOutScoreboardObjective removePacket = new PacketPlayOutScoreboardObjective(this.obj, 1);
|
||||
sendPacket(player, removePacket);
|
||||
}
|
||||
|
||||
private void sendPacket(Player p, Packet<?> packet) {
|
||||
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
@ -41,9 +41,34 @@ public class SWScoreboard {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void removeScoreboard(Player player) {
|
||||
if(playerBoards.containsKey(player))
|
||||
public boolean removeScoreboard(Player player) {
|
||||
if(playerBoards.containsKey(player)) {
|
||||
switch (Core.getVersion()) {
|
||||
case 8:
|
||||
((SWScoreboard_8) playerBoards.get(player)).deleteScoreboard(player);
|
||||
break;
|
||||
case 9:
|
||||
((SWScoreboard_9) playerBoards.get(player)).deleteScoreboard(player);
|
||||
break;
|
||||
case 10:
|
||||
((SWScoreboard_10) playerBoards.get(player)).deleteScoreboard(player);
|
||||
break;
|
||||
case 12:
|
||||
((SWScoreboard_12) playerBoards.get(player)).deleteScoreboard(player);
|
||||
break;
|
||||
case 14:
|
||||
((SWScoreboard_14) playerBoards.get(player)).deleteScoreboard(player);
|
||||
break;
|
||||
case 15:
|
||||
((SWScoreboard_15) playerBoards.get(player)).deleteScoreboard(player);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
playerBoards.remove(player);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//Scoreboard Updater
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren