-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
101 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# PluginAPI.removeEventListener(String eventName, Function callback, Boolean slow?) | ||
This method is used to add event listeners to the event name specified. | ||
|
||
## Arguments: | ||
|
||
### (String) eventName | ||
Type of event to remove the listener from. | ||
|
||
### (Function) callback | ||
The function to remove from the event listener array. | ||
|
||
### [Optional] (Boolean) slow | ||
Wether or not to use the functions definition rather than it's reference to look in the listener array. Much slower with it on. | ||
|
||
Example where it is not necessary: | ||
``` | ||
function myListener() { | ||
// idk | ||
} | ||
PluginAPI.addEventListener("update", myListener); | ||
PluginAPI.removeEventListener("update", myListener); | ||
``` | ||
|
||
Example where it is necessary: | ||
``` | ||
PluginAPI.addEventListener("update", function myListener() { | ||
// idk | ||
}); | ||
PluginAPI.removeEventListener("update", function myListener() { | ||
// idk | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Data | ||
|
||
Data is the parent of all other types of data, so all types of data share the `reload()` method. Reload is used to force reload the data in-game. | ||
Data is the parent of all other types of data, so all types of data share the `reload()` method. Reload is used to force reload the data in-game. | ||
Almost all data objects also have a `getRef()` method. `getRef()` is used to get the java object. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# NetworkData | ||
Represents the network handler. Has many built-in functions to easily send packets to the server.. | ||
|
||
Properties: | ||
- `doneLoadingTerrain`: Boolean | ||
- `currentServerMaxPlayers`: Integer | ||
|
||
Methods: | ||
- `sendPacketAnimation() : void` | ||
- `sendPacketEntityAction({entityRef: EntityRef, action: String, auxData: Integer}) : void` | ||
- `action` can be one of: `START_SNEAKING`, `STOP_SNEAKING`, `STOP_SLEEPING`, `START_SPRINTING`, `STOP_SPRINTING`, `RIDING_JUMP` or `OPEN_INVENTORY` | ||
- `sendPacketInput({strafeSpeed: Number, forwardSpeed: Number, jumping: Boolean, sneaking: Boolean}) : void` | ||
- `sendPacketCloseWindow({windowId: Integer}) : void` | ||
- `sendPacketClickWindow({windowId: Integer, slotId: Integer, usedButton: Integer, mode: Integer, clickedItemRef: ItemStackRef?, actionNumber: Short}) : void` | ||
- `sendPacketConfirmTransaction({windowId: Integer, uid: Short, accepted: Boolean}) : void` | ||
- `sendPacketKeepAlive({key: Integer}) : void` | ||
- `sendPacketChatMessage({messageIn: String}) : void` | ||
- `sendPacketUseEntity({entityRef: EntityRef, hitVec: Vec3}) : void` | ||
- `sendPacketUseEntity({entityRef: EntityRef, action: String}) : void` | ||
- `action` can be one of: `INTERACT`, `ATTACK` or `INTERACT_AT` | ||
- `sendPacketPlayer({isOnGround: Boolean}) : void` | ||
- `sendPacketPlayerDigging({action: String, pos: BlockPos, facing: String}) : void` | ||
- `action` can be one of: `START_DESTROY_BLOCK`, `ABORT_DESTROY_BLOCK`, `STOP_DESTROY_BLOCK`, `DROP_ALL_ITEMS`, `DROP_ITEM` or `RELEASE_USE_ITEM` | ||
- `facing` can be one of: `UP`, `DOWN`, `NORTH`, `SOUTH`, `EAST` or `WEST` | ||
- `sendPacketPlayerBlockPlacement({stackRef: ItemStackRef}) : void` | ||
- `sendPacketHeldItemChange({slotId: Integer}) : void` | ||
- `sendPacketCreativeInventoryAction({slotId: Integer, stackRef: ItemStackRef}) : void` | ||
- `sendPacketEnchantItem({windowId: Integer, button: Integer}) : void` | ||
- `sendPacketUpdateSign({pos: BlockPos, lines: String[]}) : void` | ||
- `sendPacketPlayerAbilities({capabilitiesRef: PlayerCapabilitiesRef}) : void` | ||
- `sendPacketTabComplete({msg: String}) : void` | ||
- `sendPacketTabComplete({msg: String, target: BlockPos}) : void` | ||
- `sendPacketClientSettings({lang: String, view: Integer, chatVisibility: String, enableColors: Boolean, modelPartFlags: Integer}) : void` | ||
- `chatVisibility` can be one of: `FULL`, `SYSTEM` or `HIDDEN` | ||
- `sendPacketClientStatus({status: String}) : void` | ||
- `status` can be one of: `PERFORM_RESPAWN`, `REQUEST_STATS` or `OPEN_INVENTORY_ACHIEVEMENT` | ||
- `sendPacketSpectate({uuid: String}) : void` | ||
- `sendPacketResourcePackStatus({hash: String, status: String}) : void` | ||
- `status` can be one of: `SUCCESSFULLY_LOADED`, `DECLINED`, `FAILED_DOWNLOAD` or `ACCEPTED` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters