CustomCommands  [1.8-1.16] icon

CustomCommands [1.8-1.16] -----

Create unlimited commands. do the impossible cool things. from server owner to server owners




Fixed some bugs.

P.S: Contact me if you can help with the wiki
----------, Jun 13, 2021

ADDED
- Custom commands in game edit commands! (/cuc edit)
- Cooldown bypass command.


FIXED
- Cooldown.
- Other bug fixes.

- Changed default commands.yml.
----------, May 1, 2021

- Added Command Conditions. add easy conditions to your command with placeholderapi support.

- Added Command Cooldown.

- Fixed bugs :)
----------, Feb 18, 2021

- Added new required arg suffix: message suffix.

- Fixed some bugs.
----------, Jan 3, 2021

Fixed bugs:
- Not checking for subcommands permission on executing.
- Plugin throwing an error if PlaceHolderAPI is not enabled/installed.
- Putting an alias that is the same as the command label will make the command not work, it will now remove this alias and log a warn.

New Features:
- Added an option in config.yml (Override_Other_Commands), that if set to true the plugin will reload and re-register commands after 5 seconds of server startup, overriding any other plugin commands.

- Now you can use the '!wait' feature/method in replyMessagess where previously you could only use it in ExecuteCommands.

- Moved the players.json to it's own folder so files can be more organaized.

Wiki is still being worked on.

Merry Christmas Everyone!
----------, Dec 27, 2020

Recoded the entire plugin, some features have been temporarily removed, and will be added later.

A github wiki will be available soon.
----------, Dec 26, 2020

Bug fixes:
- Now it doesn't allow you to interact if the item is clickable (e.g place command-item block etc.)

- Added 'ReplaceSpacesWith' to commands, everytime the config reader sees the value set for "ReplaceSpacesWith" in PERFORM COMMANDS, it will replace it by space ' '.

- Added the ability to make delays between Perform Commands executions such:
Code (YAML):
Commands :
 - "Say you performed the command!"
  - "!wait (200)"
  - "Say It's has been 10 seconds since the last time you performed this command ;-;"
  - "!wait (200)"
  - "Say It's has been 10 seconds since the last time you performed this command ;-;"
 
- Now the config will load/reload 4x faster (or even more!), thanks to
Leonhard for making LightingStorage.

Thanks for all the ratings and downloads <3.

----------, Jul 7, 2020

There were a lot of bugs in previous 1.1.3+ versions, even with default commands!

Now all has been fixed AND WITH 1.16 Support!
----------, Jul 1, 2020

Temporary Version until everything gets sorted out.
----------, Jun 30, 2020

Fixed bugs, apologies for the inconvenience
----------, Jun 30, 2020

Fixed the bug in 1.1.4
----------, Jun 30, 2020

Added 1.16 Support!
Enjoy!
----------, Jun 29, 2020

Thanks to @ quinnconnolly03 for reporting bugs.
The plugin should perform any command that is in the 'Commands' list in config, and if the command starts with '/' it performs it for the player, it wasn't working; but now it's fixed :D

Add the performCommand player method.

Also removed the massive unnecessary console spam.
----------, May 6, 2020

The plugin was quite expensive when it comes to performance, if you have a code for your custom command, it was reading the code each time player runs a command, which is a huge task if repeated much. i wasn't realizing that.

This update doesn't fix it completely, only for codes that doesn't contain any call to any of variable/variable definitions. now it reads them once and just repeat them to each player, without need to read it again.

Also, just realized that the examples in default commands.yml were not working, updated them and added one useful command.
----------, Apr 27, 2020

New Code System Format:

