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

Chat Essentials v3

Discussion in 'Plugins/Codes' started by A Christmas Hangar, Jul 24, 2016.

  1. A Christmas Hangar

    A Christmas Hangar Member

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

    Joined:
    May 22, 2015
    Messages:
    2,050
    Likes Received:
    1,589
    Trophy Points:
    113
    Gender:
    Male
    Location:
    The Netherlands
    What can i do more with this?
     
  3. A Christmas Hangar

    A Christmas Hangar Member

    Joined:
    Sep 15, 2015
    Messages:
    2,542
    Likes Received:
    1,489
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Kepler452B
    Home Page:
    What do you mean?
     
  4. NedGaming

    NedGaming Member

    Joined:
    May 22, 2015
    Messages:
    2,050
    Likes Received:
    1,589
    Trophy Points:
    113
    Gender:
    Male
    Location:
    The Netherlands
    What is different with The normal CE?
     
  5. A Christmas Hangar

    A Christmas Hangar Member

    Joined:
    Sep 15, 2015
    Messages:
    2,542
    Likes Received:
    1,489
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Kepler452B
    Home Page:
    It's an update of CE. Nothing, two more command and removed few useless things
     
  6. xMegaCoolx

    xMegaCoolx Member

    Joined:
    Mar 4, 2015
    Messages:
    6,392
    Likes Received:
    2,049
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    CubeCrafter
    Location:
    ƮǿʍǿřřǿώŁąɲȡ
    Home Page:
    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. A Christmas Hangar

    A Christmas Hangar Member

    Joined:
    Sep 15, 2015
    Messages:
    2,542
    Likes Received:
    1,489
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Kepler452B
    Home Page:
    On the config file, staff string, you're a staff. This is the "default" config
     
  8. xMegaCoolx

    xMegaCoolx Member

    Joined:
    Mar 4, 2015
    Messages:
    6,392
    Likes Received:
    2,049
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    CubeCrafter
    Location:
    ƮǿʍǿřřǿώŁąɲȡ
    Home Page:
    I'm a 'staff'. ;)
    17w84e.jpg
     
    hgbf likes this.
  9. A Christmas Hangar

    A Christmas Hangar Member

    Joined:
    Sep 15, 2015
    Messages:
    2,542
    Likes Received:
    1,489
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Kepler452B
    Home Page:
  10. NedGaming

    NedGaming Member

    Joined:
    May 22, 2015
    Messages:
    2,050
    Likes Received:
    1,589
    Trophy Points:
    113
    Gender:
    Male
    Location:
    The Netherlands
    Lel, need to put this here
     

    Attached Files:

    HackersDontWin likes this.
  11. A Christmas Hangar

    A Christmas Hangar Member

    Joined:
    Sep 15, 2015
    Messages:
    2,542
    Likes Received:
    1,489
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Kepler452B
    Home Page:
    Oh, lol. Just lol.