1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Report

Discussion in 'Plugins/Codes' started by A Christmas Hangar, Aug 30, 2016.

  1. A Christmas Hangar

    A Christmas Hangar Member

    Joined:
    Sep 15, 2015
    Messages:
    2,548
    Likes Received:
    1,494
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Kepler452B
    Home Page:
    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

    Joined:
    Oct 21, 2015
    Messages:
    999
    Likes Received:
    3,015
    Trophy Points:
    93
    Gender:
    Male
    Occupation:
    making dank memes
    Location:
    down under
    Sweet 60 FPS glory. What recording program do you use?
    Also nice job
     
  3. A Christmas Hangar

    A Christmas Hangar Member

    Joined:
    Sep 15, 2015
    Messages:
    2,548
    Likes Received:
    1,494
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Kepler452B
    Home Page:
    Earth likes this.
  4. hgbf

    hgbf Member

    Joined:
    Oct 27, 2015
    Messages:
    2,601
    Likes Received:
    2,696
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    ⎝Duck⎠
    Location:
    Next to my computer
    Better idea: link them to the report a player section ;)
     
  5. A Christmas Hangar

    A Christmas Hangar Member

    Joined:
    Sep 15, 2015
    Messages:
    2,548
    Likes Received:
    1,494
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Kepler452B
    Home Page:
    I'll do that :)
     
    hgbf likes this.
  6. A Christmas Hangar

    A Christmas Hangar Member

    Joined:
    Sep 15, 2015
    Messages:
    2,548
    Likes Received:
    1,494
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Kepler452B
    Home Page:
    Added some quality shit pls no ban i luv servero
     
  7. Legendary Spyro

    Legendary Spyro Member

    Joined:
    May 27, 2016
    Messages:
    1,962
    Likes Received:
    356
    Trophy Points:
    83
    Gender:
    Male
    Occupation:
    Defender of Worlds
    Location:
    Skylands
    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. A Christmas Hangar

    A Christmas Hangar Member

    Joined:
    Sep 15, 2015
    Messages:
    2,548
    Likes Received:
    1,494
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Kepler452B
    Home Page:
  9. xTurtleOfficialㅤ

    xTurtleOfficialㅤ Member

    Joined:
    Dec 1, 2015
    Messages:
    5,291
    Likes Received:
    373
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    idk
    Location:
    Earth
    Apply for dev. thanks
    nice job! :)
     
  10. A Christmas Hangar

    A Christmas Hangar Member

    Joined:
    Sep 15, 2015
    Messages:
    2,548
    Likes Received:
    1,494
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Kepler452B
    Home Page:
    @GingerGeek nah, this is pretty simple, just arguments, but thanks

    thanks