The difference between New and old code systems is:
  • Replaced '*' with 'x' for multiply.
  • Now when you need to use a variable value use vars*<var name> instead of <var name>.
  • now you'll need to use methods.getPlayer(), methods.getWorld(), methods.getFile() instead of getPlayer(), getWorld(), getFile().
  • If you want to use math in any argument you need to put ! before the arguments, example: player.setHealth(!5 x 2).
  • If you want to use methods in an arguments such as: 'player.getHealth' inside player.setHealth(). now you can't you need to make a variable with the value. example: 'var Number health = player.getHealth()', 'player.setHealth(!vars*health / 2)'.
  • In new code system, you can change the a variable value afterwards, example: 'var Number health = player.getHealth()', 'vars*health => 10'
Please update your files.
----------, Mar 24, 2020

Code variables are made like so:
var <Variable type> <Variable Name> = <Variable Value (Method)>

The variable type can be:
- Player (getPlayer(name))
- World (getWorld(name))
- File (getFile(name))
- String (text)
- Boolean (true/false)
- Number (integer/double)
- String list (["My", "String", "List"])

Variable name is the keyword which you need to put to represent the variable value. example:
- var World w = getWorld(world)
- w.setBlockType(player.getLocation, STONE, 0)
Where 'w' is the variable name, and 'World' is the variable name,
'getWorld(world)' is the value of this variable.

-Report Bugs in the support discord-
----------, Mar 4, 2020

Added commands:
- /cuc addSubCommands|addSubCmd|subcmd <Name> <Sub Commands (split with ',')>

- /cuc delete <Name>

- Fixed some bugs with sub commands.

(I know that it says 1.1.0 in the file name, 1.1.0 will be released soon)
----------, Mar 1, 2020

You can use the new sub commands system by just add a new section 'Sub_Commands' to your original normal command and remove all keys expect for aliases. like this:
Code (YAML):
 MyCommandGroup:
    Aliases
: [mcg ]
    Sub_Commands
:
      Cool_Message
:
        Aliases
: [ ]
        Usage
: ""
          # The time between each command execution.
          # Example: 10 Seconds.
          # Example2: 2 Minutes
          # Example3: 5 hours.
          # Example 4: 6 Days.
        Cooldown
: "0 seconds"
          #Set to null to make this commands allowed for everyone.
        Permission
: null
          # Put '/' before the command to make this command perform by the player, otherwise it will be performed from the console.
          # Placeholders: 1.{player}.
          # 2.{arg:<#>:[Type]} : valid types: player (reads the arg # as a player name),
          # number (reads the arg # as a number), boolean (reads the arg # as a boolean),
          # world (reads it as a world name), enum (see number 3).
          # (TO Do) 3. {arg:#:enum:["enum1", "enum2", "enum3"]}: reads the arg as an enum, if the enum list doesn't contains the arg# it throws an error message.
          # Note: arguments numbers starts from 0 and not 1. so for example if 'MyCommand MyPlayer' is performed, the 'MyPlayer' argument number is 0.
          # Note 2: put '*' to make this argument required. or don't put it and specify the replacement after the type or arg number. (see command 3).
        Commands
:
           - "give {player} diamond"
          #These will be sent when this command used as a reply.
        Reply_Messages
:
           - "&6&lCool Message &5&lfor cool people!!"
        Code
: [ ]
This will allows your to use command '/mcg cool_message'.
Please note that once the 'Sub_Commands' section is added to a command section, the plugin will read it as a command group that has subcommands.
----------, Feb 24, 2020

In the previous version, when creating a custom command by the command it generates "Replay_Messages" instead of "Reply_Messages".
In the new version it will automatically delete "Replay_Messages.

