SteamWar/SpigotCore
Archiviert
13
0
Dieser Commit ist enthalten in:
Yaruma3341 2020-01-11 11:42:35 +01:00
Ursprung e485927a4b
Commit 13d6ebbe67
6 geänderte Dateien mit 24 neuen und 54 gelöschten Zeilen

Datei anzeigen

@ -11,12 +11,11 @@ public class SWScoreboard_10 {
ScoreboardCallback callback; ScoreboardCallback callback;
private Scoreboard scoreboard; private Scoreboard scoreboard;
private ScoreboardObjective obj; private ScoreboardObjective obj;
private int switcher = 0; //switch zwischen 0 und 1
public SWScoreboard_10(ScoreboardCallback callback) { public SWScoreboard_10(ScoreboardCallback callback) {
this.callback = callback; this.callback = callback;
this.scoreboard = new Scoreboard(); 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()); obj.setDisplayName(this.callback.getTitle());
} }
@ -34,8 +33,10 @@ public class SWScoreboard_10 {
sendPacket(player, scorePacket); sendPacket(player, scorePacket);
} }
switcher(); display(player);
}
private void display(Player player) {
PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj); PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj);
sendPacket(player, displayPacket); sendPacket(player, displayPacket);
} }
@ -49,11 +50,5 @@ public class SWScoreboard_10 {
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet); ((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; ScoreboardCallback callback;
private Scoreboard scoreboard; private Scoreboard scoreboard;
private ScoreboardObjective obj; private ScoreboardObjective obj;
private int switcher = 0; //switch zwischen 0 und 1
public SWScoreboard_12(ScoreboardCallback callback) { public SWScoreboard_12(ScoreboardCallback callback) {
this.callback = callback; this.callback = callback;
this.scoreboard = new Scoreboard(); 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()); obj.setDisplayName(this.callback.getTitle());
} }
@ -34,8 +33,10 @@ public class SWScoreboard_12 {
sendPacket(player, scorePacket); sendPacket(player, scorePacket);
} }
switcher(); display(player);
}
private void display(Player player) {
PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj); PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj);
sendPacket(player, displayPacket); sendPacket(player, displayPacket);
} }
@ -49,10 +50,4 @@ public class SWScoreboard_12 {
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet); ((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; ScoreboardCallback callback;
private Scoreboard scoreboard; private Scoreboard scoreboard;
private ScoreboardObjective obj; private ScoreboardObjective obj;
private int switcher = 0; //switch zwischen 0 und 1
public SWScoreboard_14(ScoreboardCallback callback) { public SWScoreboard_14(ScoreboardCallback callback) {
this.callback = callback; this.callback = callback;
this.scoreboard = new Scoreboard(); 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())); obj.setDisplayName(new ChatMessage(this.callback.getTitle()));
} }
@ -34,8 +33,10 @@ public class SWScoreboard_14 {
sendPacket(player, scorePacket); sendPacket(player, scorePacket);
} }
switcher(); display(player);
}
private void display(Player player) {
PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj); PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj);
sendPacket(player, displayPacket); sendPacket(player, displayPacket);
} }
@ -49,10 +50,4 @@ public class SWScoreboard_14 {
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet); ((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; ScoreboardCallback callback;
private Scoreboard scoreboard; private Scoreboard scoreboard;
private ScoreboardObjective obj; private ScoreboardObjective obj;
private int switcher = 0; //switch zwischen 0 und 1
public SWScoreboard_15(ScoreboardCallback callback) { public SWScoreboard_15(ScoreboardCallback callback) {
this.callback = callback; this.callback = callback;
this.scoreboard = new Scoreboard(); 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())); obj.setDisplayName(new ChatMessage(this.callback.getTitle()));
} }
@ -34,8 +33,10 @@ public class SWScoreboard_15 {
sendPacket(player, scorePacket); sendPacket(player, scorePacket);
} }
switcher(); display(player);
}
private void display(Player player) {
PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj); PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj);
sendPacket(player, displayPacket); sendPacket(player, displayPacket);
} }
@ -49,10 +50,4 @@ public class SWScoreboard_15 {
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet); ((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; ScoreboardCallback callback;
private Scoreboard scoreboard; private Scoreboard scoreboard;
private ScoreboardObjective obj; private ScoreboardObjective obj;
private int switcher = 0; //switch zwischen 0 und 1
public SWScoreboard_8(ScoreboardCallback callback) { public SWScoreboard_8(ScoreboardCallback callback) {
this.callback = callback; this.callback = callback;
this.scoreboard = new Scoreboard(); 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()); obj.setDisplayName(this.callback.getTitle());
} }
@ -34,8 +33,10 @@ public class SWScoreboard_8 {
sendPacket(player, scorePacket); sendPacket(player, scorePacket);
} }
switcher(); display(player);
}
private void display(Player player) {
PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj); PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj);
sendPacket(player, displayPacket); sendPacket(player, displayPacket);
} }
@ -49,10 +50,4 @@ public class SWScoreboard_8 {
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet); ((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; ScoreboardCallback callback;
private Scoreboard scoreboard; private Scoreboard scoreboard;
private ScoreboardObjective obj; private ScoreboardObjective obj;
private int switcher = 0; //switch zwischen 0 und 1
public SWScoreboard_9(ScoreboardCallback callback) { public SWScoreboard_9(ScoreboardCallback callback) {
this.callback = callback; this.callback = callback;
this.scoreboard = new Scoreboard(); 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()); obj.setDisplayName(this.callback.getTitle());
} }
@ -34,8 +33,10 @@ public class SWScoreboard_9 {
sendPacket(player, scorePacket); sendPacket(player, scorePacket);
} }
switcher(); display(player);
}
private void display(Player player) {
PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj); PacketPlayOutScoreboardDisplayObjective displayPacket = new PacketPlayOutScoreboardDisplayObjective(1, this.obj);
sendPacket(player, displayPacket); sendPacket(player, displayPacket);
} }
@ -49,10 +50,4 @@ public class SWScoreboard_9 {
((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet); ((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
} }
private void switcher() {
switcher++;
if(switcher == 1)
switcher = 0;
}
} }