Update and changes for 1.21
This commit is contained in:
@@ -336,7 +336,7 @@ public class EntityEventHandler implements Listener
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
void onTNTExitPortal(EntityPortalExitEvent event)
|
||||
{
|
||||
if (event.getEntityType() != EntityType.PRIMED_TNT)
|
||||
if (event.getEntityType() != EntityType.TNT)
|
||||
return;
|
||||
if (event.getTo().getWorld().getEnvironment() != Environment.THE_END)
|
||||
return;
|
||||
@@ -694,7 +694,7 @@ public class EntityEventHandler implements Listener
|
||||
if (event.getEntity() instanceof Mule && !GriefPrevention.instance.config_claims_protectDonkeys) return;
|
||||
if (event.getEntity() instanceof Llama && !GriefPrevention.instance.config_claims_protectLlamas) return;
|
||||
//protected death loot can't be destroyed, only picked up or despawned due to expiration
|
||||
if (event.getEntityType() == EntityType.DROPPED_ITEM)
|
||||
if (event.getEntityType() == EntityType.ITEM)
|
||||
{
|
||||
if (event.getEntity().hasMetadata("GP_ITEMOWNER"))
|
||||
{
|
||||
@@ -943,7 +943,7 @@ public class EntityEventHandler implements Listener
|
||||
|| subEvent.getEntityType() == EntityType.GLOW_ITEM_FRAME
|
||||
|| subEvent.getEntityType() == EntityType.ARMOR_STAND
|
||||
|| subEvent.getEntityType() == EntityType.VILLAGER
|
||||
|| subEvent.getEntityType() == EntityType.ENDER_CRYSTAL)
|
||||
|| subEvent.getEntityType() == EntityType.END_CRYSTAL)
|
||||
{
|
||||
//allow for disabling villager protections in the config
|
||||
if (subEvent.getEntityType() == EntityType.VILLAGER && !GriefPrevention.instance.config_claims_protectCreatures)
|
||||
@@ -1071,7 +1071,7 @@ public class EntityEventHandler implements Listener
|
||||
&& damageSource != null
|
||||
&& damageSource.getType() != EntityType.CREEPER
|
||||
&& damageSource.getType() != EntityType.WITHER
|
||||
&& damageSource.getType() != EntityType.ENDER_CRYSTAL
|
||||
&& damageSource.getType() != EntityType.END_CRYSTAL
|
||||
&& damageSource.getType() != EntityType.AREA_EFFECT_CLOUD
|
||||
&& damageSource.getType() != EntityType.WITCH
|
||||
&& !(damageSource instanceof Projectile)
|
||||
@@ -1136,7 +1136,7 @@ public class EntityEventHandler implements Listener
|
||||
|
||||
//kill the arrow to avoid infinite bounce between crowded together animals //RoboMWM: except for tridents
|
||||
if (arrow != null && arrow.getType() != EntityType.TRIDENT) arrow.remove();
|
||||
if (damageSource != null && damageSource.getType() == EntityType.FIREWORK && event.getEntity().getType() != EntityType.PLAYER)
|
||||
if (damageSource != null && damageSource.getType() == EntityType.FIREWORK_ROCKET && event.getEntity().getType() != EntityType.PLAYER)
|
||||
return;
|
||||
|
||||
try {
|
||||
@@ -1317,7 +1317,7 @@ public class EntityEventHandler implements Listener
|
||||
}
|
||||
|
||||
//if not a player and not an explosion, always allow
|
||||
if (attacker == null && damageSourceType != EntityType.CREEPER && damageSourceType != EntityType.WITHER && damageSourceType != EntityType.PRIMED_TNT)
|
||||
if (attacker == null && damageSourceType != EntityType.CREEPER && damageSourceType != EntityType.WITHER && damageSourceType != EntityType.TNT)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1405,9 +1405,9 @@ public class EntityEventHandler implements Listener
|
||||
|
||||
// Restrict some potions on claimed villagers and animals.
|
||||
// Griefers could use potions to kill entities or steal them over fences.
|
||||
if (PotionEffectType.HARM.equals(effectType)
|
||||
if (PotionEffectType.INSTANT_DAMAGE.equals(effectType)
|
||||
|| PotionEffectType.POISON.equals(effectType)
|
||||
|| PotionEffectType.JUMP.equals(effectType)
|
||||
|| PotionEffectType.JUMP_BOOST.equals(effectType)
|
||||
|| PotionEffectType.WITHER.equals(effectType))
|
||||
{
|
||||
Claim cachedClaim = null;
|
||||
@@ -1528,9 +1528,9 @@ public class EntityEventHandler implements Listener
|
||||
|
||||
// Restrict some potions on claimed villagers and animals.
|
||||
// Griefers could use potions to kill entities or steal them over fences.
|
||||
if (PotionEffectType.HARM.equals(effectType)
|
||||
if (PotionEffectType.INSTANT_DAMAGE.equals(effectType)
|
||||
|| PotionEffectType.POISON.equals(effectType)
|
||||
|| PotionEffectType.JUMP.equals(effectType)
|
||||
|| PotionEffectType.JUMP_BOOST.equals(effectType)
|
||||
|| PotionEffectType.WITHER.equals(effectType))
|
||||
{
|
||||
Claim cachedClaim = null;
|
||||
@@ -1581,14 +1581,14 @@ public class EntityEventHandler implements Listener
|
||||
public static final HashSet<PotionEffectType> positiveEffects = new HashSet<>(Arrays.asList
|
||||
(
|
||||
PotionEffectType.ABSORPTION,
|
||||
PotionEffectType.DAMAGE_RESISTANCE,
|
||||
PotionEffectType.FAST_DIGGING,
|
||||
PotionEffectType.RESISTANCE,
|
||||
PotionEffectType.HASTE,
|
||||
PotionEffectType.FIRE_RESISTANCE,
|
||||
PotionEffectType.HEAL,
|
||||
PotionEffectType.REGENERATION,
|
||||
PotionEffectType.HEALTH_BOOST,
|
||||
PotionEffectType.INCREASE_DAMAGE,
|
||||
PotionEffectType.STRENGTH,
|
||||
PotionEffectType.INVISIBILITY,
|
||||
PotionEffectType.JUMP,
|
||||
PotionEffectType.JUMP_BOOST,
|
||||
PotionEffectType.NIGHT_VISION,
|
||||
PotionEffectType.REGENERATION,
|
||||
PotionEffectType.SATURATION,
|
||||
|
||||
@@ -4,7 +4,7 @@ softdepend: [Vault, Multiverse-Core, My_Worlds, MystCraft, Transporter, TheUnder
|
||||
dev-url: https://dev.bukkit.org/projects/grief-prevention
|
||||
loadbefore: [TheUnderground]
|
||||
version: '${git.commit.id.describe}'
|
||||
api-version: '1.17'
|
||||
api-version: '1.21'
|
||||
commands:
|
||||
abandonclaim:
|
||||
description: Deletes a claim.
|
||||
|
||||
Reference in New Issue
Block a user