From c58eda983a33bb2c43bb1372b1e69eef01737860 Mon Sep 17 00:00:00 2001 From: games647 Date: Thu, 14 May 2020 13:41:32 +0200 Subject: [PATCH] Fix parsing of placeholder status Fixes #341 --- README.md | 11 ++++++++- .../fastlogin/bukkit/FastLoginBukkit.java | 3 +-- .../fastlogin/bukkit/PremiumPlaceholder.java | 23 ++++++++----------- .../fastlogin/core/PremiumStatus.java | 16 ++++++++++--- .../games647/fastlogin/core/RateLimiter.java | 2 +- 5 files changed, 34 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 1edb60b5..da13cf37 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,15 @@ https://ci.codemc.org/job/Games647/job/FastLogin/changes fastlogin.command.premium.other fastlogin.command.cracked.other +## Placeholder + +This plugin supports `PlaceholderAPI` on `Spigot`. It exports the following variable +`%fastlogin_status%`. In BungeeCord environments, the status of a player will be delivered with a delay after the player +already successful joined the server. This takes about a couple of milliseconds. In this case the value +will be `Unknown`. + +Possible values: `Premium`, `Cracked`, `Unknown` + ## Requirements * Plugin: @@ -59,7 +68,7 @@ https://ci.codemc.org/job/Games647/job/FastLogin/changes * [ProtocolSupport](https://www.spigotmc.org/resources/protocolsupport.7201/) * [Spigot](https://www.spigotmc.org) 1.8.8+ * Java 8+ -* Run Spigot and/or BungeeCord/Waterfall in offline mode (see server.properties or config.yml) +* Run Spigot (or a fork e.g. Paper) and/or BungeeCord (or a fork e.g. Waterfall) in offline mode * An auth plugin. Supported plugins ### Bukkit/Spigot/Paper diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/FastLoginBukkit.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/FastLoginBukkit.java index f772f483..90f2438c 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/FastLoginBukkit.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/FastLoginBukkit.java @@ -89,8 +89,7 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin