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
-
View User Profile
-
Send Message
Posted Sep 5, 2019In reply to k_clock:
Fixed in the next release.
-
View User Profile
-
Send Message
Posted Sep 2, 2019Is there a way to simply get another player variables? (like $player, $locX , $locY , $locZ, $world, $level and everything else)
I want to create a command to calculate how far the player is from another.
So I want to get $locX from the guy who executes the command and the $locX from the target
Cheers
-
View User Profile
-
Send Message
Posted Sep 2, 2019In reply to Forge_User_80075269:
If the other player is online, you can use this one :
$GetPlayerByName%playername%
Otherwise with MyCommand built-in placeholder you can't do that on offline one's. There is Parse Other addon for PAPI for that.
Anyway, $GetPlayerByName%playername% :
But yeah, i've read better now what you want to do, and i can't confirm you if $GetPlayerByName%playername% works also on rucmd Script without problems. "$GetPlayerByName%playername%" needs to be before anything, maybe even before the $Script$ placeholder. I have to test for myself first lol.
-
View User Profile
-
Send Message
Posted Aug 23, 2019Hi ivan
I have an issue with this code https://pastebin.com/Bkaq2TuT
I'm trying to execute this specific command on player logout/quit.
But it seems HasPermission doesn't work on quit
I use Authme to handle events, I have another command on login which works fine ( https://pastebin.com/EuYj3Ntg ). This one works on /logout command (player is still online), but doesn't work when player quit the game
FYI, the goal of my scripts is to enable a bonus command, once a day when user has played 30 minutes (Also, if you have a better way to do what I want, please tell me :) )
So I add a permission during 30 min after first login of the day to deny to use another command. After this time, permission is unset and player is able to use the command. Except if player logout during the 30 min, in this case everything is canceled and need to be executed again on the next login.
I'm not sure if it's HasPermission or if I made something wrong.
I tried with Mycmd playerevents itself, but nothing happens when player quits :o (extra listener is enable)
Thanks in advance for your precious help
EDIT: I have also some ideas about time variables, i will do another comment
-
View User Profile
-
Send Message
Posted Aug 24, 2019In reply to Forge_User_80075269:
Don't know what to say, for what i've tested, your commands works. with permission-required: true and permission-required: false. And also with HasPermission==mycommand.cmd.bonus.locked and without the permission (in order of what i have the result's are ok). Tested with PEX and the playerevents.yml. PS playerevents needs a server restart. If you done that, Authme probably override everything. Maybe it's something related to authme who remove all the player permissions before the time? I can't do much, even so, if authme can handle those events before he close everything, it should works.
-
View User Profile
-
Send Message
Posted Aug 24, 2019In reply to ivanfromitaly:
I think there is an issue from Authme side, i will report it.
Also, I didn't restarted after edited playerevents file, so I tried again and it works now.
However, an error occured when command is typed (just after logout) https://pastebin.com/8q86fahE
Then, command is executed.
Is an issue from my config, from your side or from VentureChat side?
I use VentureChat 2.16.0, PAPI 2.10.3 and MyCommand 5.5.1 (Spigot 1.13.2 b2148)
-
View User Profile
-
Send Message
Posted Aug 24, 2019In reply to Forge_User_80075269:
Also, could you confirm to me this code is able to work? I want to allow player only if he doesn't have the perm
Because, I think that doesn't work in my code (player is able to bypass, even if he has a temporary permission)
But the == works fine
-
View User Profile
-
Send Message
Posted Aug 25, 2019In reply to Forge_User_80075269:
the != line doesn't exist in my plugin, that's why. If something is wrong it returns always false. Anyway, invert the 2 condition if you need that, put in the else what is inside the if and viceversa. Anyway, != is not equals, and with permissions i can't see how it can work, what you need is a "!HasPermission==p", but isn't there.
-
View User Profile
-
Send Message
Posted Aug 25, 2019In reply to ivanfromitaly:
That's why! Thanks for these informations. Could you add the !HasPermission ?
Also I think you missed it, I have an error, I write it again:
Also, I didn't restarted after edited playerevents file, so I tried again and it works now.
However, an error occured when command is typed (just after logout) https://pastebin.com/8q86fahE
Then, command is executed.
Is an issue from my config, from your side or from VentureChat side?
I use VentureChat 2.16.0, PAPI 2.10.3 and MyCommand 5.5.1 (Spigot 1.13.2 b2148
-
View User Profile
-
Send Message
Posted Aug 25, 2019In reply to Forge_User_80075269:
I can't tell what's the problem there. VentureChat want to access to something who isn't here anymore i guess, and if this happen on the logout, it's because the player isn't here anymore. Probably, Authme is the cause, because it locks out everything when someone get out from the server. You can try locally if without authme the error is still here, or just pur the server in online mode just for the test, and disable temporarily authme. If it's authme i can't help you anyway lol.
-
View User Profile
-
Send Message
Posted Aug 25, 2019In reply to ivanfromitaly:
I switch to Mycmd itself for the logout/quit, so I don't think Authme is the cause. But I could try without authme
-
View User Profile
-
Send Message
Posted Aug 26, 2019In reply to ivanfromitaly:
I can confirm, Authme isn't the problem here
Tried without Authme: https://pastebin.com/TTubbMij
It's my config (https://pastebin.com/SkUxZrWf), VentureChat or MyCmd side :)
-
View User Profile
-
Send Message
Posted Aug 27, 2019In reply to Forge_User_80075269:
When i have time i will try to replicate the error, anyway, i repeat, he error start from VentureChat, i can see if i can do something, probably not. I'll see.
-
View User Profile
-
Send Message
Posted Aug 29, 2019In reply to Forge_User_80075269:
I've tested it, and the error seems to happen always after mycommand performed the command. There is something going on with the chat system who cause that. MyCommand execute commands as chat message in various place to make it working also non registered commands. In this case, when the player quit something happen to VentureChat side, i can't tell what.
A solution i found is to make my plugin run only registered command from the event, in that way VentureChat seems to be ok.
To do so, place "$PERFORM_COMMAND$" before the command and you'll be fine.
download the latest dev version to test it, if you want.
-
View User Profile
-
Send Message
Posted Aug 31, 2019In reply to ivanfromitaly:
It seems work perfectly, thank you a lot :)
Your work is really awesome
-
View User Profile
-
Send Message
Posted Aug 21, 2019is there a possibility a self-created command with / tabs if so how do I do that with a command
-
View User Profile
-
Send Message
Posted Aug 23, 2019In reply to Forge_User_32182132:
Are you looking for this part?
Register Real commands and the Tab Completer
https://dev.bukkit.org/projects/mycommand/pages/configuration-and-example
-
View User Profile
-
Send Message
Posted Aug 21, 2019Great plugin! Can you add $time option with color and bold formating for language file messages like it work in command create process? Please.
-
View User Profile
-
Send Message
Posted Aug 20, 2019Nice plugin!
I only have one problem, i want to sell in the merchant the playerhead of a player.
How do i do that?
I now have this:
Store:
command: /store
type: MERCHANT
merchant_title: '&1Welkom &6$player'
merchant_items:
- BELL:1<cost>GOLD_INGOT:5<cost>IRON_INGOT:1
- PLAYER_HEAD%$player:1<cost>DIAMOND:1
-
View User Profile
-
Send Message
Posted Aug 14, 2019Hi ivan
Is there any way to convert playerdatas from flatfile to mysql?
I currently use flatfile but I want to use mysql in the future to have more flexibility :)