Fixed a couple of bugs

This commit is contained in:
Sam 2018-01-20 13:37:13 +00:00 committed by Alexander Meech
parent 84fddb953e
commit 8a77f53314
4 changed files with 11 additions and 3 deletions

View File

@ -125,7 +125,7 @@ public class CakeBatModule extends CakeModule
_game.CreatureAllowOverride = true;
Bat bat = location.getWorld().spawn(location.add(0, 1.2, 0), Bat.class);
Bat bat = location.getWorld().spawn(location.add(Math.random() - 0.5, 1.2, Math.random() - 0.5), Bat.class);
bat.setAwake(true);
_bats.add(bat);

View File

@ -14,6 +14,7 @@ import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
@ -352,7 +353,7 @@ public class CakePlayerModule extends CakeModule
}
}
}
else if (itemStack.getType() == INSTA_WALL.getType())
else if (itemStack.getType() == INSTA_WALL.getType() && event.getAction() == Action.RIGHT_CLICK_BLOCK)
{
event.setCancelled(true);

View File

@ -286,7 +286,7 @@ public class CakeShopModule extends CakeModule
cakeTeam.getUpgrades().forEach((item, level) ->
{
if (_game.getCakeTeamModule().hasCakeRot() && item == CakeTeamItem.REGENERATION))
if (_game.getCakeTeamModule().hasCakeRot() && item == CakeTeamItem.REGENERATION)
{
return;
}

View File

@ -315,6 +315,11 @@ public class CakeTeamModule extends CakeModule
_teams.forEach((team, cakeTeam) ->
{
if (!cakeTeam.canRespawn())
{
return;
}
module.getOwnedItems(team).removeIf(item ->
{
if (!(item instanceof CakeTrapItem))
@ -570,6 +575,8 @@ public class CakeTeamModule extends CakeModule
{
MapUtil.QuickChangeBlockAt(cakeTeam.getCake(), Material.AIR);
}
cakeTeam.getCakeHologram().stop();
});
_game.getModule(CompassModule.class)