MyCommand
MyCommand
Donations
If you like this plugin, and want to offer me a coffee, consider to click the button on the top right corner of the navbar to donate! Thank you :D
Make your own, customized Minecraft commands
Features:
- Make new commands!. (Also registered command)
- Run others command in new one
- Perform several commands in one
- Delayed commands with custom pause, warmups and cooldowns
- Make Shortcut/alias commands or override commands.
- Run commands with any item , block, signs or even (villager) NPC's.
- Various functions for costumize commands, like placeholders, scripts (if-else) and more.
- Console support
- Economy support (Require Vault)
- All features are highly customizable
- No command limits with multiple file support
- Customizable IconMenu (ChestGUI), ActionBar, BossBar, Hover/ClickableText, Title and Scoreboard commands.
- Allow the execution of commands in various circumstances (per world, by worldguard regions and more.
- Custom players database where you can store anything you want to personalize even more your commands. SQL database supported.
- BungeeCord feature, Scheduler, Join/Quit/Death events, PHP/GET request ...
- ... And much, much more..!
Configuration and examples (Documentation)
Commands & permissions
Video Tutorial :
(French) Getting Started (TEXT and ALIAS commands) by Texier (MyCommand 5.5.0)
(English) by Koz4Christ. (MyCommand 5.1.8)
If you have to report an error in the chat, or just a command section, use pastebin or a similar website. Help with YML code error : http://yaml-online-parser.appspot.com/
This plugin uses bStats Metrics - MyCommand stats page
Hello Ivan.
I love your plugin. <3
My problem is itemset.
pls help, thank you. :)
(sorry i very bad english)
[09:36:14] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to MyCommand v5.5.1dev
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:320) ~[server.jar:git-Spigot-8043ebc-f690957]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[server.jar:git-Spigot-8043ebc-f690957]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:520) ~[server.jar:git-Spigot-8043ebc-f690957]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:505) ~[server.jar:git-Spigot-8043ebc-f690957]
at org.bukkit.craftbukkit.v1_14_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:423) ~[server.jar:git-Spigot-8043ebc-f690957]
at org.bukkit.craftbukkit.v1_14_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:390) ~[server.jar:git-Spigot-8043ebc-f690957]
at org.bukkit.craftbukkit.v1_14_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:386) ~[server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1704) ~[server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.PacketPlayInArmAnimation.a(SourceFile:32) ~[server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.PacketPlayInArmAnimation.a(SourceFile:9) ~[server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:13) ~[server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(SourceFile:135) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(SourceFile:114) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.MinecraftServer.aW(MinecraftServer.java:895) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:888) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeAll(SourceFile:99) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.MinecraftServer.sleepForTick(MinecraftServer.java:871) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:805) [server.jar:git-Spigot-8043ebc-f690957]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_211]
Caused by: java.lang.NullPointerException
at it.mri.mycommand.itemset.LoadItems.CheckIfContainsThisMaterial(LoadItems.java:98) ~[?:?]
at it.mri.mycommand.listener.ItemsListener.onPlayerInteract(ItemsListener.java:52) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_211]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_211]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_211]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_211]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316) ~[server.jar:git-Spigot-8043ebc-f690957]
... 20 more
In reply to Forge_User_73643943:
What version of Spigot/bukkit are you using? I guess you need to update the itemset.yml file with newer 1.13 item names... or i can see to implement something like the icon_menu to add a temporary compatibility. If you want make a fast fix, first make a backup of your itemset.yml file, then open the main one and add LEGACY_ prefix to every item name. That's should fix the null pointer.
In reply to ivanfromitaly:
It works. But when you create an empty hand interaction, throw the error message.
Server version: 1.14
[11:41:09] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to MyCommand v5.5.0
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:320) ~[server.jar:git-Spigot-8043ebc-f690957]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[server.jar:git-Spigot-8043ebc-f690957]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:520) ~[server.jar:git-Spigot-8043ebc-f690957]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:505) ~[server.jar:git-Spigot-8043ebc-f690957]
at org.bukkit.craftbukkit.v1_14_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:423) ~[server.jar:git-Spigot-8043ebc-f690957]
at org.bukkit.craftbukkit.v1_14_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:390) ~[server.jar:git-Spigot-8043ebc-f690957]
at org.bukkit.craftbukkit.v1_14_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:386) ~[server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1704) ~[server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.PacketPlayInArmAnimation.a(SourceFile:32) ~[server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.PacketPlayInArmAnimation.a(SourceFile:9) ~[server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:13) ~[server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(SourceFile:135) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(SourceFile:114) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.MinecraftServer.aW(MinecraftServer.java:895) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:888) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(SourceFile:123) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.MinecraftServer.sleepForTick(MinecraftServer.java:872) [server.jar:git-Spigot-8043ebc-f690957]
at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:805) [server.jar:git-Spigot-8043ebc-f690957]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_211]
Caused by: java.lang.NullPointerException
at it.mri.mycommand.itemset.LoadItems.CheckIfContainsThisMaterial(LoadItems.java:98) ~[?:?]
at it.mri.mycommand.listener.ItemsListener.onPlayerInteract(ItemsListener.java:52) ~[?:?]
at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_211]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_211]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316) ~[server.jar:git-Spigot-8043ebc-f690957]
... 20 more
In reply to Forge_User_73643943:
Are you adding items from in-game with the command /mycmd-itemset or you're directly editing the yml file? Because the intended usage is to use only the in-game command.
In reply to ivanfromitaly:
I editing the .yml file all config ,i always do that and i like notepad++ configuration.
(config picture)
and the blockset also writes an error.
In reply to Forge_User_73643943:
Still, the intended use to prevent error is to use the in-game command. The null pointer probably is the wrong item_name. Add them from the game, and then, if you want, edit the file manually.
In reply to ivanfromitaly:
Hello Ivan.
Can we talk elsewhere?
Hello Ivan:)
Or anyone else who is better at mycmd than me ;)
Im looking for a way to make a variable that counts the amount of unique players that join my server. But i cannot figure out a way to do it properly, i will post my idea below:
On a players first join, i run a command as the player: /first_join_message .
That command will then add +1 to a variable that is %unique_players_joined%.
But how can i make such a global variable? (one variable thats shared across all players?)
Also can i somehow use this to do something like:
%your_unique_number% = %unique_players_joined%
Without the %your_unique_number% updating when the %unique_players_joined% update?
My use for this is to make 2 messages: One will show how many players that have joined my server, and one to show what number the player was.
Thank you for an amazing plugin and support!
- Digi
In reply to Digital_Beast:
If you already have a way to determinate if it is the player first join (i don't know essentialsX?) you just need to create a global variable with
"/mycmd-variables create $unique_players_joined" and then set it to 0 ->
"/mycmd-variables set $unique_players_joined 0".
In the main command /first_join_message you just need to increase that variable in someway, by the mycmd-variable command or the script "
Done this, the variable $unique_players_joined should be accesible from any part of mycommand, or you can use placeholderapi to get it on other plugins, with :
P.S. I used $unique_players_joined instead of %unique_players_joined% to prevent parsing error's in my plugin, maybe they works also with the %, not sure, but for the example here i used something i'm sure to be okay.
In reply to ivanfromitaly:
Thank you Ivan!
I will determine a players first join from a command im running when they join, in which i will use the "$Script$%Variable%$unique_players_joined+1"
But for my second part of my question, can i somehow duplicate' the value of the "$Script$%Variable%$unique_players_joined+1" and make that unique for a player?
e.g:
Bob and Ross joins my server, Bob is number 205 and Ross is number 206 unique player. John_wick321 is an older player who got curious about the number of joins, after they joined so, John_wick321 run a command like '/totalplayersjoined' and he will receive:
"A total of 206 players joined. You was number 95!" Or something like that..
So The number that the players were when they joined somehow gets attached to them by from that point on, by copying the global variable and making it a playervariable?
If you want to help im very happy, and assuming you are very busy with 1.14.X updates i understand completely if you dont have time.. I want you to know your support is well appreciated!
Cheers - Digi
Its very difficult to explain, im sorry if something sounds stupid or stupifying.. I hope you understand :)
In reply to Digital_Beast:
You can store anything per player with /mycmd-playerdata. When you launch
$Script$%Variable%$unique_players_joined+1
add this other line :
Then you can access to it as a placeholder with : "$PlayerData%unique_player_id%" or "$PlayerDataFor%PlayerName%unique_player_id%", there is also a placeholderapi support for playerdata,
In reply to ivanfromitaly:
Thank you VERY VERY much for your help! Looks exactly like what i was looking for but sometimes it feels i stare at the forest and cant see the trees.
You are truly an amazing dev. !
Have a wonderful day, Cheers!
- Digi
Hi there
Is there any way to test if a player has a bed location (registred by minecraft) and teleport him to it (and teleport him to another location if not)?Could it be a feature?
Thank you
In reply to Forge_User_80075269:
I've looked into, but the getBedLocation seems half broken, i need more experimentation, i will find a way.
In reply to Forge_User_80075269:
I was using the wrong method. Anyway, here you go, if you want try it :
Link Removed: https://www.mediafire.com/file/a8ln7oe7fj5jcfh/MyCommand_v5.5.1dev_may27.zip/file
In reply to ivanfromitaly:
Thank you to be so quick guy!!
I just tried your script, I'm not sure it works, even if I slept in a bed it returns "not found"
In reply to Forge_User_80075269:
OKAY I understand, it works. But it does not work if bed is obstructed... It is the weird minecraft behaviour ^^
My command does not work (plugin used for shop is Quantumshop 1.9-1.14
please help
shop:
command: /shop
type: RUN_COMMAND
runcmd:
- /shop open
permission-required: false
In reply to Forge_User_27476696:
The command input is the same as the command output, so it creates a loop. I don't know, if the plugin have some aliases built in, you can use them, otherwise i guess, you can add them manually in the Quantumshop plugin.yml file inside the Quantumshop.jar archive. If you want to do that, open plugin.yml and add under the command shop the alias you want. Anyway, anytime the author update the plugin you need to do that again. Try to ask the dev of the plugin if he can add that alias for you.
Some things does not work in version 1.8.8, example the system of title and subtitle.