From 13d6ebbe67d137b1833bb005450e379cd4ff34af Mon Sep 17 00:00:00 2001 From: Yaruma3341 Date: Sat, 11 Jan 2020 11:42:35 +0100 Subject: [PATCH] hotfix --- .../src/de/steamwar/scoreboard/SWScoreboard_10.java | 13 ++++--------- .../src/de/steamwar/scoreboard/SWScoreboard_12.java | 13 ++++--------- .../src/de/steamwar/scoreboard/SWScoreboard_14.java | 13 ++++--------- .../src/de/steamwar/scoreboard/SWScoreboard_15.java | 13 ++++--------- .../src/de/steamwar/scoreboard/SWScoreboard_8.java | 13 ++++--------- .../src/de/steamwar/scoreboard/SWScoreboard_9.java | 13 ++++--------- 6 files changed, 24 insertions(+), 54 deletions(-) diff --git a/SpigotCore_10/src/de/steamwar/scoreboard/SWScoreboard_10.java b/SpigotCore_10/src/de/steamwar/scoreboard/SWScoreboard_10.java index bf070b4..cb37c31 100644 --- a/SpigotCore_10/src/de/steamwar/scoreboard/SWScoreboard_10.java +++ b/SpigotCore_10/src/de/steamwar/scoreboard/SWScoreboard_10.java @@ -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; - } - } diff --git a/SpigotCore_12/src/de/steamwar/scoreboard/SWScoreboard_12.java b/SpigotCore_12/src/de/steamwar/scoreboard/SWScoreboard_12.java index 943a283..d8af5e2 100644 --- a/SpigotCore_12/src/de/steamwar/scoreboard/SWScoreboard_12.java +++ b/SpigotCore_12/src/de/steamwar/scoreboard/SWScoreboard_12.java @@ -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; - } - } diff --git a/SpigotCore_14/src/de/steamwar/scoreboard/SWScoreboard_14.java b/SpigotCore_14/src/de/steamwar/scoreboard/SWScoreboard_14.java index e0ff69d..7054a1c 100644 --- a/SpigotCore_14/src/de/steamwar/scoreboard/SWScoreboard_14.java +++ b/SpigotCore_14/src/de/steamwar/scoreboard/SWScoreboard_14.java @@ -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; - } - } diff --git a/SpigotCore_15/src/de/steamwar/scoreboard/SWScoreboard_15.java b/SpigotCore_15/src/de/steamwar/scoreboard/SWScoreboard_15.java index a761db7..f752367 100644 --- a/SpigotCore_15/src/de/steamwar/scoreboard/SWScoreboard_15.java +++ b/SpigotCore_15/src/de/steamwar/scoreboard/SWScoreboard_15.java @@ -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; - } - } diff --git a/SpigotCore_8/src/de/steamwar/scoreboard/SWScoreboard_8.java b/SpigotCore_8/src/de/steamwar/scoreboard/SWScoreboard_8.java index 0e9fd71..672aacf 100644 --- a/SpigotCore_8/src/de/steamwar/scoreboard/SWScoreboard_8.java +++ b/SpigotCore_8/src/de/steamwar/scoreboard/SWScoreboard_8.java @@ -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; - } - } diff --git a/SpigotCore_9/src/de/steamwar/scoreboard/SWScoreboard_9.java b/SpigotCore_9/src/de/steamwar/scoreboard/SWScoreboard_9.java index f53ccdd..41a713e 100644 --- a/SpigotCore_9/src/de/steamwar/scoreboard/SWScoreboard_9.java +++ b/SpigotCore_9/src/de/steamwar/scoreboard/SWScoreboard_9.java @@ -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; - } - } -- 2.39.2