From cd4403865c754ffb1737c5b4e24abf30441915fa Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Tue, 26 Nov 2019 00:04:03 +0100 Subject: [PATCH] Fix wrong links and api information (#24) --- Command-Usage:-Parent.md | 3 +-- Command-Usage:-Permission.md | 3 +-- Developer-API.md | 8 ++++---- Developer-API:-Usage.md | 14 +++++++------- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Command-Usage:-Parent.md b/Command-Usage:-Parent.md index 42331f3..8acc160 100644 --- a/Command-Usage:-Parent.md +++ b/Command-Usage:-Parent.md @@ -73,8 +73,7 @@ ___ * `[temporary modifier]` - how the temporary permission should be applied * `[context...]` - the [contexts](https://github.com/lucko/LuckPerms/wiki/Context) to add the group in -Adds a parent to a user/group temporarily. Duration should either be a time period, or a unix timestamp when the permission will expire. e.g. "3d13h45m" will set the permission to expire in 3 days, 13 hours and 45 minutes time. "1482694200" will set the permission to expire at 7:30PM on 25th December 2016. -LuckPerms uses a format for the relative time similar to the [SimpleDateFormat](https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html) used in java. I.e. `1M` would be one month while `1m` would be one minute. +Adds a parent to a user/group temporarily. Duration should either be a time period, or a unix timestamp when the permission will expire. e.g. "1mo3d13h45m" will set the permission to expire in 1 month, 3 days, 13 hours and 45 minutes time, while "1482694200" will set the permission to expire at 7:30PM on 25th December 2016. The "temporary modifier" argument allows you to specify how the permission should be accumulated. You can pick between 3 different options. diff --git a/Command-Usage:-Permission.md b/Command-Usage:-Permission.md index a6e52e4..c5079cf 100644 --- a/Command-Usage:-Permission.md +++ b/Command-Usage:-Permission.md @@ -54,8 +54,7 @@ ___ * `[temporary modifier]` - how the temporary permission should be applied * `[context...]` - the [contexts](https://github.com/lucko/LuckPerms/wiki/Context) to set the permission in -Sets a permission temporarily for a user/group. Providing a value of "false" will negate the permission. Duration should either be a time period, or a unix timestamp when the permission will expire. e.g. "3d13h45m" will set the permission to expire in 3 days, 13 hours and 45 minutes time. "1482694200" will set the permission to expire at 7:30PM on 25th December 2016. -LuckPerms uses a format for the relative time similar to the [SimpleDateFormat](https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html) used in java. F.e. is `1M` one month while `1m` is one minute. +Sets a permission temporarily for a user/group. Providing a value of "false" will negate the permission. Duration should either be a time period, or a unix timestamp when the permission will expire. e.g. "1mo3d13h45m" will set the permission to expire in 1 month, 3 days, 13 hours and 45 minutes time, while "1482694200" will set the permission to expire at 7:30PM on 25th December 2016. The "temporary modifier" argument allows you to specify how the permission should be accumulated. You can pick between 3 different options. diff --git a/Developer-API.md b/Developer-API.md index abf5ba7..9a05b2b 100644 --- a/Developer-API.md +++ b/Developer-API.md @@ -49,7 +49,7 @@ If you're using Maven, simply add this to the `dependencies` section of your POM net.luckperms - luckperms-api + api 5.0 provided @@ -66,7 +66,7 @@ repositories { } dependencies { - compile 'net.luckperms:luckperms-api:5.0' + compile 'net.luckperms:api:5.0' } ``` @@ -76,7 +76,7 @@ dependencies { If you want to manually add the API dependency to your classpath, you can obtain the jar by: -1. Navigating to [`https://repo1.maven.org/maven2/net/luckperms/luckperms-api/`](https://repo1.maven.org/maven2/net/luckperms/luckperms-api/) +1. Navigating to [`https://repo1.maven.org/maven2/net/luckperms/api/`](https://repo1.maven.org/maven2/net/luckperms/api/) 2. Selecting the version you wish to use 3. Downloading the jar titled `luckperms-api-x.x.jar` @@ -142,7 +142,7 @@ Now you've added the API classes to your project, and obtained an instance of th * Some methods are not "main thread friendly", meaning if they are called from the main Minecraft Server thread, the server will lag. * This is because many methods conduct I/O with either the file system or the network. -* In most cases, these methods return [CompletableFuture](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html)s. +* In most cases, these methods return [CompletableFutures](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html). * Futures can be an initially complex paradigm for some users - however, it is crucial that you have at least a basic understanding of how they work before attempting to use them. * As a general rule, it is advised that if it's convenient to do so, you conduct as much work with the API as possible within async scheduler tasks. Some methods don't return futures, but may still involve a number of relatively complex computations. diff --git a/Developer-API:-Usage.md b/Developer-API:-Usage.md index 34492b3..a640a28 100644 --- a/Developer-API:-Usage.md +++ b/Developer-API:-Usage.md @@ -610,17 +610,17 @@ ___ ### Listening to LuckPerms events -All event interfaces can be found in the [`me.lucko.luckperms.api.event`](https://github.com/lucko/LuckPerms/tree/master/api/src/main/java/me/lucko/luckperms/api/event) package. They all extend [`LuckPermsEvent`](https://github.com/lucko/LuckPerms/blob/master/api/src/main/java/me/lucko/luckperms/api/event/LuckPermsEvent.java). +All event interfaces can be found in the [`net.luckperms.api.event`](https://github.com/lucko/LuckPerms/tree/master/api/src/main/java/net/luckperms/api/event) package. They all extend [`LuckPermsEvent`](https://github.com/lucko/LuckPerms/blob/master/api/src/main/java/net/luckperms/api/event/LuckPermsEvent.java). -To listen to events, you need to obtain the [`EventBus`](https://github.com/lucko/LuckPerms/blob/master/api/src/main/java/me/lucko/luckperms/api/event/EventBus.java) instance, using `LuckPermsApi#getEventBus`. +To listen to events, you need to obtain the [`EventBus`](https://github.com/lucko/LuckPerms/blob/master/api/src/main/java/net/luckperms/api/event/EventBus.java) instance, using `LuckPermsApi#getEventBus`. It's usually a good idea to create a separate class for your listeners. Here's a short example class you can reference. ```java -import me.lucko.luckperms.api.event.EventBus; -import me.lucko.luckperms.api.event.log.LogPublishEvent; -import me.lucko.luckperms.api.event.user.UserLoadEvent; -import me.lucko.luckperms.api.event.user.track.UserPromoteEvent; +import net.luckperms.api.event.EventBus; +import net.luckperms.api.event.log.LogPublishEvent; +import net.luckperms.api.event.user.UserLoadEvent; +import net.luckperms.api.event.user.track.UserPromoteEvent; public class TestListener { private final MyPlugin plugin; @@ -660,4 +660,4 @@ public class TestListener { } ``` -`EventBus#subscribe` returns an [`EventHandler`](https://github.com/lucko/LuckPerms/blob/master/api/src/main/java/me/lucko/luckperms/api/event/EventHandler.java) instance, which can be used to unregister the listener when your plugin disables. \ No newline at end of file +`EventBus#subscribe` returns an [`EventHandler`](https://github.com/lucko/LuckPerms/blob/master/api/src/main/java/net/luckperms/api/event/EventHandler.java) instance, which can be used to unregister the listener when your plugin disables.