Chat Essentials v3

Discussion in 'Plugins and Coding' started by HangarGeek, Jul 24, 2016.

  1. HangarGeek

    HangarGeek Member

    Messages:
    3,131
    Likes Received:
    2,581
    Trophy Points:
    333
    HangarGeek
    Obsidian
    Hi, yes, it CE again:
    This time I added some "utils" thing that displays info such as Active Potion effects, your world position, server MOTD and server name, your EXP (and until next level), EXP level, bukkit version, your IP, your gamemode, your last killer, etc. Also a "staff list" (not online, due obvious reasons*).

    https://www.spigotmc.org/resources/chatessentials.26203/


    Code:
    List<String> blockedMessages = getConfig().getStringList("Staff");
        if (cmd.getName().equalsIgnoreCase("Staff")) {
            if(player.hasPermission("CE.staff"))
            player.sendMessage(ChatColor.DARK_BLUE + "----------------------------------------");
            player.sendMessage(ChatColor.BLUE + "List of the staff:");
            player.sendMessage(ChatColor.DARK_GREEN + "" + getConfig().getString("Staff"));
            player.sendMessage(ChatColor.DARK_BLUE + "----------------------------------------");
            return true;
        }
       
       
        if (cmd.getName().equalsIgnoreCase("Utils")) {
            player.sendMessage(ChatColor.DARK_GREEN + "Showing some useful data:");
            player.sendMessage(ChatColor.DARK_GREEN + "Server:");
            player.sendMessage(ChatColor.GOLD + "Server name: " + ChatColor.GREEN +Bukkit.getServerName());
            player.sendMessage(ChatColor.GOLD + "Server Id: " + ChatColor.GREEN + Bukkit.getServerId());
            player.sendMessage(ChatColor.GOLD + "Server MOTD: " + ChatColor.GREEN + Bukkit.getMotd());
            player.sendMessage(ChatColor.GOLD + "Server port: " +ChatColor.GREEN + Bukkit.getPort());
            player.sendMessage(ChatColor.GOLD + "Maximum players: " + ChatColor.GREEN + Bukkit.getMaxPlayers());
            player.sendMessage(ChatColor.GOLD + "Bukkit version: " + ChatColor.GREEN + Bukkit.getBukkitVersion());
            player.sendMessage(ChatColor.GOLD + "ServicesManager: " + ChatColor.GREEN + Bukkit.getServicesManager());
            player.sendMessage(ChatColor.DARK_GREEN + player.getName() + "'s statics:");
            player.sendMessage (ChatColor.GOLD + "Your last killer" + player.getKiller());
            player.sendMessage(ChatColor.GOLD + "Your EXP: " +ChatColor.GREEN + player.getExp() + "," +  player.getExpToLevel() + "to next level");
            player.sendMessage(ChatColor.GOLD + "Your level: " +ChatColor.GREEN + player.getLevel());
            player.sendMessage(ChatColor.GOLD + "Your total EXP level is: " + player.getTotalExperience());
            player.sendMessage(ChatColor.GOLD + "Your health: " + ChatColor.GREEN +player.getHealth());
            player.sendMessage(ChatColor.GOLD + "Active potion effects: " + ChatColor.GREEN + player.getActivePotionEffects());
            player.sendMessage(ChatColor.GOLD + "Your name: " + ChatColor.GREEN +player.getName());
            player.sendMessage(ChatColor.GOLD + "Your gamemode: " +ChatColor.GREEN + player.getGameMode());
            player.sendMessage(ChatColor.GOLD + "Your adress is: " + ChatColor.GREEN + player.getAddress());
            player.sendMessage(ChatColor.GOLD + "Your in-game location: " + ChatColor.GREEN + player.getLocation());
       
     
            return true;
    
           }



    PS: for some reason the "default staff members" are @xMegaCoolx , @rubik_cube_man , @GingerGeek and me. idk why



    Apart of preventin bugging the staff members, I am too lazy to make that
     
  2. NedGaming

    NedGaming Member

    Messages:
    2,559
    Likes Received:
    2,313
    Trophy Points:
    288
    What can i do more with this?
     
  3. HangarGeek

    HangarGeek Member

    Messages:
    3,131
    Likes Received:
    2,581
    Trophy Points:
    333
    HangarGeek
    Obsidian
    What do you mean?
     
  4. NedGaming

    NedGaming Member

    Messages:
    2,559
    Likes Received:
    2,313
    Trophy Points:
    288
    What is different with The normal CE?
     
  5. HangarGeek

    HangarGeek Member

    Messages:
    3,131
    Likes Received:
    2,581
    Trophy Points:
    333
    HangarGeek
    Obsidian
    It's an update of CE. Nothing, two more command and removed few useless things
     
  6. Megaaa

    Megaaa Member

    Messages:
    7,389
    Likes Received:
    4,252
    Trophy Points:
    318
    xMegaCoolx
    Obsidian
    I don't know why you tagged me, becuase I'm so noob at coding. I try to learn it, but it so difficult for me. :p
     
  7. HangarGeek

    HangarGeek Member

    Messages:
    3,131
    Likes Received:
    2,581
    Trophy Points:
    333
    HangarGeek
    Obsidian
    On the config file, staff string, you're a staff. This is the "default" config
     
  8. Megaaa

    Megaaa Member

    Messages:
    7,389
    Likes Received:
    4,252
    Trophy Points:
    318
    xMegaCoolx
    Obsidian
    I'm a 'staff'. ;)
    17w84e.jpg
     
    hgbf likes this.
  9. HangarGeek

    HangarGeek Member

    Messages:
    3,131
    Likes Received:
    2,581
    Trophy Points:
    333
    HangarGeek
    Obsidian
  10. NedGaming

    NedGaming Member

    Messages:
    2,559
    Likes Received:
    2,313
    Trophy Points:
    288
    Lel, need to put this here
     

    Attached Files:

    HackersDontWin likes this.
  11. HangarGeek

    HangarGeek Member

    Messages:
    3,131
    Likes Received:
    2,581
    Trophy Points:
    333
    HangarGeek
    Obsidian
    Oh, lol. Just lol.