Update and changes for 1.21

This commit is contained in:
Len 2024-07-20 16:54:10 +02:00
parent 01dbc159de
commit 49e1dadf94
5 changed files with 19 additions and 57 deletions

View File

@ -39,7 +39,7 @@ repositories {
}
dependencies {
compileOnly("com.alttd:Galaxy-API:1.20.4-R0.1-SNAPSHOT")
compileOnly("com.alttd:Galaxy-API:1.21-R0.1-SNAPSHOT")
compileOnly("de.keyle:mypet:3.11-SNAPSHOT")
compileOnly("com.github.NeumimTo:Pl3xMap:1.18-2")
testImplementation("org.junit.jupiter:junit-jupiter:5.7.0")
@ -51,7 +51,7 @@ dependencies {
group = "com.griefprevention"
version = "16.18-RC2-SNAPSHOT"
description = "GriefPrevention"
java.sourceCompatibility = JavaVersion.VERSION_17
java.sourceCompatibility = JavaVersion.VERSION_21
publishing {
publications.create<MavenPublication>("maven") {

View File

@ -1,38 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>GriefPrevention Chatroom</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="IRC webclient to the #GriefPrevention channel on irc.spi.gt">
<style>
.iframe-container
{
overflow: hidden;
height: 70vh;
position: relative;
}
.iframe-container iframe
{
border: 0;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
</style>
</head>
<body>
<center>
<h1>GriefPrevention Chat</h1>
<h3>Before proceeding, try searching the <a href="https://docs.griefprevention.com">Docs</a> or <a href="https://github.com/TechFortress/GriefPrevention/discussions" target="_blank">Discussions</a> for your question.</h3>
No need to wait for a response before asking; simply state your question and then wait patiently for a response. This is an idle chatroom - think of this like email instead of a phone conversation.<br />
<div class="iframe-container"><iframe loading="lazy" src="https://kiwiirc.com/client/irc.spi.gt/#GriefPrevention"></iframe></div>
<b><a href="https://r.griefprevention.com/irc" target="_blank">Chat window not appearing? Click here to open in a separate tab.</a></b><br />
Or join with your own IRC client. Server: irc.spi.gt Channel: #GriefPrevention<br />
<br/>
Want chat history? Consider using <a href="https://www.irccloud.com/" target="_blank">IRCCloud</a> or a free bouncer service. Chat logs are also available, see the channel topic.<br />
Yes, GriefPrevention has an official <a href="https://r.griefprevention.com/dumcord">discord channel.</a>
</center>
</body>
</html>

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -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,

View File

@ -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.