Fixed scoreboard issues.

This commit is contained in:
Jonathan Williams 2014-04-25 17:52:04 -07:00
parent a37ace7576
commit ac1c081bc8
24 changed files with 82 additions and 86 deletions

Binary file not shown.

View File

@ -1475,7 +1475,7 @@ public abstract class Entity {
this.vehicle = null;
} else {
// CraftBukkit start
if ((this.bukkitEntity instanceof LivingEntity) && entity.world.isChunkLoaded((int) entity.locX >> 4, (int) entity.locZ >> 4)) {
if ((this.bukkitEntity instanceof LivingEntity) && entity.getBukkitEntity() instanceof Vehicle && entity.world.isChunkLoaded((int) entity.locX >> 4, (int) entity.locZ >> 4)) {
// It's possible to move from one vehicle to another. We need to check if they're already in a vehicle, and fire an exit event if they are.
VehicleExitEvent exitEvent = null;
if (this.vehicle != null && this.vehicle.getBukkitEntity() instanceof Vehicle) {

View File

@ -604,7 +604,7 @@ public abstract class Game implements Listener
public boolean SetPlayerState(Player player, PlayerState state)
{
GetScoreboard().resetScores(player);
GetScoreboard().resetScores(player.getName());
GameTeam team = GetTeam(player);
@ -790,7 +790,7 @@ public abstract class Game implements Listener
if (name.length() > 16)
name = name.substring(0, 16);
Score score = GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(name));
Score score = GetObjectiveSide().getScore(name);
score.setScore(team.GetPlayers(true).size());
}
}

View File

@ -97,8 +97,8 @@ public abstract class SoloGame extends Game
GameTeam team = GetTeamList().get(0);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(team.GetColor() + "Alive")).setScore(team.GetPlayers(true).size());
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(C.cRed + "Dead")).setScore(team.GetPlayers(false).size() - team.GetPlayers(true).size());
GetObjectiveSide().getScore(team.GetColor() + "Alive").setScore(team.GetPlayers(true).size());
GetObjectiveSide().getScore(C.cRed + "Dead").setScore(team.GetPlayers(false).size() - team.GetPlayers(true).size());
}
public ArrayList<Player> GetPlaces()

View File

@ -1058,7 +1058,7 @@ public class Bridge extends TeamGame implements OreObsfucation
//Wipe Last
for (String string : _lastScoreboard)
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
_lastScoreboard.clear();
//Display Players Alive
@ -1071,7 +1071,7 @@ public class Bridge extends TeamGame implements OreObsfucation
out = out.substring(0, 16);
_lastScoreboard.add(out);
Score score = GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out));
Score score = GetObjectiveSide().getScore(out);
score.setScore(team.GetPlayers(true).size());
}
}
@ -1092,7 +1092,7 @@ public class Bridge extends TeamGame implements OreObsfucation
if (kills == 0)
kills = -1;
Score score = GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out));
Score score = GetObjectiveSide().getScore(out);
score.setScore(kills);
}
}

View File

@ -354,7 +354,7 @@ public class CastleSiege extends TeamGame
//King
if (_king != null && _king.isValid())
{
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(C.cYellow + C.Bold + "Kings Health")).setScore(_kingHealth);
GetObjectiveSide().getScore(C.cYellow + C.Bold + "Kings Health").setScore(_kingHealth);
}
//Teams
@ -390,7 +390,7 @@ public class CastleSiege extends TeamGame
for (String group : _scoreGroup.keySet())
{
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(group)).setScore(_scoreGroup.get(group));
GetObjectiveSide().getScore(group).setScore(_scoreGroup.get(group));
}
}

View File

