Minecraft PC IP: play.cubecraft.net

DrHam

Forum Veteran
Sep 15, 2015
3,615
4,165
518
Kepler-452b
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
 

Megaaa

Forum Veteran
Mar 4, 2015
8,124
6,656
409
25
East-Flanders, Belgium
On the config file, staff string, you're a staff. This is the "default" config
I'm a 'staff'. ;)
17w84e.jpg
 
  • Like
Reactions: hgbf
Members Online

Team online

Latest profile posts

Reesle wrote on treegirl0194's profile.
Happy Birthday! 🎂
Reesle wrote on Pro Gamer672's profile.
Happy Birthday! 🎉
Reesle wrote on kfccaleb's profile.
Thank you for the follow, Pro! :D
Casualpoalrbear wrote on PolarBear's profile.
My guy somehow haven't posted a single message or had a single reaction and is somehow a well known member 💀
Top Bottom