MyCommand v5.0.0

Details

  • Filename
    MyCommand.jar
  • Uploaded by
  • Uploaded
    Feb 4, 2014
  • Size
    156.99 KB
  • Downloads
    3,534
  • MD5
    94cdcd3a26cfd1dfd66d02898263a537

Supported Bukkit Versions

  • 1.7.4
  • 1.7.2
  • 1.6.4

Changelog

MyCommand Version 5.0.0


Summary :
New features

  • Rewrited some of the main plugin code.
  • It's not more requisite put the commands in the config by ascending order
  • Now it's possible register real commands!Also with customizable TabCompleter.
  • Added some Player API utilizzable in RUN_COMMAND Type.
  • Added "permission-required" command field
  • Added "allowed_worlds" command field
  • Added "executefor" command field
  • Added MetricsLite
  • Added Cooldown command type
  • Added the permission mycommand.bypass.cooldown
  • Added Per world commands in RUN_COMMAND Type.Put $world=%world_name% as a prefix of your command
  • Added /mycmd-signset "mycommand.sign.set"
  • Debug command /mycmd register <commandname>
  • Minor changes.


Fixed or updated:

  • Revisited all plugin commands.
  • $multiargs commands now works without any argument typed.
  • RUN_COMMAND now support 9 arguments. ($arg1 $arg2 ... $arg9)


Breaking changes :

  • Rewrited the config.yml.Delete your old file and lets generate new from the plugin.
  • Renamed Addtimer command type in Warmup. Update your old "ADDTIMER" commands in "WARMUP".
  • Changed the permission mycommand.bypass.timer in mycommand.bypass.warmup
  • Removed ignoredworlds in the main config file,and re-added "per command"
  • (Only ItemSet) Changed $targetplayer argument in $targetentity (Now works also on Mobs)
  • If you have options.commandsnumber in you commands.yml config file,remove it.

Examples :


Now it's not more requisite put the commands in the config by ascending order.For example :

Instead of :

'1':
  command: /gm
  type: ALIAS

You can rename it :

'gamemode':
  command: /gm
  type: ALIAS
  alias: /gamemode

How register commands?
put "registered: true" below the command you want register.
(For now the RealCommand it's an empty command.All the code still running in the preprocess event.In the future i see to make it better.)

Example :

'command_name':
  command: /greets 
  type: RUN_COMMAND
  runcmd:
  - /say $arg1
  registered: true
  tab_completer:
  - Hi
  - Hello!

How to use permission-required :

'yourcommand':
  command: /lol
  type: TEXT
  permission-required: false

How to use allowed_worlds: :
You can use the "error-message" line for put an custom error.

'onlyinthenether':
  command: /onlynether
  type: TEXT
  text:
  - "&cYea,The Nether!"
  allowed_worlds:
  - world_nether
  error-message: "This command is not accessible from this world"

How to use "$world=%world_name%" in RUN_COMMAND Type :

'per_world_commands':
  command: /perworldcommand
  type: RUN_COMMAND
  runcmd:
  - "$world=%world%/me This command will be performed only if you are in the world"
  - "$world=%world_nether%/me And this only if you are in the nether"
  permission-required: false

How to use "executefor" command field :

Supported types :

SENDER (Execute the command only for the sender)
ONLINE_PLAYERS (Execute the command for every player online)
WORLD_PLAYERS (Execute the command for every player in the same world of the sender)

'executefortest':
  command: /executeforall
  type: RUN_CONSOLE
  executefor: ONLINE_PLAYERS
  runcmd
  - "/tp $player 0 64 0"
  permission-required: false


Basically works with every command type,exempt ADD_PERMISSION
(By Default every commands it's on SENDER type) (maybe,some of this options can made some loops if used wrongly.)

How to use "Player API" in RUN_COMMAND Type. :
Example of use :

heal:
  command: /heal
  type: RUN_COMMAND
  runcmd:
  - '%PlayerOptions%setHealth: 20'
  - '%PlayerOptions%setFoodLevel: 20'
  - '%PlayerOptions%sendMessage: &aHealed!'

or

  runcmd:
  - '%PlayerOptions%clearInventory: true'
  - '%PlayerOptions%teleport: world:0.0:100.0:0.0'
  - '%PlayerOptions%setItemInHand: STONE_SWORD:1'

Options available :

Boolean (can be true or false)

setAllowFlight , setBanned , setCanPickupItems , setCustomNameVisible , setFlying , setOp , setSneaking , setSprinting , setWhitelisted

(only true)

leaveVehicle , resetMaxHealth , closeInventory , clearInventory

String (can be text)

setCustomName , setDisplayName , setGameMode , setPlayerListName , kickPlayer , teleport , setBedSpawnLocation , setCompassTarget , setItemInHand , setItemOnCursor , chat , sendMessage

Integer,Double or Float (can be an number)

setExhaustion , setExp , setFallDistance , setFireTicks , setFlySpeed , setHealth , setFoodLevel ,setLastDamage , setLevel , setMaxHealth , setMaximumAir , setNoDamageTicks , setRemainingAir , setSaturation , setTotalExperience , giveExp , giveExpLevels , damage

For now teleport , setBedSpawnLocation , setCompassTarget works in this way :

- '%PlayerOptions%teleport: world_name:X:Y:Z'

Instead,setItemInHand , setItemOnCursor in this way

- '%PlayerOptions%setItemInHand: MATERIAL_NAME:AMOUNT'