Fixed a couple of bugs
This commit is contained in:
parent
84fddb953e
commit
8a77f53314
@ -125,7 +125,7 @@ public class CakeBatModule extends CakeModule
|
|||||||
|
|
||||||
_game.CreatureAllowOverride = true;
|
_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);
|
bat.setAwake(true);
|
||||||
_bats.add(bat);
|
_bats.add(bat);
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ import org.bukkit.block.BlockFace;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.block.BlockBreakEvent;
|
import org.bukkit.event.block.BlockBreakEvent;
|
||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
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);
|
event.setCancelled(true);
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@ public class CakeShopModule extends CakeModule
|
|||||||
|
|
||||||
cakeTeam.getUpgrades().forEach((item, level) ->
|
cakeTeam.getUpgrades().forEach((item, level) ->
|
||||||
{
|
{
|
||||||
if (_game.getCakeTeamModule().hasCakeRot() && item == CakeTeamItem.REGENERATION))
|
if (_game.getCakeTeamModule().hasCakeRot() && item == CakeTeamItem.REGENERATION)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -315,6 +315,11 @@ public class CakeTeamModule extends CakeModule
|
|||||||
|
|
||||||
_teams.forEach((team, cakeTeam) ->
|
_teams.forEach((team, cakeTeam) ->
|
||||||
{
|
{
|
||||||
|
if (!cakeTeam.canRespawn())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
module.getOwnedItems(team).removeIf(item ->
|
module.getOwnedItems(team).removeIf(item ->
|
||||||
{
|
{
|
||||||
if (!(item instanceof CakeTrapItem))
|
if (!(item instanceof CakeTrapItem))
|
||||||
@ -570,6 +575,8 @@ public class CakeTeamModule extends CakeModule
|
|||||||
{
|
{
|
||||||
MapUtil.QuickChangeBlockAt(cakeTeam.getCake(), Material.AIR);
|
MapUtil.QuickChangeBlockAt(cakeTeam.getCake(), Material.AIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cakeTeam.getCakeHologram().stop();
|
||||||
});
|
});
|
||||||
|
|
||||||
_game.getModule(CompassModule.class)
|
_game.getModule(CompassModule.class)
|
||||||
|
Loading…
Reference in New Issue
Block a user