Player/User Object

Most things related to player can be accessed throw users object

CMIUser user = CMI.getInstance().getPlayerManager().getUser(player);

This can return NULL in some rare situations, so perform NPE check.

You can get offline player object from this one by using

Player player = user.getPlayer();

This can be used to access some of the player data information even if he is offline. Keep in mind that this actually loads players information and is highly not recommended to be used to load hundreds or even thousands of players with this method as this will certainly cause some strain on server. You can tho update some of player data but you will need to save it by (ONLY if player is offline) using


or by using


This is more safe approach as player object will be checked for appropriate save.


To create new custom hologram we will need center location and some unique name and center location

CMIHologram holo = new CMIHologram("TestHologram", center);

Next lets set some lines for it with 

holo.setLines(Arrays.asList("Line 1","Line 2"));

Lets add new hologram to cache. This is essential step to inform plugin that we have new hologram which should be included into cache. This will perform extra actions needed for hologram to work properly.


And finally, you can update it for every player who is near it to show it.
Attention! This will create a temporary hologram which will not be persistent over server restart. use option provided belove to make it persistent.  


Final code should look something like

CMIHologram holo = new CMIHologram("TestHologram", center); 
holo.setLines(Arrays.asList("Line 1","Line 2"));

Attention! If you want to save hologram file, use this. By default, hologram will be visible only until you remove it or server restarts.


If you want to save new information into file


If you want to hide hologram temporary, then you can use


This will only hide it until player reenters hologram area.

If you want to disable hologram entirely, then use


Enabling hologram is as easy as it gets


In case you have updated hologram lines and want then to be displayed. Use


Changing hologram location can be done with


After which you will need to refresh hologram

And if you want to remove hologram, use 



Quite few things can be accessed throw appropriate managers. They all can be accessed throw basic


method. In example, to access portal manager use



// Item stack used to get worth
ItemStack item;
WorthItem worth = CMI.getInstance().getWorthManager().getWorth(item);
if (worth == null){
// Worthless item so we can return null or 0D, whatever is needed in your case
return null;
// Buy price used in exploit detection
Double buyPrice = worth.getBuyPrice();
// Sell price defines actual worth of the file
Double sellPrice = worth.getSellPrice();
// Item of which worth value we are getting
ItemStack item;

// Worth object
WorthItem worth = CMI.getInstance().getWorthManager().getWorth(item);
if (worth == null){
// If its null then lets create new one
worth = new WorthItem(item);
// Adding worth to cache

// Changing prices

// Lets update values in save file

Custom Events

CMIAfkEnterEvent – Fired when player enters AFK mode.
CMIAfkKickEvent – Fired when player should be kicked from server after being AFK.
CMIAfkLeaveEvent – Fired when players leaves AFK mode.

CMIAnvilItemRenameEvent – Fired on item rename in anvil.
CMIAnvilItemRepairEvent – Fired on item repair action with anvil.

CMIArmorChangeEvent – Fired when player changes items in armor slots.

CMIBackpackOpenEvent – Fired on backpack open

CMIBossBarHideEvent – Fired when CMI boss bar should be hidden. Can be canceled.

CMIChunkChangeEvent – Fired when player changes chunk.

CMIGuiCloseEvent – Fired when player closed CMI GUI.

CMIEventCommandEvent – Fired on event command

CMIIpBanEvent – Fired when IP gets ban.
CMIIpUnBanEvent – Fired when IP gets unban.
CMIPlayerBanEvent – Fired when player gets ban.
CMIPlayerUnBanEvent – Fired when player gets unban.

CMIPlayerFakeEntityInteractEvent – Fired when player interacts with fake entity, in most cases this will be hologram button interaction.

CMIPlayerNickNameChangeEvent – Fired on player nickname change

CMIPlayerSitEvent – Fired on player sit action

CMIPlayerTeleportEvent – Fired before player teleportation. Includes possible safe location and reason why it could be unsafe. Provides source of teleportation.
CMIPlayerTeleportRequestEvent – Fired after player teleportation.

CMIPlayerJailEvent – Fired on player jail
CMIPlayerUnjailEvent  Fired on player unjail

CMIPlayerVanishEvent – Fired when player enters vanish event.
CMIPlayerUnVanishEvent – Fired when player exits vanish event.

CMIPlayerWarnEvent – Fired when player gets a warning

CMIPlayerWarpEvent – Fired before warping player to target location

CMIPortalCreateEvent – Fired on nether portal creation event.
CMIPortalUseEvent – Fired on CMI portal use event.

CMIPvEStartEventAsync – Fired on pve start
CMIPvEEndEventAsync – Fired on pve end
CMIPvPStartEventAsync – Fired on pvpstart event.
CMIPvPEndEventAsync– Fired on pvpend event.

CMISelectionEvent – Fired on selection
CMISelectionVisualizationEvent – Fired before selection visualization starts showing. Can be canceled.

CMIUserBalanceChangeEvent – Fired on user balance change, if CMI Economy is used. Change types include: setBalance, Withdraw, Deposit.