PC-550
Fixes an issue where players would be able to interact with blocks on other people's islands in Speed Builders
This commit is contained in:
parent
1d3e12dfb6
commit
ce23a94f3f
@ -1694,6 +1694,33 @@ public class SpeedBuilders extends SoloGame
|
||||
|
||||
UtilAction.velocity(event.getPlayer(), new Vector(0, 1, 0));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void fixDoorToggling(PlayerInteractEvent event)
|
||||
{
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
if (_state != SpeedBuildersState.BUILDING)
|
||||
return;
|
||||
|
||||
if (!_buildRecreations.containsKey(event.getPlayer()))
|
||||
return;
|
||||
|
||||
if (_perfectBuild.containsKey(event.getPlayer()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
Block block = event.getClickedBlock();
|
||||
|
||||
if (!_buildRecreations.get(event.getPlayer()).inBuildArea(block))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
UtilPlayer.message(event.getPlayer(), F.main("Build", "You cannot modify other player\'s builds"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void EndCheck()
|
||||
|
Loading…
Reference in New Issue
Block a user