developers/Documentation
API Documentation
This page contains a list of functions and how to use them.
Functions
Overview
| name | arguments | return type | success return | error return | notice | example |
| addUser | Player player | boolean | true | false | Bukkit only | AccountAPI.addUser(player) |
| ProxiedPlayer player | BungeeCord only | AccountAPI.addUser(proxiedPlayer) | ||||
| String uuid | AccountAPI.addUser("069a79f444e94726a5befca90e38aaf5") | |||||
| String uuid, String name | AccountAPI.addUser("069a79f444e94726a5befca90e38aaf", "Notch") | |||||
| Player player, String password, boolean hashed | Bukkit only | AccountAPI.addUser(player, "Password as SHA-256 hash", true) | ||||
| ProxiedPlayer player, String password, boolean hashed | BungeeCord only | AccountAPI.addUser(player, "Password as plain text", false) | ||||
| String uuid, String password, boolean hashed | AccountAPI.addUser("069a79f444e94726a5befca90e38aaf", "Password as plain text", false) | |||||
| String uuid, String name, String password, boolean hashed | AccountAPI.addUser("069a79f444e94726a5befca90e38aaf", "Notch", "Password as SHA-256 hash", true) | |||||
| checkUser | Player player | boolean | true / false | false | Bukkit only | AccountAPI.checkUser(player) |
| ProxiedPlayer player | BungeeCord only | AccountAPI.checkUser(player) | ||||
| String uuid | AccountAPI.checkUser("069a79f444e94726a5befca90e38aaf") | |||||
| checkUserByName | String name | boolean | true / false | false | Deprecated | AccountAPI.checkUser("Notch") |
| getName | Player player | String | player name | null | Bukkit only | AccountAPI.getName(player) |
| ProxiedPlayer player | BungeeCord only | AccountAPI.getName(player) | ||||
| String uuid | AccountAPI.getName("069a79f444e94726a5befca90e38aaf") | |||||
| updateName | Player player | boolean | true | false | Bukkit only | AccountAPI.updateName(player) |
| ProxiedPlayer player | BungeeCord only | AccountAPI.updateName(player) | ||||
| setName | Player player, String newName | boolean | true | false | Bukkit only | AccountAPI.setName(player, "A new username") |
| ProxiedPlayer player, String newName | BungeeCord only | AccountAPI.setName(player, "A new username") | ||||
| String uuid, String newName | AccountAPI.setName("069a79f444e94726a5befca90e38aaf", "A new username") | |||||
| getPasswordHash | Player player | String | password hash | null | Bukkit only | AccountAPI.getPasswordHash(player) |
| ProxiedPlayer player | BungeeCord only | AccountAPI.getPasswordHash(player) | ||||
| String uuid | AccountAPI.getPasswordHash("069a79f444e94726a5befca90e38aaf") | |||||
| getPasswordHashByName | String name | String | password hash | null | Deprecated | AccountAPI.getPasswordHash("Notch") |
| setPassword | Player player, String password, boolean hashed | boolean | true | false | Bukkit only | AccountAPI.setPassword(player, "Password as plain text", false) |
| ProxiedPlayer player, String password, boolean hashed | BungeeCord only | AccountAPI.setPassword(player, "Password as SHA-256 hash", true) | ||||
| String uuid, String password, boolean hashed | AccountAPI.setPassword("069a79f444e94726a5befca90e38aaf", "Password as SHA-256 hash", true) | |||||
| deleteUser | Player player | boolean | true | false | Bukkit only | AccountAPI.deleteUser(player) |
| ProxiedPlayer player | BungeeCord only | AccountAPI.deleteUser(player) | ||||
| String uuid | AccountAPI.deleteUser("069a79f444e94726a5befca90e38aaf") |
Definition
- name
- The function's name. Use AccountAPI.name
- arguments
- The arguments required for the function (Datatype and name)
- return type
- The datatype that will be returned
- success return
- Returned Value on success
- error return
- Returned Value on MySQL error
- notice
- Bukkit only - Works only when using the plugin on a Bukkit/Spigot server
- BungeeCord only - Works only when using the plugin on a BungeeCord server
- (empty) - Works on Bukkit/Spigot and BungeeCord
- Deprecated - You shouldn't use this, there's a better way to achieve the same (for example using player's UUIDs instead of their names)
Detailed description
Coming soon...
Comments