Mob egg baby fix. Also fixed non build entities from being "broken"
This commit is contained in:
parent
008fc587b0
commit
e96b4c4a7f
@ -39,6 +39,7 @@ import org.bukkit.event.inventory.InventoryPickupItemEvent;
|
||||
import org.bukkit.event.player.PlayerBucketEmptyEvent;
|
||||
import org.bukkit.event.player.PlayerBucketFillEvent;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
@ -1256,9 +1257,34 @@ public class SpeedBuilders extends SoloGame
|
||||
if (!_buildRecreations.get(player).inBuildArea(event.getEntity().getLocation()))
|
||||
return;
|
||||
|
||||
boolean hasMobType = false;
|
||||
|
||||
for (MobData mobData : _currentBuild.Mobs)
|
||||
{
|
||||
if (mobData.EntityType == event.getEntityType())
|
||||
{
|
||||
hasMobType = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasMobType)
|
||||
return;
|
||||
|
||||
_buildRecreations.get(player).addToDemolition(event.getEntity());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void stopBabyEgg(PlayerInteractEntityEvent event)
|
||||
{
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
if (event.getPlayer().getItemInHand().getType() == Material.MONSTER_EGG)
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void updateDemolitionBlocks(UpdateEvent event)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user