@ -3,7 +3,6 @@ package nautilus.game.arcade.game.games.champions;
import java.util.ArrayList;
import java.util.HashMap;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.EntityShootBowEvent;
@ -13,7 +12,6 @@ import org.bukkit.scoreboard.Objective;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.combat.DeathMessageType;
@ -136,7 +134,7 @@ public class ChampionsTDM extends TeamGame
{
//Wipe Last
for (String string : _lastScoreboard)
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
_lastScoreboard.clear();
int pos = 1;
@ -162,10 +160,10 @@ public class ChampionsTDM extends TeamGame
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(pos++);
GetObjectiveSide().getScore(out).setScore(pos++);
}
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(space)).setScore(pos++);
GetObjectiveSide().getScore(space).setScore(pos++);
space += " ";
}
@ -203,7 +201,7 @@ public class ChampionsTDM extends TeamGame
public void DisplayHealth(UpdateEvent event)
{
for (Player player : GetPlayers(true))
_healthObj.getScore(player).setScore((int)player.getHealth());
_healthObj.getScore(player.getName()).setScore((int)player.getHealth());
}
@EventHandler

View File

@ -499,7 +499,7 @@ public class Christmas extends SoloGame
//Wipe Last
for (String string : _lastScoreboard)
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
_lastScoreboard.clear();
int index = 15;
@ -509,76 +509,76 @@ public class Christmas extends SoloGame
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
out = C.cWhite + "Challenge:";
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
out = C.cYellow + (5 - _parts.size()) + " of " + 5;
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
//Presents
out = " ";
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
out = C.cWhite + "Presents:";
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
out = C.cYellow + GetSleigh().GetPresents().size() + " of " + 10;
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
//Players
out = " ";
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
out = C.cWhite + "Players:";
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
out = C.cYellow + GetPlayers(true).size();
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
//Time
out = " ";
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
out = C.cWhite + "Time Left:";
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
out = C.cYellow + UtilTime.MakeStr(_gameTime - (System.currentTimeMillis() - GetStateTime()));
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
}
@Override

View File

@ -221,21 +221,21 @@ public class Domination extends TeamGame
//Wipe Last
for (String string : _lastScoreboard)
{
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
}
_lastScoreboard.clear();
//Scores
String redScore = _redScore + C.cRed + C.Bold + " Red";
_lastScoreboard.add(redScore);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(redScore)).setScore(8);
GetObjectiveSide().getScore(redScore).setScore(8);
String blueScore = _blueScore + C.cAqua + C.Bold + " Blue";
_lastScoreboard.add(blueScore);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(blueScore)).setScore(7);
GetObjectiveSide().getScore(blueScore).setScore(7);
_lastScoreboard.add(" ");
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(" ")).setScore(6);
GetObjectiveSide().getScore(" ").setScore(6);
//Write New
for (int i=0 ; i<_points.size() ; i++)
@ -248,7 +248,7 @@ public class Domination extends TeamGame
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(5 - i);
GetObjectiveSide().getScore(out).setScore(5 - i);
}
}

View File

@ -293,8 +293,8 @@ public class DeathTag extends SoloGame
if (_runners == null || _chasers == null)
return;
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(_runners.GetColor() + _runners.GetName())).setScore(_runners.GetPlayers(true).size());
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(_chasers.GetColor() + _chasers.GetName())).setScore(_chasers.GetPlayers(true).size());
GetObjectiveSide().getScore(_runners.GetColor() + _runners.GetName()).setScore(_runners.GetPlayers(true).size());
GetObjectiveSide().getScore(_chasers.GetColor() + _chasers.GetName()).setScore(_chasers.GetPlayers(true).size());
}
@Override

View File

@ -293,7 +293,7 @@ public class DragonEscape extends SoloGame
//Wipe Last
for (String string : _lastScoreboard)
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
_lastScoreboard.clear();
SortScores();
@ -314,7 +314,7 @@ public class DragonEscape extends SoloGame
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(16-i);
GetObjectiveSide().getScore(out).setScore(16-i);
}
}

View File

@ -294,7 +294,7 @@ public class DragonEscapeTeams extends TeamGame
//Wipe Last
for (String string : _lastScoreboard)
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
_lastScoreboard.clear();
SortScores();
@ -315,7 +315,7 @@ public class DragonEscapeTeams extends TeamGame
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(16-i);
GetObjectiveSide().getScore(out).setScore(16-i);
}
}

View File

