Using Built-in Handlers
MoreMaterials 2.0 includes the following handlers, with the following configuration items:
Consume
- consumeItem: true/false [boolean]
- playerFeedback: true/false [boolean]
- healthChange: 0-20 [integer]
- foodChange: 0-20 [integer]
- oxygenChange: 0-300 [integer]
- itemName: "String Name for messages"
- itemType: "Food" [see below for better explaination]
- additionalMessage: "Long string message"
The itemTypes that are currently configured:
- Food
This is a permissions based handler, users will require: MoreMaterials.handlers.consume in order to utilize this.
Below is an example of the Consume handler being used within a YML.
Handlers: HoldRightClick: - Name: "Consume" consumeItem: true playerFeedback: true healthChange: 0 foodChange: 1 oxygenChange: 0 itemName: "a turnip" itemType: "Food" additionalMessage: "There was not a lot of taste to that."
Give
- showMessage: true/false [boolean]
- quantity: 1-64 [integer]
- itemName: "String Name of Item or Block"
- message: "Message to display when giving an item"
This is a permissions based handler, users will require: MoreMaterials.handlers.give in order to utilize this.
Below is an example of the Consume handler being used within a YML.
Handlers: HoldRightClick: - Name: "Give" quantity: 1 message: "Hello" itemName: "stick"
Fireball
- yieldsize: 1-100 [integer] (4 = TNT)
- causefire: true/false [boolean]
This is a permissions based handler, users will require: MoreMaterials.handlers.fireball in order to utilize this. Below is an example of the Fireball handler being used within a YML.
Handlers: HoldRightClick: - Name: "FireBall" yieldsize: 7 causefire: true
Bomb
- yieldsize: 1-100 [integer] (4 = TNT)
- causefire: true/false [boolean]
This is a permissions based handler, users will require: MoreMaterials.handlers.bomb in order to utilize this.
Below is an example of the Consume handler being used within a YML.
Handlers: HoldRightClick: - Name: "Bomb" bombsize: 50 setfire: true delay: 4 showmessage: true message: "Gonna blow!"
Heal
- healAmount: 1- 20 [integer]
This is a permissions based handler, users will require: MoreMaterials.handlers.heal in order to utilize this.
Below is an example of the Consume handler being used within a YML.
Handlers: RightClickEntity: - Name: "Heal" healAmount: 1
Lightning
This is a permissions based handler, users will require: MoreMaterials.handlers.lightning in order to utilize this.
Below is an example of the Consume handler being used within a YML.
Handlers: HoldRightClick: - Name: "Lightning"
Item Return
- showMessage: true/false [boolean]
- message: "Message to display when giving an item"
- cancelDrop: true/false [boolean] {cancels the item stack dropping of the custom block you just broke}
- itemName-a: "String Name of Item or Block"
- quantity-a: 1-64 [integer]
- itemName-b: "String Name of Item or Block"
- quantity-b: 1-64 [integer]
- itemName-c: "String Name of Item or Block"
- quantity-c: 1-64 [integer]
This is a permissions based handler, users will require: MoreMaterials.handlers.itemreturn in order to utilize this.
Below is an example of the Consume handler being used within a YML.
Handlers: BlockBreak: - Name: "ItemReturn" cancelDrop: true message: "Additional materials returned to you." itemName-a: "bucket" quantity-a: 1 itemName-b: "stick" quantity-b: 1 itemName-c: "wood_plank" quantity-c: 1
Chest
This is a permissions based handler, users will require: MoreMaterials.handlers.chest in order to utilize this. Below is an example of the Chest handler being used within a YML.
Handlers: RightClick: - Name: "Chest"
Chunk Regenerate
This is a permissions based handler, users will require: MoreMaterials.handlers.chunkregen in order to utilize this. Below is an example of the Chunk Regenerate handler being used within a YML.
Handlers: RightClick: - Name: "ChunkRegenerate"
Comments