haideraternos

make me plugin when doing /shoot it will kill somebody random

Kodari AI
KodariMar 31 at 9:15 am 4,937 (v2)

I’ll create a simple plugin that kills a random player when someone executes /shoot.

RandomShooter
A simple troll plugin that allows players to execute the /shoot command to randomly eliminate any online player from the server. Features instant kill mechanics and broadcast messages to all players. Perfect for casual servers looking for chaotic fun gameplay elements.

Plugin created! When someone executes /shoot, it will randomly select any online player and eliminate them, then broadcast who did the shooting. The command is available to all players by default.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
4 100
src/main/java/com/randomshooter/RandomShooter.java
package com.randomshooter;

import com.randomshooter.commands.ShootCommand;
import org.bukkit.plugin.java.JavaPlugin;

public class RandomShooter extends JavaPlugin {

    @Override
    public void onEnable() {
        registerCommands();
        getLogger().info("RandomShooter has been enabled!");
    }

    @Override
    public void onDisable() {
        getLogger().info("RandomShooter has been disabled!");
    }

    private void registerCommands() {
        getCommand("shoot").setExecutor(new ShootCommand());
    }
}