@ -245,7 +245,7 @@ public class DragonsTeams extends TeamGame
{
//Wipe Last
for (String string : _lastScoreboard)
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
_lastScoreboard.clear();
int i=0;
@ -261,7 +261,7 @@ public class DragonsTeams extends TeamGame
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(i++);
GetObjectiveSide().getScore(out).setScore(i++);
//Team
out = team.GetColor() + C.Bold + team.GetName() + " Time";
@ -271,7 +271,7 @@ public class DragonsTeams extends TeamGame
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(i++);
GetObjectiveSide().getScore(out).setScore(i++);
//Time
int seconds = _teamScore.get(team);
@ -283,7 +283,7 @@ public class DragonsTeams extends TeamGame
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(i++);
GetObjectiveSide().getScore(out).setScore(i++);
}
}

View File

@ -635,7 +635,7 @@ public class Draw extends SoloGame
//Wipe Last
for (String string : _lastScoreboard)
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
_lastScoreboard.clear();
SortScores();
@ -647,38 +647,38 @@ public class Draw extends SoloGame
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
out = C.cRed + " ";
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
out = C.cWhite + "Round:";
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
out = C.cYellow + Math.min(_roundCount+1, _roundMax) + " of " + _roundMax;
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
//Drawer
out = C.cRed + " ";
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
out = C.cWhite + "Drawer:";
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
out = C.cYellow + "None";
if (_round != null)
@ -686,20 +686,20 @@ public class Draw extends SoloGame
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
out = C.cRed + " ";
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
//Scores
out = C.cWhite + "Scores:";
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
//Write New
for (int i=0 ; i<_ranks.size() && index > 0 ; i++)
@ -713,7 +713,7 @@ public class Draw extends SoloGame
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(index--);
GetObjectiveSide().getScore(out).setScore(index--);
}
}
}

View File

@ -296,7 +296,7 @@ public class Evolution extends SoloGame
//Wipe Last
for (String string : _lastScoreboard)
{
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
}
_lastScoreboard.clear();
@ -313,7 +313,7 @@ public class Evolution extends SoloGame
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(score);
GetObjectiveSide().getScore(out).setScore(score);
}
}
}

View File

@ -367,7 +367,7 @@ public class MilkCow extends SoloGame
public void SetScore(Player player, double level)
{
_scoreObj.getScore(player).setScore((int)level);
_scoreObj.getScore(player.getName()).setScore((int)level);
//Rank
for (CowScore score : _ranks)
@ -476,7 +476,7 @@ public class MilkCow extends SoloGame
//Wipe Last
for (String string : _lastScoreboard)
{
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
}
_lastScoreboard.clear();
@ -500,7 +500,7 @@ public class MilkCow extends SoloGame
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(score);
GetObjectiveSide().getScore(out).setScore(score);
}
if (!added)
@ -509,7 +509,7 @@ public class MilkCow extends SoloGame
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(1);
GetObjectiveSide().getScore(out).setScore(1);
}
}

View File

@ -188,14 +188,14 @@ public class Quiver extends SoloGame
if (score.Player.equals(player))
{
score.Kills += 1;
_scoreObj.getScore(player).setScore(score.Kills);
_scoreObj.getScore(player.getName()).setScore(score.Kills);
EndCheck();
return;
}
}
_ranks.add(new QuiverScore(player, 1));
_scoreObj.getScore(player).setScore(1);
_scoreObj.getScore(player.getName()).setScore(1);
}
private void AnnounceCombo(Player player, int combo)
@ -259,7 +259,7 @@ public class Quiver extends SoloGame
//Wipe Last
for (String string : _lastScoreboard)
{
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
}
_lastScoreboard.clear();
@ -277,7 +277,7 @@ public class Quiver extends SoloGame
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(score.Kills);
GetObjectiveSide().getScore(out).setScore(score.Kills);
}
}

View File

@ -3,7 +3,6 @@ package nautilus.game.arcade.game.games.quiver;
import java.util.ArrayList;
import java.util.HashMap;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.Arrow;
@ -183,7 +182,7 @@ public class QuiverTeams extends TeamGame
{
//Wipe Last
for (String string : _lastScoreboard)
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
_lastScoreboard.clear();
for (GameTeam team : _teamKills.keySet())
@ -197,7 +196,7 @@ public class QuiverTeams extends TeamGame
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(kills);
GetObjectiveSide().getScore(out).setScore(kills);
}
}

View File

