No longer use OfflinePlayer for scoreboards!
This commit is contained in:
parent
83875fa8d3
commit
986fab6e38
2
pom.xml
2
pom.xml
@ -38,7 +38,7 @@
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.7.9-R0.1-SNAPSHOT</version>
|
||||
<version>1.7.9-R0.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- CraftBukkit Dependency for experimental features
|
||||
|
@ -4,7 +4,6 @@ import nl.Steffion.BlockHunt.Arena.ArenaState;
|
||||
import nl.Steffion.BlockHunt.Managers.MessageM;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scoreboard.DisplaySlot;
|
||||
import org.bukkit.scoreboard.Objective;
|
||||
@ -26,15 +25,15 @@ public class ScoreboardHandler {
|
||||
object.setDisplayName(BlockHunt.cutString(MessageM.replaceAll((String) W.config.get(ConfigC.scoreboard_title)), 32));
|
||||
|
||||
String temp = BlockHunt.cutString(MessageM.replaceAll((String) W.config.get(ConfigC.scoreboard_timeleft)), 32);
|
||||
Score timeleft = object.getScore(Bukkit.getOfflinePlayer(ChatColor.RESET + temp));
|
||||
Score timeleft = object.getScore(temp);
|
||||
timeleft.setScore(arena.timer);
|
||||
|
||||
temp = BlockHunt.cutString(MessageM.replaceAll((String) W.config.get(ConfigC.scoreboard_seekers)), 32);
|
||||
Score seekers = object.getScore(Bukkit.getOfflinePlayer(ChatColor.RESET + temp));
|
||||
Score seekers = object.getScore(temp);
|
||||
seekers.setScore(arena.seekers.size());
|
||||
|
||||
temp = BlockHunt.cutString(MessageM.replaceAll((String) W.config.get(ConfigC.scoreboard_hiders)), 32);
|
||||
Score hiders = object.getScore(Bukkit.getOfflinePlayer(ChatColor.RESET + temp));
|
||||
Score hiders = object.getScore(temp);
|
||||
hiders.setScore(arena.playersInArena.size() - arena.seekers.size());
|
||||
|
||||
if (arena.gameState == ArenaState.INGAME) {
|
||||
@ -56,15 +55,15 @@ public class ScoreboardHandler {
|
||||
object.setDisplayName(BlockHunt.cutString(MessageM.replaceAll((String) W.config.get(ConfigC.scoreboard_title)), 32));
|
||||
|
||||
String temp = BlockHunt.cutString(MessageM.replaceAll((String) W.config.get(ConfigC.scoreboard_timeleft)), 32);
|
||||
Score timeleft = object.getScore(Bukkit.getOfflinePlayer(ChatColor.RESET + temp));
|
||||
Score timeleft = object.getScore(temp);
|
||||
timeleft.setScore(arena.timer);
|
||||
|
||||
temp = BlockHunt.cutString(MessageM.replaceAll((String) W.config.get(ConfigC.scoreboard_seekers)), 32);
|
||||
Score seekers = object.getScore(Bukkit.getOfflinePlayer(ChatColor.RESET + temp));
|
||||
Score seekers = object.getScore(temp);
|
||||
seekers.setScore(arena.seekers.size());
|
||||
|
||||
temp = BlockHunt.cutString(MessageM.replaceAll((String) W.config.get(ConfigC.scoreboard_hiders)), 32);
|
||||
Score hiders = object.getScore(Bukkit.getOfflinePlayer(ChatColor.RESET + temp));
|
||||
Score hiders = object.getScore(temp);
|
||||
hiders.setScore(arena.playersInArena.size() - arena.seekers.size());
|
||||
|
||||
if (arena.gameState == ArenaState.INGAME) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user