Minecraft PC IP: play.cubecraft.net

DrHam

Forum Professional
Sep 15, 2015
3,615
4,166
558
Kepler-452b
Hello, i want 2 report @Joe Henry he uses antifly and killaura
Hello, most of you (hopefully, they read this) have suggested a report plugin, and another part of you answered "Can be easily abused", why? Here's your answer: a shitty code done in 20 minutes that @Foodyling can do in under 5 minutesa

Code:
package eu.hangar;

import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.ChatColor;

public class report extends JavaPlugin{
 
    public boolean onCommand (CommandSender sender, Command command, String commandLabel, String[] args){
        Player player = (Player) sender;
 
        if(commandLabel.equalsIgnoreCase("report")){
         
       for(Player p : Bukkit.getOnlinePlayers()) {

           if(p.hasPermission("punishment.receive")){
               if(args.length == 1){
         
                p.sendMessage(ChatColor.GOLD + player.getName() + ChatColor.GREEN + " reported player " + args[0] ); 
         
           }else if(args.length == 0){
                    player.sendMessage(ChatColor.RED + "Not enough arguments! Mention the player");
//kapap
           }else if(args.length == 2){
                player.sendMessage(ChatColor.GOLD + player.getName() + ChatColor.GREEN + " reported player " + args[0] + "  with link " + args[1]);

             
            }
     
return true;
    }
 
    return true;
}
        return true;
    }

        return false;
    }
}



//hello I am a random comment
 
Last edited:

DrHam

Forum Professional
Sep 15, 2015
3,615
4,166
558
Kepler-452b
Members Online

Latest profile posts

Got a Stack of reaction scores, ykwim??✌🏼
Nothing makes me feel as nostalgic as CubeCraft
NEWS: Summer event got released today (amazing shadow drop btw, since it didn't get in testing). There's also brand new maps which was not mentioned at all in the Notion post, which was a nice surprise. However, 5 weeks of summer is starting later (July 17 to most likely August 14).
Thanks @LemonyBreak459! for covering it since I woke up to the event releasing
Beach Ball Hunt reward:
Beach Ball Cage
reward.png
TruePenguin wrote on Aluzem's profile.
Thanks for the follow, Aluzem! ❄️
Top Bottom