You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[Example Plugin #1 - A simple extension to Minecraft.](#example-plugin-1---a-simple-extension-to-minecraft)
451
-
*[Usage:](#usage-4)
452
-
*[Example Plugin #2 - Making extensions available for all players.](#example-plugin-2---making-extensions-available-for-all-players)
453
453
*[Usage:](#usage-5)
454
-
*[Example Plugin #3 - Limiting use of commands to operators only.](#example-plugin-3---limiting-use-of-commands-to-operators-only)
454
+
*[Example Plugin #2 - Making extensions available for all players.](#example-plugin-2---making-extensions-available-for-all-players)
455
455
*[Usage:](#usage-6)
456
-
*[Example Plugin #4 - Using parameters in commands.](#example-plugin-4---using-parameters-in-commands)
456
+
*[Example Plugin #3 - Limiting use of commands to operators only.](#example-plugin-3---limiting-use-of-commands-to-operators-only)
457
457
*[Usage:](#usage-7)
458
-
*[Example Plugin #5 - Re-use - Using your own and others modules.](#example-plugin-5---re-use---using-your-own-and-others-modules)
458
+
*[Example Plugin #4 - Using parameters in commands.](#example-plugin-4---using-parameters-in-commands)
459
459
*[Usage:](#usage-8)
460
-
*[Example Plugin #6 - Re-use - Using 'utils' to get Player objects.](#example-plugin-6---re-use---using-utils-to-get-player-objects)
460
+
*[Example Plugin #5 - Re-use - Using your own and others modules.](#example-plugin-5---re-use---using-your-own-and-others-modules)
461
461
*[Usage:](#usage-9)
462
+
*[Example Plugin #6 - Re-use - Using 'utils' to get Player objects.](#example-plugin-6---re-use---using-utils-to-get-player-objects)
463
+
*[Usage:](#usage-10)
462
464
*[Example Plugin #7 - Listening for events, Greet players when they join the game.](#example-plugin-7---listening-for-events-greet-players-when-they-join-the-game)
463
465
*[Arrows Plugin](#arrows-plugin)
464
-
*[Usage:](#usage-10)
466
+
*[Usage:](#usage-11)
465
467
*[Spawn Plugin](#spawn-plugin)
466
-
*[Usage](#usage-11)
468
+
*[Usage](#usage-12)
467
469
*[alias Plugin](#alias-plugin)
468
470
*[Examples](#examples-2)
469
471
*[Commando Plugin](#commando-plugin)
@@ -483,7 +485,9 @@ Walter Higgins
483
485
*[Rules](#rules)
484
486
*[Gameplay Mechanics](#gameplay-mechanics)
485
487
*[Items module](#items-module)
486
-
*[Usage](#usage-12)
488
+
*[Usage](#usage-13)
489
+
*[Entities module](#entities-module)
490
+
*[Usage](#usage-14)
487
491
488
492
## Modules in Scriptcraft
489
493
@@ -4854,6 +4858,23 @@ The callback function as well as being bound to an object with the above propert
4854
4858
4855
4859
The `value` parameter will be the same as `this.value`, the `repeat` parameter will be the same as `this.repeat` and so on.
4856
4860
4861
+
## Lightning module
4862
+
4863
+
Causes a bolt of lightning to strike.
4864
+
4865
+
### Usage
4866
+
```javascript
4867
+
// strike lightning wherever a player's arrow lands
4868
+
var lightning =require('lightning');
4869
+
events.projectileHit( function( event ){
4870
+
if ( entities.arrow( event.projectile ) // it's an arrow
4871
+
&&entities.player( event.projectile.owner ) // it was shot by a player
4872
+
) {
4873
+
lightning( event.projectile ); // strike lightning at the arrow location
4874
+
}
4875
+
});
4876
+
```
4877
+
4857
4878
## The recipes module
4858
4879
4859
4880
The Recipes module provides convenience functions for adding and removing recipes
@@ -6695,3 +6716,84 @@ The following functions are provided:
6695
6716
*zombieHead()
6696
6717
6697
6718
***/
6719
+
/*********************
6720
+
## Entities module
6721
+
The Entities module provides a suite of functions - one for each possible entity type.
6722
+
6723
+
### Usage
6724
+
6725
+
entities.zombie(); // returns a canaryMod/Bukkit EntityType.ZOMBIE enum value
6726
+
entities.zombie( mob ); // compares the entity's type to a zombie, returns true if mob type is zombie, false otherwise
6727
+
entities.player( self ); // at the in-game prompt this should return true (compares self to a player entity type)
6728
+
entities.rabbit( self ); // at the in-game prompt this should return false (compares self to a rabbit entity type)
0 commit comments