Check messages.yml for more information.
----------, Feb 21, 2020

  • setWorldBorderSize(<size>, [seconds]). seconds is the time in seconds in which the border grows or shrinks from the previous size to that being set.

  • setWorldBorderCeneter(center(location)) ->
    Sets the new border center.
  • setWorldBorderDamage(damage(number)) ->
    Sets the amount of damage a player takes when outside the border plus the border buffer.
  • setWorldBorderBuffer(blocks(number)) -> Sets the amount of blocks a player may safely be outside the border before taking damage.
  • setWorldBorderWarningDistance(distance(number, default is 5 blocks)) -> Sets the warning distance that causes the screen to be tinted red when the player is within the specified number of blocks from the border.
  • setWorldBorderWarningTime(time(number, default is 15 seconds)) -> Sets the warning time that causes the screen to be tinted red when a contracting border will reach the player within the specified time.
  • resetWorldBorder -> Resets the border to default values.
  • setGameState(reason, value) -> (Deprecated) see resource page for more info.
----------, Feb 21, 2020

Fixed some enchantments compatibility problems.
----------, Feb 19, 2020

- Now you can make any item clickable, with a command.
- Changed some commands aliases.
----------, Feb 9, 2020

Need Support?
[​IMG]

New Methods For World:
  • spawnFallingBlock(x, y, z, world, material, data) - spawns a falling block at this location.

  • setBlockType(x, y, z, world, material) - changes the block at this location's type.
  • setBlockData(x, y, z, world,data) - changes the block at this location's data.
New Methods For Player:
  • sendTitle(Title, subtitle) - displays a title and a sub title to this player.

  • sendToast(toast, <optional> icon (Material)) - Send a "toast" notification.
  • setItemCooldown(Item, seconds) - Set the given item for player on cooldown.
  • respawn() - Kills the player and respawn him.
----------, Feb 4, 2020

Now you can apply methods for any world you'd like!

+ Note: You can now either use (x, y, z, world) as a location or you can get the player location by doing (player.getLocation). Example:
You can either type 'spawnEntity(10, 50, 10, world, chicken)' or 'spawnEntity(player.getLocation, chicken).

Current World Methods:
  • spawnEntity(x, y, z, world, entity) - spawns any entity at this location.
  • generateTree(Location, treeType) - generates a natural tree at this location.
  • setAnimalSpawnLimit(limit(number)) - set the world animal spawn limit.

  • setAmbientSpawnLimit(limit(number)) - set the ambient spawn limit.
  • spawnParticle(Location, particle) - spawns any particle in this location.
  • createExplosion(Location, power) - creates a natural explosion by this power.
----------, Feb 1, 2020

Fixed some bugs when the first plugin run.

Added cooldown which is the time between each command executions.

You may need to update your configurations and adding 'Cooldown' to each command section.
----------, Jan 31, 2020

- You can now do custom codes whenever a custom command performed:
Only Player Methods For Now.
The variable 'player' represents the player who performed the command.
After 'player' variable you can type '.' then the method/statement.
Example: 'player.resetHealth()'. if there are any arguments for this method/statement you can put them inside the '(' and ')'.
Example: 'player.teleport(x, y, z, world)'

You can also use methods as an argument inside the '(' and ')':
'player.setHealth(player.getHealth * 2)'
for this case you don't have to type any '(' or ')'.

Current Methods:
  • player.teleport(x,y,z,world) - teleports the player to this location.
  • player.setHealth(number) - Sets the health of this player
  • player.getHealth() - Gets the health of this player.
  • player.setFlying(false/true) - Makes player fly forcefully.
  • player.setAllowFly(false/true) - Allow player to toggle fly.
  • player.setSpawnLocation(x, y, z, world) - Set the player spawn/bed location.
  • player.setGamemode(GameMode) - Changes the player gamemode's forcefully.
  • player.setSprinting(false/true) - Makes player sprint forcefully (without moving).
  • player.setFlySpeed(fly speed(< 1)) - Sets the player fly speed.
  • player.setWalkSpeed(walk speed (< 1))\ - Sets the player walk speed.
  • player.getWalkSpeed()
  • player.getFlySpeed()
----------, Jan 28, 2020

Resource Information
Author:
----------
Total Downloads: 17,151
First Release: Jan 25, 2020
Last Update: Jun 13, 2021
Category: ---------------
All-Time Rating:
29 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings