Updated APIv5 (markdown)

Risto Lahtela 2019-03-24 20:12:47 +02:00
parent 5319756b1e
commit 060f0d254b
1 changed files with 9 additions and 2 deletions

@ -67,7 +67,9 @@ Example usage:
name* = "Your Plugin",
iconName = "cube"
iconFamily = Family.SOLID,
color = Color.NONE
color = Color.NONE,
updatePlayerDataOnLeave = false,
updateServerDataPeriodically = false
)
public class YourExtension implements DataExtension {}
```
@ -76,6 +78,8 @@ public class YourExtension implements DataExtension {}
- `iconName` - Icon names can be found from https://fontawesome.com/icons?d=gallery&m=free
- `iconFamily` - Icon family should match details on the site above
- `color` - Colors are available here *Link to be added*
- `updatePlayerDataOnLeave` - Provider methods about players will also be called when the player leaves the server. By default the player methods are called shortly after the player joins.
- `updateServerDataPeriodically` - Provider methods about server will also be called periodically. By default the server methods are called shortly after registering the `DataExtension`.
## 📏 Provider Annotations
@ -335,11 +339,14 @@ Example usage:
@BooleanProvider(..., conditionName="hasPet")
public boolean hasPet(UUID playerUUID) {...}
@Conditional("hasPet")
@Conditional("hasPet", negated = false)
@StringProvider(text = "Pet Name")
public String petName(UUID playerUUID) {...}
```
- `value` - Name of the condition
- `negated` - Require the condition to be `false` for this method to be called.
### `@InvalidateMethod`
**Speciality:** Removes old values from database if you decide to rename a method. The method name is used when storing the values, so this annotation exists to remove the old values.