Minecraft PC IP: play.cubecraft.net

DrHam

Forum Veteran
Sep 15, 2015
3,615
4,166
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
26
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

yurisatori0312 wrote on aoi9632's profile.
When you come to the forums, the first thing you should do is introduce in the introduction selection!
Even from players I consider strong, I am treated as a hacker on rare occasions. Maybe my fighting style is bad, or maybe I have a hacking client installed in my body 🤔
Another interesting thing was that someone did something strange to me in the lobby? Whatever his intentions were, I was confused in front of the screen 🫣
Despite reporting the hacker, they leave the server before the administrator could respond, I regret that I should have video recorded it... (for report in this forum)
Daily Question 171.

What do you think will win GOTY?
Top Bottom