Fix dupe scoreboard entries. Make it so perfect builders can't fill or empty bucket.

This commit is contained in:
Virizion 2016-01-25 20:54:01 -05:00
parent a1eec79b3b
commit c5dfddd710

View File

@ -519,6 +519,9 @@ public class SpeedBuilders extends SoloGame
@EventHandler
public void onPlayerQuit(PlayerQuitEvent event)
{
if (GetTeamList().size() > 1 && GetTeamList().get(1).HasPlayer(event.getPlayer()))
GetTeamList().get(1).RemovePlayer(event.getPlayer());
RecreationData recreation = null;
if (_buildRecreations.containsKey(event.getPlayer()))
@ -1441,6 +1444,12 @@ public class SpeedBuilders extends SoloGame
if (!_buildRecreations.containsKey(event.getPlayer()))
return;
if (_perfectBuild.containsKey(event.getPlayer()))
{
event.setCancelled(true);
return;
}
Block liquid = event.getBlockClicked().getRelative(event.getBlockFace());
if (!_buildRecreations.get(event.getPlayer()).inBuildArea(liquid))
@ -1463,6 +1472,12 @@ public class SpeedBuilders extends SoloGame
if (!_buildRecreations.containsKey(event.getPlayer()))
return;
if (_perfectBuild.containsKey(event.getPlayer()))
{
event.setCancelled(true);
return;
}
Block liquid = event.getBlockClicked().getRelative(event.getBlockFace());
if (!_buildRecreations.get(event.getPlayer()).inBuildArea(liquid))