Public API for CMI plugin
More information and examples zrips.net/cmi/api
Public API for CMI plugin
Public API for CMI plugin
More information and examples zrips.net/cmi/api
wrong thread
Hi,
I'm having problems with CMI canceling all chat events and searching for some API events to get valid raw chat for further processing in another plugin. A quick look at your API didn't let me find anything.
Can you help me?
Hey,
The constructor CMIHologram(String, Location) is deprecated, even though this method is recommended on API in Zrips website.
Could you make the -s parameter for groundclean so that the console does not show anything deleted [Number of deleted items ] items
HI, anytime I try to use the API I put it in my pom.xml file but it returns this:
Cannot resolve com.github.Zrips:CMI-API:8.7.8.2
Could you please add build configurations to the repo so website can generate artifacts?
cmi.viewrange and cmi.viewrange. simply don't work.
cmi.command.viewrange sets the max to 32, with seemingly no way to lower it or a set a range. Any chance a range could be added or fixed (if it's already added)?
Hi, i use latest version cmi and cmi lib.
I created a small custom casino plugin that displays % chance of dropping an emerald or redstone
My version is 1.12.2 i use catserver hybrid (latest).
You can view example in video here :
https://drive.google.com/file/d/1jZfsDJntdczaxpWn4VNe-ZQ1J1VVn9EW/view?usp=sharing
You can see that when I leave the area and come back the holograms don't respawn correctly.
It happens 1/2 approximately
My code for create and update hologram is :
`import com.Zrips.CMI.CMI;
import com.Zrips.CMI.Modules.Holograms.CMIHologram;
import org.bukkit.Location;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
public class HologramsListener {
public static Map<Location, CMIHologram> hologramsMap = new HashMap<>(); // Map Hologram principal
public static Map<Location, Long> hologramsTimeMap = new HashMap<>(); // Map Hologram qui gère le temps
public static Map<Location, String> hologramsUserMap = new HashMap<>(); // Map Hologram qui check le joueur qui a posé
public static void createHologram(Location location, double emeraude, double redstone) {
long currentTime = System.currentTimeMillis();
double chanceEmeraude = (double) emeraude / (emeraude + redstone);
double chanceRedstone = (double) redstone / (emeraude + redstone);
// Arrondi les pourcentages avec une décimale
double chanceEmeraudeArrondi = Math.round(chanceEmeraude * 1000) / 10.0;
double chanceRedstoneArrondi = Math.round(chanceRedstone * 1000) / 10.0;
if (hologramsMap.containsKey(location)) { // S'il existe on le met juste à jour
CMIHologram hologram = hologramsMap.get(location);
hologram.setLines(Arrays.asList("§aGagner: " + chanceEmeraudeArrondi + "§a%", "§cPerdre: " + chanceRedstoneArrondi + "§c%"));
hologram.update();
hologramsTimeMap.put(location, currentTime);
} else {
CMIHologram hologram = new CMIHologram(String.valueOf(location), location.clone().add(0.5, 1.75, 0.5));
hologram.setLines(Arrays.asList("§aGagner: " + chanceEmeraudeArrondi + "§a%", "§cPerdre: " + chanceRedstoneArrondi + "§c%"));
CMI.getInstance().getHologramManager().addHologram(hologram);
hologram.update();
hologramsMap.put(location, hologram);
hologramsTimeMap.put(location, currentTime);
}
}
public static void removeHologram(Location location){
CMIHologram hologram = hologramsMap.remove(location);
if(hologram != null){
hologram.remove();
}
hologramsTimeMap.remove(location);
hologramsUserMap.remove(location);
}
}`
Thanks for your help in advance!
I know some custom crating plugin some can do this (but has some flaws and we have cmi already and cant turn off cmi recipes).
Also you can set permissions on each recipe (like permissions notch_apple: true/false, phantom_heart: true/false etc).
Tags and lore (metadata) on items form plugin get ignore in your recipe part (you can get this work, other as done this).
And some now, every time some has use custom recepie and on logon later get recipe removed (minecraft do not recognize recipe say in console).
Is not impossible to make this stay on server restart and player log in on server again (one other plugin can do this, but we want your plugin for this).
Others i try is CraftEnhance and customcrafting
Player's fly is not disabled when they enter another world while they have fly active. I'm only using CMI as fly plugin and i'm using FlightCharge as a "TempFly" plugin.
players do not have access to /fly
or /flyc
WorldLimits:
Enabled: true
Fly:
- world_iris:false
- world_nether:false
- world_the_end:false
- world_spawn:false
- world_pvp:false
- world_dungeon:false
- world_pinata:false
- world_denied_resourcepack:false
- parkour_whirlpool:false
- parkour_biomes:false
- event_parkour:false
- event_labirinth:false
Hello, getAfkManager()#getAfkPlayers() always returns all online players, when I check if CMIUser#isAfk() it's false.
Currently there is no easy way to get the player that executed the jail command aka the jailer, src/com/Zrips/CMI/events/CMIIpBanEvent.java has a method to do this so please add it for the jail too.
When I try the /inv command to see someone's inventory, but when I start typing the player's name, I get errors. For each letter I type, it says, "An internal error occurred while attempting to tab-complete this command". This is my console:
30.12 22:37:31 [Server] ERROR Exception when ItsGrantie attempted to tab complete inv 30.12 22:37:31 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing tab-completer for 'inv ' in com.Zrips.CMI.Containers.CommandReg$ReflectCommand(inv) 30.12 22:37:31 [Server] INFO at org.bukkit.command.SimpleCommandMap.tabComplete(SimpleCommandMap.java:246) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?] 30.12 22:37:31 [Server] INFO at org.bukkit.craftbukkit.v1_20_R3.CraftServer.tabCompleteCommand(CraftServer.java:2518) ~[paper-1.20.4.jar:git-Paper-346] 30.12 22:37:31 [Server] INFO at org.bukkit.craftbukkit.v1_20_R3.CraftServer.tabComplete(CraftServer.java:2490) ~[paper-1.20.4.jar:git-Paper-346] 30.12 22:37:31 [Server] INFO at org.bukkit.craftbukkit.v1_20_R3.command.BukkitCommandWrapper.getSuggestions(BukkitCommandWrapper.java:74) ~[paper-1.20.4.jar:git-Paper-346] 30.12 22:37:31 [Server] INFO at com.mojang.brigadier.tree.ArgumentCommandNode.listSuggestions(ArgumentCommandNode.java:71) ~[brigadier-1.2.9.jar:git-Paper-346] 30.12 22:37:31 [Server] INFO at com.mojang.brigadier.CommandDispatcher.getCompletionSuggestions(CommandDispatcher.java:544) ~[paper-1.20.4.jar:?] 30.12 22:37:31 [Server] INFO at com.mojang.brigadier.CommandDispatcher.getCompletionSuggestions(CommandDispatcher.java:524) ~[paper-1.20.4.jar:?] 30.12 22:37:31 [Server] INFO at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleCustomCommandSuggestions$5(ServerGamePacketListenerImpl.java:811) ~[?:?] 30.12 22:37:31 [Server] INFO at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.4.jar:git-Paper-346] 30.12 22:37:31 [Server] INFO at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?] 30.12 22:37:31 [Server] INFO at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?] 30.12 22:37:31 [Server] INFO at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1458) ~[paper-1.20.4.jar:git-Paper-346] 30.12 22:37:31 [Server] INFO at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194) ~[paper-1.20.4.jar:git-Paper-346] 30.12 22:37:31 [Server] INFO at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] 30.12 22:37:31 [Server] INFO at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1435) ~[paper-1.20.4.jar:git-Paper-346] 30.12 22:37:31 [Server] INFO at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1358) ~[paper-1.20.4.jar:git-Paper-346] 30.12 22:37:31 [Server] INFO at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?] 30.12 22:37:31 [Server] INFO at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1336) ~[paper-1.20.4.jar:git-Paper-346] 30.12 22:37:31 [Server] INFO at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1220) ~[paper-1.20.4.jar:git-Paper-346] 30.12 22:37:31 [Server] INFO at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321) ~[paper-1.20.4.jar:git-Paper-346] 30.12 22:37:31 [Server] INFO at java.lang.Thread.run(Thread.java:833) ~[?:?] 30.12 22:37:31 [Server] INFO Caused by: java.lang.NullPointerException: Cannot invoke "com.Zrips.CMI.Containers.CMIUser.getNickName()" because "<local24>" is null 30.12 22:37:31 [Server] INFO at com.Zrips.CMI.TabComplete.getByAction(TabComplete.java:1186) ~[CMI-9.6.9.3.jar:?] 30.12 22:37:31 [Server] INFO at com.Zrips.CMI.TabComplete.get(TabComplete.java:546) ~[CMI-9.6.9.3.jar:?] 30.12 22:37:31 [Server] INFO at com.Zrips.CMI.TabComplete.onTabComplete(TabComplete.java:100) ~[CMI-9.6.9.3.jar:?] 30.12 22:37:31 [Server] INFO at com.Zrips.CMI.TabComplete.get(TabComplete.java:366) ~[CMI-9.6.9.3.jar:?] 30.12 22:37:31 [Server] INFO at com.Zrips.CMI.Containers.CommandReg.onTabComplete(CommandReg.java:127) ~[CMI-9.6.9.3.jar:?] 30.12 22:37:31 [Server] INFO at com.Zrips.CMI.Containers.CommandReg$ReflectCommand.tabComplete(CommandReg.java:283) ~[CMI-9.6.9.3.jar:?] 30.12 22:37:31 [Server] INFO at org.bukkit.command.Command.tabComplete(Command.java:93) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?] 30.12 22:37:31 [Server] INFO at org.bukkit.command.SimpleCommandMap.tabComplete(SimpleCommandMap.java:240) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?] 30.12 22:37:31 [Server] INFO ... 20 more
Thanks!
Please add event PlayerSellItems with items list and player, need this event for a statistics of sell/buys items
I imported the CMIAPI7.6.2.0.jar into my project in IntelliJ but I'm getting an error when I'm trying to build it.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project minenexus: Compilation failure: Compilation failure:
[ERROR] /F:/Minecraft/minenexus/src/main/java/me/soldado/minenexus/pesca/CoreVendaPeixe.java:[3,21] package com.Zrips.CMI does not exist
[ERROR] /F:/Minecraft/minenexus/src/main/java/me/soldado/minenexus/pesca/CoreVendaPeixe.java:[4,32] package com.Zrips.CMI.Containers does not exist
[ERROR] /F:/Minecraft/minenexus/src/main/java/me/soldado/minenexus/pesca/CoreVendaPeixe.java:[47,13] cannot find symbol
[ERROR] symbol: class CMIUser
[ERROR] location: class me.soldado.minenexus.pesca.CoreVendaPeixe
[ERROR] /F:/Minecraft/minenexus/src/main/java/me/soldado/minenexus/pesca/CoreVendaPeixe.java:[47,28] cannot find symbol
[ERROR] symbol: variable CMI
[ERROR] location: class me.soldado.minenexus.pesca.CoreVendaPeixe
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] Maven execution terminated abnormally (exit code 1)
Is there any maven repository I can use to import the API into my plugin or am I missing something? I followed these steps to import the API https://stackoverflow.com/questions/1051640/correct-way-to-add-external-jars-lib-jar-to-an-intellij-idea-project
Dear @Zrips , please FIX IT.
Because your constructors have 3 errors / mistakes??
public CMIHologram(String name, Location loc, Player playerToShowFor)
{
this.name = null;
.....
this.playerToShowFor = null;
.....
this.loc= null;
}
wtf?
I try to make some additional message and alert in my discord server so I try to find the API event but sadly CMI doesn't have it.
So If you add Warn Event (fired when player get or remove warn point) I truly glad.
Description of issue:
API:
CMI.getInstance().getFlightChargeManager().isEnabled()
Will cause error:
java.lang.NoSuchMethodError: com.Zrips.CMI.Modules.FlightCharge.FlightChargeManager.isEnabled()Z
ERROR (DELETE IF YOU HAVE NO ERROR):
[21:06:42 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'pp' in plugin PlayerdataPlus v1.1.3
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[patched_1.15.2.jar:git-Paper-164]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.15.2.jar:git-Paper-164]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:752) ~[patched_1.15.2.jar:git-Paper-164]
at net.minecraft.server.v1_15_R1.PlayerConnection.handleCommand(PlayerConnection.java:1825) ~[patched_1.15.2.jar:git-Paper-164]
at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1633) ~[patched_1.15.2.jar:git-Paper-164]
at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[patched_1.15.2.jar:git-Paper-164]
at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.15.2.jar:git-Paper-164]
at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[patched_1.15.2.jar:git-Paper-164]
at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) ~[patched_1.15.2.jar:git-Paper-164]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.15.2.jar:git-Paper-164]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.15.2.jar:git-Paper-164]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.15.2.jar:git-Paper-164]
at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:1038) ~[patched_1.15.2.jar:git-Paper-164]
at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:1031) ~[patched_1.15.2.jar:git-Paper-164]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.15.2.jar:git-Paper-164]
at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1015) ~[patched_1.15.2.jar:git-Paper-164]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:938) ~[patched_1.15.2.jar:git-Paper-164]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_231]
Caused by: java.lang.NoSuchMethodError: com.Zrips.CMI.Modules.FlightCharge.FlightChargeManager.isEnabled()Z
at tw.momocraft.playerdataplus.utils.FlyStatus.onFly(FlyStatus.java:50) ~[?:?]
at tw.momocraft.playerdataplus.Commands.onCommand(Commands.java:15) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[patched_1.15.2.jar:git-Paper-164]
... 17 more
CONFIG SECTION (DELETE IF NOT RELEVANT):
config.yml
FlightCharge:
# When set to true, each time player gets flight charge or relogs, his fly mode will be toggled on
# If set to false, then players will have to manually turn on flight with /cmi flyc
EnabledByDefault: true
# When set to true, in event of player changing his game mode from survival/adventure to creative/spectator his flight charge mode will get disabled
# Same applies when changing game mode from creative/spectator to survival/adventure
AutoSwitch: false
# How much it costs for one recharge point in exp points. Value can be in decimals, like 0.2 but it cant be equal or lower than 0
# Set to 0 to disable this type of recharge
ExpRechargeCost: 1.0
# How much it costs for one recharge point. Value can be in decimals, like 0.2 but it cant be equal or lower than 0
# Set to 0 to disable this type of recharge
MoneyRechargeCost: 1.0
# Defines maximum amount of charge player can have
# One charge is one traveled block while flying
# if player doesn't move, then one charge for each second while hovering
MaxChargeLevel: 1000
# Defines multiplier when player doesn't move but is hovering. For each second player hovers.
# Set to 0 to disable
DeductOnIdling: 1.0
# If this is set above 0, then player will loose defined amount of charges each second they are flying instead of traveled blocks
# Set to 0 to disable, which will deduct charges for traveled blocks
DeductOnlyForTime: 0.0
# Defines multiplier when player falls down of charge to be taken
# This only effects when player falls from above 3 blocks of hight
# In example if player falls from 10 blocks height, then 7 * 2 = 14 charges will be taken
# This is to prevent avoiding no penalty from jumping from cliffs
# Set to 0 if you want to disable it
DeductOnFallMulti: 2
# Defines if you want to damage player when he falls down from higher than 3 blocks height
# This will not kill player even if he would drop from 200 block height, but will leave him with 1 hp
# This will only effect players who jumped down and not those who disabled fly mode in mid air
DamageOnFall: true
# DamageOnFall should be enabled for this to work
# This will define if you want to damage player when he deactivates fly mode in mid air
DamageOnToggle: false
# DamageOnFall should be enabled for this to work
# This will define if you want to kill player if fall damage if higher than his health amount
KillOnFall: false
Modules.yml
ALL ENABLED.
Cmi Version (using/cmi version
):
CMI: 8.6.22.1
Cmi API Version:
CMIAPI7.6.2.0.jar
Server Type (Spigot/Paperspigot/etc):
Paper
Server Version (using /ver
):
Paper version git-Paper-164 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)
Plugin using CMI-API fails to build even though it is added as an external jar, is there a further Maven dependency I'm missing?
Player player = event.getPlayer();
CMIUser user = CMI.getInstance().getPlayerManager().getUser(player.getUniqueId());
if (godMode == StateFlag.State.ALLOW) {
user.setGodMode(true);
} else if (godMode == StateFlag.State.DENY) {
user.setGodMode(false);
}
First of all, I'd like to say sorry for posting this in issues, couldn't find any links to ideas or requests.
Cross server random teleport would be a nice feature. Like /cmi rt %playername% %servername% %worldname%.
Thank you, if you read it.
Unlike shown in the Hologram API examples, ALL - CMIHologram.makePersistent(), .remove(), .disable(), and .enable() do NOT exist in the latest CMIAPI jar.
if possible, an event for both success and failure would be nice
Please update your API so that we can fix the following issue:
Currently their is this placeholder. Would it be possible to update this to accept 'server' as the [playerName], Or even a new placeholder that's not user specific?
An example of how I would use this is; My server has a different every hour with the scheduler, like Double Xp, or Double Drops. I could update the placeholder to let players know what is the current event on the scoreboard.
%cmi_user_meta_[key]% to be used with custom placeholders. This is utilized by using /cmi usermeta [playerName] [add/remove/clear/list/increment] (key) (value) (-s)
Console error when trying to jail some users
https://nekobin.com/rumazesuga
I don't wish to have my players pay a fee to use /cmi repair - so I have that setting off in the config:
Repair:
# When item costs money, player will be required to confirm repair action by clicking message in chat
Confirmation: true
# When set to true, item repair with /cmi repair will cost money depending on setup
# Player who performs command will pay repair cost
# If command gets performed from console, then player whose items are repaired will be paying
CostsMoney: false
However, since this last update, it is charging them regardless: https://imgur.com/a/5tdK6Si
It's not asking for confirmation either, which I do have on. Am I missing something?
Using Paper 1.14.4
CMI 8.6.13.0
ERROR (DELETE IF YOU HAVE NO ERROR):
https://pastebin.com/5KnpuMUF
CONFIG SECTION (DELETE IF NOT RELEVANT):
Economy:
# Enable or disable CMI economy in general
# In case CMIInjector is present, then this will be set to true automatically.
Enabled: false
# Determines if player needs to confirm money payment by clicking on chat message
Confirmation: false
# Determines max amount of cheque player can create
# Set it to 0 to remove limit
MaxChequeValue: 1.0E8
BalTop:
# List of players to exclude from baltop list
Exclude:
- Notch
# List of names to exclude from baltop
# Can be used to filter out towny towns
ExcludeStartingWith:
- town_
- town-
- towny_
- towny-
- nation-
- nation_
Global:
# Starting amount of money players will have
StartingAmount: 200.0
# Minimal amount, can go into negative if needed
MinimalAmount: 0.0
# Maximal amount of money player can have. Set to -1 to disable this limit
MaximumAmount: 1.0E8
# Currency symbol to be used when showing balance or similar
CurrencySymbol: $
# Placing of currency symbol
Placing: '[symbol][money]'
Cmi Version (using/cmi version
):
8.2.8.0
Server Type (Spigot/Paperspigot/etc):
Spigot version 1.13.2 (but also occurs in 1.13.1)
Server Version (using /ver
):
This server is running CraftBukkit version git-Spigot-518206a-a5b9c7b (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT)
Relevant plugins (Delete if this isn't needed):
Hello,
The CMI-API repository could do with an update. There are a lot of new methods for things such as holograms, the armour stand editor, etc.
I've had a look at the CMI API and I see no-way to interact with the graves. can i have information about events and api endpoints for graves and if it's possible to remove items from graves.
None of the JitPack builds have succeeded, and i'd rather not put the jar file in my code for cleanliness reasons.
I think that the above two events would be useful for developers, as we already have kick, ban, unban and IP ban events.
Add an event can caught player use /msg 's message. Hope can cancelled.
It's not actually color codes, which is offputting (e.g. &a, &b etc), but the actual word of color (red, darkred).
I've looked and looked and cannot find a full list of these colors/formats in their word form anywhere. Please help? There's only so much guessing I can do x.x
On SpigotMc, the CMI-API is outdated, please updated
http://www.zrips.net/wp-content/uploads/2019/02/CMIAPI7.6.2.0.jar [Outdated Link's]
Issue: Elytra Boost not working correctly. After a minute of using the boost it makes the player go straight down when boosting with elytra.
Spigot Version: 1.12.2 (last update)
CMI Version: 8.0.6.0
Consle Bug: https://pastebin.com/jKGb4sdm
Add an event that will call when user is trying to /sethome. Can be cancelled.
When using jitpack.io to obtain jar from releases it throws:
Could not find artifact com.github.Zrips:CMI-API:jar:9.6.5.0
Because the jitpack expects CMI-API-9.6.5.0.jar
and on the releases it is CMI-API9.6.5.0.jar
Adding an Hyphen fixes the issue.
It would really help integrating with your resource if you would offer a maven repository that contains an artifact of your API jar.
Hello, I've made a simple plugin to transfer ranks to luckperms but CMI.getInstance returns null.
Code:
`@Override
protected void onCommand() {
final Map<UUID, CMIUser> cmiUsers = CMI.getInstance().getPlayerManager().getAllUsers();
int i = 0;
for (CMIUser user : cmiUsers.values()) {
CMIRank rank = user.getRank();
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "lp user " + user.getName() + " parent set " + rank.getName());
i++;
}
Bukkit.getConsoleSender().sendMessage(ChatColor.translateAlternateColorCodes('&', "&aSuccessfully converted " + i + " players!"));
}`
Error:
[18:29:33 INFO]: [EliviusTransfers] [STDOUT] Null? null [18:29:33 WARN]: Nag author(s): '[]' of 'EliviusTransfers v1.0' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger). [18:29:33 WARN]: java.lang.NullPointerException: Cannot invoke "com.Zrips.CMI.CMI.getPlayerManager()" because the return value of "com.Zrips.CMI.CMI.getInstance()" is null [18:29:33 WARN]: at EliviusTransfers-1.0-all.jar//me.sean0402.eliviustransfers.Commands.TransferCMD.onCommand(TransferCMD.java:34) [18:29:33 WARN]: at EliviusTransfers-1.0-all.jar//lib.Commands.BasicCommand.execute(BasicCommand.java:206) [18:29:33 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) [18:29:33 WARN]: at org.bukkit.craftbukkit.v1_20_R2.CraftServer.dispatchCommand(CraftServer.java:991) [18:29:33 WARN]: at org.bukkit.craftbukkit.v1_20_R2.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) [18:29:33 WARN]: at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:265) [18:29:33 WARN]: at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:330) [18:29:33 WARN]: at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:314) [18:29:33 WARN]: at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2208) [18:29:33 WARN]: at net.minecraft.server.network.PlayerConnection.lambda$handleChatCommand$19(PlayerConnection.java:2168) [18:29:33 WARN]: at net.minecraft.util.thread.IAsyncTaskHandler.b(IAsyncTaskHandler.java:59) [18:29:33 WARN]: at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) [18:29:33 WARN]: at net.minecraft.server.TickTask.run(TickTask.java:18) [18:29:33 WARN]: at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:153) [18:29:33 WARN]: at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24) [18:29:33 WARN]: at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1324) [18:29:33 WARN]: at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:193) [18:29:33 WARN]: at net.minecraft.util.thread.IAsyncTaskHandler.x(IAsyncTaskHandler.java:126) [18:29:33 WARN]: at net.minecraft.server.MinecraftServer.bg(MinecraftServer.java:1301) [18:29:33 WARN]: at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1294) [18:29:33 WARN]: at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:136) [18:29:33 WARN]: at net.minecraft.server.MinecraftServer.u_(MinecraftServer.java:1272) [18:29:33 WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1160) [18:29:33 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) [18:29:33 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
plugin.yml
name: EliviusTransfers version: '1.0' main: me.sean0402.eliviustransfers.EliviusTransfers api-version: '1.20' softdepend: [CMI]
I have tried it as a depend also. No luck... Anyway to fix this?
I got this error: https://sourceb.in/v37hgWD7D8
After reading the error, seems like the API is outdated.
Please update the API!
It would be nice to have an event for when someone clicks/interacts with an armor stand.
On the SpigotMC page, the link to download a clean version of CMI with the API is this one: http://www.zrips.net/wp-content/uploads/2019/02/CMIAPI7.6.2.0.jar
However... it is highly outdated, as the latest version of CMI is 8.7.8.4. This jar can no longer be used without creating errors.
I have multiple plugins hooked into the MySQL server so I know it works including Ultra Permissions and dont have issue. As of right now some table were created but some hasn't been and is throwing this error. https://pastebin.com/XcMZawTb
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.