Configuration/Package

What is a Package ?

Package is a way to describe a kit of item you can sell. Formely, you were only able to sell items by using the Bukkit's material name like "DIAMOND_LEGGINGS". That's work fine with most items but not all, and you cannot sell more than 1 item once, even arrows ! And you cannot sell enchanted items or custom items. You are not able to sell items with a special durability/data. Moreover, if you are not english speaking you still have to use the english bukkit's material name, and there is no way to name items whatever you want to.

Package system solve all these problems.

How to set up a package

You have 2 way to set packages.

In game

You can use the "/tribu package" command to manage packages of a level, but you can use the shortcut "/tribu pck" First, load your level. Then you can "list", "open", "create", "close", or "remove" a package by putting one of these term after "/tribu pck" (eg. : /tribu pck list )

So, first, create a package with "/tribu pck create Name". You can choose the name you want, but make sure it fits on a sign.

Then, there is 2 way to add an item.

/tribu pck add *id* *subid* *amount*

(replace *id* *subid* *amount* by what you want) subid and amount are not mandatory, (defaults 0 and 1) But this command is not able to add enchantments.

So there is another command, much more easier, and working with enchantments. First, take the desired item in your hand then do

/tribu pck add this *amount*

(replace *amount* by what you want). Amount is not mandatory (default 1)

These 2 commands add an item to the package.

You can use /tribu pck del *id* *subid* to remove an item.

When you're done do /tribu pck close and /tribu save to close the package and save it in your level file.

As said, these packages are in the level file ! (Read below to understand why I'm indicating that)

Config file

You can also save your packages in config file. Don't forget that you config file can be the main config file "config.yml" or a world config file ("per-world/world_name.yml") or a level config file ("per-level/level_name.yml"). Open one of these file.

You may see the "DefaultPackages" node, if not, just create it :

# .... your config
DefaultPackages:

This node is a list of packages to add to levels (every levels if it's in config.yml, every levels of the world if it's a world config file, or just the current level if it's a level config file).

Let say you want a package with a bow enchanted with 2 enchantments and arrows, it would be this.

We'll name the package "LongBow"

DefaultPackages:
  LongBow:

Then, we add the arrows. As item name, you can put whatever you want, this is not taken in account by the plugin.

DefaultPackages:
  LongBow:
    Arrows:
      id: 262
      amount: 64

And now, we add the enchanted bow.

DefaultPackages:
  LongBow:
    Bow:
      id: 261
      enchantmentsId:
      - 48
      - 49
      enchantmentsLevel:
      - 5
      - 2
    Arrows:
      id: 262
      amount: 64

In item node, you can also use the "subid"/"data"/"durability" (one of these). By default it's 0. You can use "amount", defaulting to 1. Of course, you must set the "id" node.

Here is an example of packages.

DefaultPackages:  
  Armor:
    Helmet:
      id: 314
      enchantmentsId:
      - 5
      - 6
      enchantmentsLevel:
      - 3
      - 1
    Chestplate:
      id: 315
      enchantmentsId:
      - 1
      - 0
      enchantmentsLevel:
      - 3
      - 4
    Leggings:
      id: 316
      enchantmentsId:
      - 3
      - 4
      enchantmentsLevel:
      - 4
      - 4
    Boots:
      id: 317
      enchantmentsId:
      - 2
      enchantmentsLevel:
      - 4
  Sword:
    Sword:
      id: 267
      enchantmentsId:
      - 16
      enchantmentsLevel:
      - 1
  Blade:
    Sword:
      id: 267
      enchantmentsId:
      - 16
      - 17
      enchantmentsLevel:
      - 3
      - 3
  Fire_Blade:
    Sword:
      id: 267
      enchantmentsId:
      - 16
      - 17
      - 20
      enchantmentsLevel:
      - 5
      - 5
      - 2
  Bow:
    Bow:
      id: 261
      enchantmentsId:
      - 48
      enchantmentsLevel:
      - 2
    Arrows:
      id: 262
      amount: 64
  LongBow:
    Bow:
      id: 261
      enchantmentsId:
      - 48
      - 49
      enchantmentsLevel:
      - 5
      - 2
    Arrows:
      id: 262
      amount: 64

If you well understood, there is 6 packages. First is a complete armor, then 3 enchanted sword and 2 enchanted bows.

Buying a package

To buy a package you have to use the "Shop Sign", use the package name. Same rules apply, if you're package name have a "_" you can split the name on 2 lines.

For example

Buy
Fire
Blade
$150

Comments

Posts Quoted:
Reply
Clear All Quotes