Report

Discussion in 'Plugins and Coding' started by HangarGeek, Aug 30, 2016.

  1. HangarGeek

    HangarGeek Member

    Messages:
    3,131
    Likes Received:
    2,581
    Trophy Points:
    333
    HangarGeek
    Obsidian
    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: Aug 30, 2016
    Rainbowaffelz and hgbf like this.
  2. Earth

    Earth Member

    Messages:
    1,261
    Likes Received:
    4,897
    Trophy Points:
    353
    Guildmaster
    Obsidian
    Sweet 60 FPS glory. What recording program do you use?
    Also nice job
     
  3. HangarGeek

    HangarGeek Member

    Messages:
    3,131
    Likes Received:
    2,581
    Trophy Points:
    333
    HangarGeek
    Obsidian
    Earth likes this.
  4. hgbf

    hgbf Member

    Messages:
    2,939
    Likes Received:
    4,319
    Trophy Points:
    308
    hgbf
    Diamond
    Better idea: link them to the report a player section ;)
     
  5. HangarGeek

    HangarGeek Member

    Messages:
    3,131
    Likes Received:
    2,581
    Trophy Points:
    333
    HangarGeek
    Obsidian
    I'll do that :)
     
    hgbf likes this.
  6. HangarGeek

    HangarGeek Member

    Messages:
    3,131
    Likes Received:
    2,581
    Trophy Points:
    333
    HangarGeek
    Obsidian
    Added some quality shit pls no ban i luv servero
     
  7. Spyro the Dragon

    Spyro the Dragon Member

    Messages:
    4,122
    Likes Received:
    1,551
    Trophy Points:
    173
    SpyrothDragon
    I like this it does alot of the harder work for you all you have to do is just upload evidence and what this person did
     
  8. HangarGeek

    HangarGeek Member

    Messages:
    3,131
    Likes Received:
    2,581
    Trophy Points:
    333
    HangarGeek
    Obsidian
  9. RynezDev

    RynezDev Member

    Messages:
    5,281
    Likes Received:
    3
    Trophy Points:
    163
    Apply for dev. thanks
    nice job! :)
     
  10. HangarGeek

    HangarGeek Member

    Messages:
    3,131
    Likes Received:
    2,581
    Trophy Points:
    333
    HangarGeek
    Obsidian
    @GingerGeek nah, this is pretty simple, just arguments, but thanks

    thanks