Fix spawn protection
This commit is contained in:
parent
32c4bf1c20
commit
ac0c1f8fad
@ -5,6 +5,7 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
@ -57,7 +58,7 @@ public class CakePlayerModule extends CakeModule
|
||||
.setUnbreakable(true)
|
||||
.build();
|
||||
private static final int PLATFORM_DELTA = 1;
|
||||
private static final PotionEffect SPAWN_PROTECTION = new PotionEffect(PotionEffectType.REGENERATION, 80, 0);
|
||||
private static final PotionEffect SPAWN_PROTECTION = new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 120, 0);
|
||||
|
||||
private final Set<Block> _placedBlocks;
|
||||
// Used to store the inventory of a player when using the rune of holding
|
||||
@ -247,7 +248,7 @@ public class CakePlayerModule extends CakeModule
|
||||
continue;
|
||||
}
|
||||
|
||||
if (itemStack.getAmount() < 1)
|
||||
if (itemStack != null && itemStack.getAmount() < 1)
|
||||
{
|
||||
contents[i] = null;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class CakeResourcePage extends ShopPageBase<ArcadeManager, CakeResourceSh
|
||||
|
||||
public CakeResourcePage(ArcadeManager plugin, CakeResourceShop shop, Player player, CakeResource resource, List<CakeItem> items)
|
||||
{
|
||||
super(plugin, shop, plugin.GetClients(), plugin.GetDonation(), resource.getName() + " Shop", player, 27);
|
||||
super(plugin, shop, plugin.GetClients(), plugin.GetDonation(), resource.getName() + " Shop", player, (int) ((Math.ceil(items.size() % 7)) * 9));
|
||||
|
||||
_game = (CakeWars) plugin.GetGame();
|
||||
_resource = resource;
|
||||
|
Loading…
Reference in New Issue
Block a user