@ -493,7 +493,7 @@ public class SheepGame extends TeamGame
//Wipe Last
for (String string : _lastScoreboard)
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
_lastScoreboard.clear();
//Write New
@ -521,7 +521,7 @@ public class SheepGame extends TeamGame
if (score == 0)
score = -1;
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(score);
GetObjectiveSide().getScore(out).setScore(score);
_teamScore.put(team, score);
}
@ -532,20 +532,20 @@ public class SheepGame extends TeamGame
//Space
out = " ";
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(-2);
GetObjectiveSide().getScore(out).setScore(-2);
//Timer
out = C.Bold + "Next Sheep;";
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(-3);
GetObjectiveSide().getScore(out).setScore(-3);
out = C.cGreen + C.Bold + (int)UtilTime.convert(_sheepDelay - (System.currentTimeMillis() - _sheepTimer), 0, TimeUnit.FIT) + " Seconds";
if (out.length() >= 16)
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(-4);
GetObjectiveSide().getScore(out).setScore(-4);
}
public void GetTeamPen(SheepData data)

View File

@ -152,7 +152,7 @@ public class SuperSmash extends SoloGame
//Wipe Last
for (String string : _lastScoreboard)
{
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
}
_lastScoreboard.clear();
@ -160,11 +160,11 @@ public class SuperSmash extends SoloGame
{
String out = C.cGreen + "Players Alive";
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(GetPlayers(true).size());
GetObjectiveSide().getScore(out).setScore(GetPlayers(true).size());
out = C.cRed + "Players Dead";
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(GetPlayers(false).size() - GetPlayers(true).size());
GetObjectiveSide().getScore(out).setScore(GetPlayers(false).size() - GetPlayers(true).size());
}
else
{
@ -187,7 +187,7 @@ public class SuperSmash extends SoloGame
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(lives);
GetObjectiveSide().getScore(out).setScore(lives);
}
}
}

View File

@ -153,7 +153,7 @@ public class SuperSmashTeam extends TeamGame
//Wipe Last
for (String string : _lastScoreboard)
{
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
}
_lastScoreboard.clear();
@ -166,7 +166,7 @@ public class SuperSmashTeam extends TeamGame
out = out.substring(0, 15);
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(team.GetPlayers(true).size());
GetObjectiveSide().getScore(out).setScore(team.GetPlayers(true).size());
}
}
else
@ -185,7 +185,7 @@ public class SuperSmashTeam extends TeamGame
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(lives);
GetObjectiveSide().getScore(out).setScore(lives);
}
}
}

View File

@ -122,7 +122,7 @@ public class SquidShooter extends SoloGame
//Wipe Last
for (String string : _lastScoreboard)
{
GetScoreboard().resetScores(Bukkit.getOfflinePlayer(string));
GetScoreboard().resetScores(string);
}
_lastScoreboard.clear();
@ -138,7 +138,7 @@ public class SquidShooter extends SoloGame
_lastScoreboard.add(out);
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(out)).setScore(score.Kills);
GetObjectiveSide().getScore(out).setScore(score.Kills);
}
}

View File

@ -4,7 +4,6 @@ import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Effect;
import org.bukkit.Location;
@ -476,7 +475,7 @@ public class TurfForts extends TeamGame
if (team.GetColor() == ChatColor.RED) lines = GetRedLines();
else lines = GetBlueLines();
Score score = GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(name));
Score score = GetObjectiveSide().getScore(name);
score.setScore(lines);
}
}

View File

@ -365,8 +365,8 @@ public class ZombieSurvival extends SoloGame
if (_survivors == null || _undead == null)
return;
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(_survivors.GetColor() + _survivors.GetName())).setScore(_survivors.GetPlayers(true).size());
GetObjectiveSide().getScore(Bukkit.getOfflinePlayer(_undead.GetColor() + _undead.GetName())).setScore(_undead.GetPlayers(true).size());
GetObjectiveSide().getScore(_survivors.GetColor() + _survivors.GetName()).setScore(_survivors.GetPlayers(true).size());
GetObjectiveSide().getScore(_undead.GetColor() + _undead.GetName()).setScore(_undead.GetPlayers(true).size());
}
@Override