patch something

This commit is contained in:
Minecon724 2022-01-29 17:22:18 +01:00
parent 9161dfeb2c
commit 3b8f2a6cd7
3 changed files with 9 additions and 5 deletions

View File

@ -1,3 +1,3 @@
# giants
# Giants
Add giants to your Minecraft server by installing a Spigot plugin.
This plugin adds naturally spawning giants to your Minecraft server.

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>giants</groupId>
<artifactId>giants</artifactId>
<version>21.1.0</version>
<version>21.1.1</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>

View File

@ -118,10 +118,14 @@ public class Main extends JavaPlugin implements Listener {
LivingEntity entity = (LivingEntity) pos.getWorld().spawnEntity(pos, EntityType.GIANT);
if (ai) {
LivingEntity passenger = (LivingEntity) pos.getWorld().spawnEntity(pos, EntityType.HUSK);
new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1).apply((LivingEntity) passenger);
new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1)
.apply((LivingEntity) passenger);
new PotionEffect(PotionEffectType.WEAKNESS, Integer.MAX_VALUE, 255)
.apply((LivingEntity) passenger);
passenger.setCustomName("Giant");
passenger.setCustomNameVisible(false);
passenger.setHealth(0.5D);
passenger.setInvulnerable(true);
passenger.setPersistent(true);
entity.addPassenger(passenger);
}
for (Entry<PotionEffectType, Integer> t : effects.entrySet()) {