Add wind charge to /fireball (#5951)

Closes #5949
This commit is contained in:
Josh Roy 2024-10-15 06:56:11 -04:00 committed by GitHub
parent 6157668a63
commit 9c3e0eb312
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,6 +19,7 @@ import org.bukkit.entity.Snowball;
import org.bukkit.entity.SplashPotion; import org.bukkit.entity.SplashPotion;
import org.bukkit.entity.ThrownExpBottle; import org.bukkit.entity.ThrownExpBottle;
import org.bukkit.entity.Trident; import org.bukkit.entity.Trident;
import org.bukkit.entity.WindCharge;
import org.bukkit.entity.WitherSkull; import org.bukkit.entity.WitherSkull;
import org.bukkit.metadata.FixedMetadataValue; import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
@ -55,6 +56,10 @@ public class Commandfireball extends EssentialsCommand {
builder.put("trident", Trident.class); builder.put("trident", Trident.class);
} }
if (VersionUtil.getServerBukkitVersion().isHigherThanOrEqualTo(VersionUtil.v1_21_R01)) {
builder.put("windcharge", WindCharge.class);
}
types = builder.build(); types = builder.build();
} }