SteamWar/SpigotCore
Archiviert
13
0

Merge branch 'scoreboard' of SteamWar/SpigotCore into master

Dieser Commit ist enthalten in:
Lixfel 2020-01-11 12:05:59 +01:00 committet von Gitea
Commit 05d530d720
6 geänderte Dateien mit 24 neuen und 54 gelöschten Zeilen

Datei anzeigen

@ -11,12 +11,11 @@ public class SWScoreboard_10 {
ScoreboardCallback callback;
private Scoreboard scoreboard;
private ScoreboardObjective obj;
private int switcher = 0; //switch zwischen 0 und 1
public SWScoreboard_10(ScoreboardCallback callback) {
this.callback = callback;
this.scoreboard = new Scoreboard();
this.obj = this.scoreboard.registerObjective("MainBord" + switcher, IScoreboardCriteria.b);
this.obj = this.scoreboard.registerObjective("MainBord", IScoreboardCriteria.b);
obj.setDisplayName(this.callback.getTitle());
}
@ -34,8 +33,10 @@ public class SWScoreboard_10 {
sendPacket(player, scorePacket);
}
switcher();
display(player);
}
private void display(Player player) {
PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj);
sendPacket(player, displayPacket);
}
@ -49,11 +50,5 @@ public class SWScoreboard_10 {
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
}
private void switcher() {
switcher++;
if(switcher == 1)
switcher = 0;
}
}

Datei anzeigen

@ -11,12 +11,11 @@ public class SWScoreboard_12 {
ScoreboardCallback callback;
private Scoreboard scoreboard;
private ScoreboardObjective obj;
private int switcher = 0; //switch zwischen 0 und 1
public SWScoreboard_12(ScoreboardCallback callback) {
this.callback = callback;
this.scoreboard = new Scoreboard();
this.obj = this.scoreboard.registerObjective("MainBord" + switcher, IScoreboardCriteria.b);
this.obj = this.scoreboard.registerObjective("MainBord", IScoreboardCriteria.b);
obj.setDisplayName(this.callback.getTitle());
}
@ -34,8 +33,10 @@ public class SWScoreboard_12 {
sendPacket(player, scorePacket);
}
switcher();
display(player);
}
private void display(Player player) {
PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj);
sendPacket(player, displayPacket);
}
@ -49,10 +50,4 @@ public class SWScoreboard_12 {
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
}
private void switcher() {
switcher++;
if(switcher == 1)
switcher = 0;
}
}

Datei anzeigen

@ -11,12 +11,11 @@ public class SWScoreboard_14 {
ScoreboardCallback callback;
private Scoreboard scoreboard;
private ScoreboardObjective obj;
private int switcher = 0; //switch zwischen 0 und 1
public SWScoreboard_14(ScoreboardCallback callback) {
this.callback = callback;
this.scoreboard = new Scoreboard();
this.obj = this.scoreboard.registerObjective("MainBord" + switcher, IScoreboardCriteria.DUMMY, new ChatMessage("USELESS"), IScoreboardCriteria.EnumScoreboardHealthDisplay.HEARTS);
this.obj = this.scoreboard.registerObjective("MainBord", IScoreboardCriteria.DUMMY, new ChatMessage("USELESS"), IScoreboardCriteria.EnumScoreboardHealthDisplay.HEARTS);
obj.setDisplayName(new ChatMessage(this.callback.getTitle()));
}
@ -34,8 +33,10 @@ public class SWScoreboard_14 {
sendPacket(player, scorePacket);
}
switcher();
display(player);
}
private void display(Player player) {
PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj);
sendPacket(player, displayPacket);
}
@ -49,10 +50,4 @@ public class SWScoreboard_14 {
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
}
private void switcher() {
switcher++;
if(switcher == 1)
switcher = 0;
}
}

Datei anzeigen

@ -11,12 +11,11 @@ public class SWScoreboard_15 {
ScoreboardCallback callback;
private Scoreboard scoreboard;
private ScoreboardObjective obj;
private int switcher = 0; //switch zwischen 0 und 1
public SWScoreboard_15(ScoreboardCallback callback) {
this.callback = callback;
this.scoreboard = new Scoreboard();
this.obj = this.scoreboard.registerObjective("MainBord" + switcher, IScoreboardCriteria.DUMMY, new ChatMessage("USELESS"), IScoreboardCriteria.EnumScoreboardHealthDisplay.HEARTS);
this.obj = this.scoreboard.registerObjective("MainBord", IScoreboardCriteria.DUMMY, new ChatMessage("USELESS"), IScoreboardCriteria.EnumScoreboardHealthDisplay.HEARTS);
obj.setDisplayName(new ChatMessage(this.callback.getTitle()));
}
@ -34,8 +33,10 @@ public class SWScoreboard_15 {
sendPacket(player, scorePacket);
}
switcher();
display(player);
}
private void display(Player player) {
PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj);
sendPacket(player, displayPacket);
}
@ -49,10 +50,4 @@ public class SWScoreboard_15 {
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
}
private void switcher() {
switcher++;
if(switcher == 1)
switcher = 0;
}
}

Datei anzeigen

@ -11,12 +11,11 @@ public class SWScoreboard_8 {
ScoreboardCallback callback;
private Scoreboard scoreboard;
private ScoreboardObjective obj;
private int switcher = 0; //switch zwischen 0 und 1
public SWScoreboard_8(ScoreboardCallback callback) {
this.callback = callback;
this.scoreboard = new Scoreboard();
this.obj = this.scoreboard.registerObjective("MainBord" + switcher, IScoreboardCriteria.b);
this.obj = this.scoreboard.registerObjective("MainBord", IScoreboardCriteria.b);
obj.setDisplayName(this.callback.getTitle());
}
@ -34,8 +33,10 @@ public class SWScoreboard_8 {
sendPacket(player, scorePacket);
}
switcher();
display(player);
}
private void display(Player player) {
PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj);
sendPacket(player, displayPacket);
}
@ -49,10 +50,4 @@ public class SWScoreboard_8 {
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
}
private void switcher() {
switcher++;
if(switcher == 1)
switcher = 0;
}
}

Datei anzeigen

@ -11,12 +11,11 @@ public class SWScoreboard_9 {
ScoreboardCallback callback;
private Scoreboard scoreboard;
private ScoreboardObjective obj;
private int switcher = 0; //switch zwischen 0 und 1
public SWScoreboard_9(ScoreboardCallback callback) {
this.callback = callback;
this.scoreboard = new Scoreboard();
this.obj = this.scoreboard.registerObjective("MainBord" + switcher, IScoreboardCriteria.b);
this.obj = this.scoreboard.registerObjective("MainBord", IScoreboardCriteria.b);
obj.setDisplayName(this.callback.getTitle());
}
@ -34,8 +33,10 @@ public class SWScoreboard_9 {
sendPacket(player, scorePacket);
}
switcher();
display(player);
}
private void display(Player player) {
PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj);
sendPacket(player, displayPacket);
}
@ -49,10 +50,4 @@ public class SWScoreboard_9 {
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
}
private void switcher() {
switcher++;
if(switcher == 1)
switcher = 0;
}
}