craft-ball/HowTo Setup config.yml

Hotwo Setup config.yml

To install the plugin you'll only have to copy CraftBall.jar to your plugins folder. After startup it will create a plugin folder (/plugins/CraftBall) and in there it will put the default config.yml, unless it is already present.


This is how config.yml looks like, there's an extra copy of this in the package:

version: 1.1
fields:
    -
        name: field1
        world: world
        region:
            - 314,66
            - 330,66
            - 330,84
            - 314,84
        region-y: 78
        ball-item: 341
        enable-kick: true
        horizontal-kick-power: 0.8
        vertical-kick-power: 0.1
        enable-throw: true
        throw-power: 0.5
        pickup-delay: 20

The first two key's "version" and "fields" should be left alone. You can add fields by starting with another dash "-" and the field parameters on a new line.



        name: field1

The name of the field, not really used yet, except for displaying. Any name is valid. When updating from older version, the node names of the fields will be used here.



        world: world

The world the field in. This must be a valid world name, else the first world in the list will be used.



        region:
            - 314,66
            - 330,66
            - 330,84
            - 314,84

The region contains a list of points made of an x and z coordinate (x,z). These points will 'connect' and together will form a polygon (in this case a rectangle), which defines the horizontal layout of the field.

In this example the field is a rectangle: x(north)=314, x(south)=339, z(east)=66, z(west)=84.

If you want to know what your coordinates are when you are ingame, just press f3 for the debug screen and you can see your x, y and z coordinate (x = north-south y= up-down z=east-west).



         region-y: 78

Defines the y coordinate, or the height of the floor. The field will be set up between this coordinate and $(field-height) blocks above it (by default 4 blocks)



The remaining options are:

  • ball-item: The item id of the ball object (341 is a slime ball)
  • enable-kick: Whether to allow kicking for this field
  • horizontal-kick-power: The initial horizontal velocity when kicking
  • vertical-kick-power: The initial vertical velocity when kicking
  • enable-throw: Whether to enable the throw speed modifier for this field
  • throw-power: The initial velocity when throwing
  • pickup-delay: The delay before an item can be picked up (kicked) after throwing, in server ticks (20 ticks per second)

Not in example:

  • field-height: The height of the field (default: 4)
  • enable-fire: Item will be on fire when kicked/thrown

Back to Main


Comments

Posts Quoted:
Reply
Clear All Quotes