Imran Abdo

make it so i can use a orbital wolf cannon that take no falldamage 50 wolfs have strenght inf speed inf fire res inf named pug

Kodari AI
KodariSep 12 at 3:37 pm 1
OrbitalWolfCannon
Creates a powerful orbital wolf cannon ability. When activated, the command spawns 50 wolves that rain down from the sky at the player's target location. All summoned wolves are immune to fall damage, possess infinite strength, infinite speed, and infinite fire resistance. Each wolf is named "Pug" and serves as an unstoppable assault force. The plugin includes a simple command system to trigger the orbital strike, with configurable cooldown and particle effects for visual impact. Wolves automatically despawn after a set duration to prevent server lag.

I’ll create a Paper plugin with /wolfcannon, spawning 50 marked “pug” wolves high above the player with permanent-strength, speed, and fire-resistance effects while cancelling their fall damage.

Created the OrbitalWolfCannon plugin.

  • /wolfcannon launches 50 wolves from 100 blocks above you.

  • Wolves are named pug.

  • Each wolf has maximum-strength, maximum-speed, and fire resistance effects.

  • Orbital wolves take no fall damage.

  • Optional height: /wolfcannon 200

  • Height range: 20–300 blocks.

  • Permission: orbitalwolfcannon.use (operators by default).

Imran Abdo

make it use a fishing rod not a command

Kodari AI
KodariSep 12 at 7:15 pm 1
  1. Replace /wolfcannon with a fishing-rod cast trigger.

  2. Remove the command registration and command metadata; keep the 50 named, powered wolves and fall-damage immunity.

Fishing rods now fire the cannon instead of a command.

  • Casting a fishing rod spawns 50 orbital wolves.

  • Wolves are named pug.

  • They retain infinite-strength, speed, and fire-resistance effects.

  • Their fall damage remains cancelled.

  • /wolfcannon and its command registration were removed.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
4 125
src/main/java/com/kodari/orbitalwolfcannon/OrbitalWolfCannon.java
package com.kodari.orbitalwolfcannon;

import java.util.concurrent.ThreadLocalRandom;
import org.bukkit.Location;
import org.bukkit.NamespacedKey;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.entity.Wolf;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.player.PlayerFishEvent;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;

public final class OrbitalWolfCannon extends JavaPlugin implements Listener {

    private static final int WOLF_COUNT = 50;
    private static final int DEFAULT_HEIGHT = 100;
    private static final int MIN_HEIGHT = 20;
    private static final int MAX_HEIGHT = 300;
    private static final int INFINITE_DURATION = Integer.MAX_VALUE;
    private static final int MAX_AMPLIFIER = 255;

    private NamespacedKey cannonWolfKey;

    @Override
    public void onEnable() {
        cannonWolfKey = new NamespacedKey(this, "orbital_wolf");
        getServer().getPluginManager().registerEvents(this, this);
    }

    @EventHandler
    public void onFishingRodCast(PlayerFishEvent event) {
        if (event.getState() == PlayerFishEvent.State.FISHING) {
            fire(event.getPlayer(), DEFAULT_HEIGHT);
        }
    }

    private void fire(Player player, int height) {
        World world = player.getWorld();
        Location playerLocation = player.getLocation();
        int spawnY = Math.min(playerLocation.getBlockY() + height, world.getMaxHeight() - 2);
        spawnY = Math.max(spawnY, world.getMinHeight() + 1);

        for (int i = 0; i < WOLF_COUNT; i++) {
            double angle = ThreadLocalRandom.current().nextDouble(0, Math.PI * 2);
            double distance = ThreadLocalRandom.current().nextDouble(0, 5);
            Location spawnLocation = new Location(
                    world,
                    playerLocation.getX() + Math.cos(angle) * distance,
                    spawnY,
                    playerLocation.getZ() + Math.sin(angle) * distance
            );

            Wolf wolf = world.spawn(spawnLocation, Wolf.class);
            wolf.setCustomName("pug");
            wolf.setCustomNameVisible(true);
            wolf.getPersistentDataContainer().set(cannonWolfKey, PersistentDataType.BYTE, (byte) 1);
            addEffect(wolf, "INCREASE_DAMAGE");
            addEffect(wolf, "SPEED");
            addEffect(wolf, "FIRE_RESISTANCE");
        }
    }

    private void addEffect(Wolf wolf, String effectName) {
        PotionEffectType effectType = PotionEffectType.getByName(effectName);
        if (effectType != null) {
            wolf.addPotionEffect(new PotionEffect(effectType, INFINITE_DURATION, MAX_AMPLIFIER, true, false, true));
        }
    }

    @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
    public void onWolfFallDamage(EntityDamageEvent event) {
        if (event.getCause() != EntityDamageEvent.DamageCause.FALL || !(event.getEntity() instanceof Wolf wolf)) {
            return;
        }

        if (wolf.getPersistentDataContainer().has(cannonWolfKey, PersistentDataType.BYTE)) {
            event.setCancelled(true);
        }
    }
}