From d9c89e1dc68552cd9eb3f301223cf99f0a8b082e Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Mon, 10 Jun 2024 06:15:48 +0800 Subject: [PATCH 01/51] Remove locale data from locale map when player quit to save mem --- src/main/java/fr/xephi/authme/listener/PlayerListener.java | 7 +++++++ src/main/java/fr/xephi/authme/util/message/I18NUtils.java | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/src/main/java/fr/xephi/authme/listener/PlayerListener.java b/src/main/java/fr/xephi/authme/listener/PlayerListener.java index e435b9c2d..9b8a4525c 100644 --- a/src/main/java/fr/xephi/authme/listener/PlayerListener.java +++ b/src/main/java/fr/xephi/authme/listener/PlayerListener.java @@ -16,9 +16,11 @@ import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.SpawnLoader; import fr.xephi.authme.settings.properties.HooksSettings; +import fr.xephi.authme.settings.properties.PluginSettings; import fr.xephi.authme.settings.properties.RegistrationSettings; import fr.xephi.authme.settings.properties.RestrictionSettings; import fr.xephi.authme.util.TeleportUtils; +import fr.xephi.authme.util.message.I18NUtils; import fr.xephi.authme.util.message.MiniMessageUtils; import org.bukkit.ChatColor; import org.bukkit.Location; @@ -248,6 +250,11 @@ public void onPlayerQuit(PlayerQuitEvent event) { } } + // Remove data from locale map when player quit + if (settings.getProperty(PluginSettings.I18N_MESSAGES)) { + I18NUtils.removeLocale(player.getUniqueId()); + } + if (antiBotService.wasPlayerKicked(player.getName())) { return; } diff --git a/src/main/java/fr/xephi/authme/util/message/I18NUtils.java b/src/main/java/fr/xephi/authme/util/message/I18NUtils.java index ff68b5abb..da1d6769b 100644 --- a/src/main/java/fr/xephi/authme/util/message/I18NUtils.java +++ b/src/main/java/fr/xephi/authme/util/message/I18NUtils.java @@ -60,6 +60,10 @@ public static void addLocale(UUID uuid, String locale) { PLAYER_LOCALE.put(uuid, locale); } + public static void removeLocale(UUID uuid) { + PLAYER_LOCALE.remove(uuid); + } + /** * Returns the AuthMe messages file language code, by given locale and settings. * Dreeam - Hard mapping, based on mc1.20.6, 5/29/2024 From 0fcc45039d64644241bf6181b904fd0dce3c025b Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Tue, 11 Jun 2024 07:28:13 +0800 Subject: [PATCH 02/51] Add openInventory method to API --- .../java/fr/xephi/authme/api/v3/AuthMeApi.java | 17 +++++++++++++++++ .../xephi/authme/listener/PlayerListener.java | 18 +++++++++++++++++- .../fr/xephi/authme/service/BukkitService.java | 6 +++++- .../authme/util/message/MiniMessageUtils.java | 12 +++++++++++- 4 files changed, 50 insertions(+), 3 deletions(-) diff --git a/src/main/java/fr/xephi/authme/api/v3/AuthMeApi.java b/src/main/java/fr/xephi/authme/api/v3/AuthMeApi.java index fd487d665..27743d5d5 100644 --- a/src/main/java/fr/xephi/authme/api/v3/AuthMeApi.java +++ b/src/main/java/fr/xephi/authme/api/v3/AuthMeApi.java @@ -15,6 +15,8 @@ import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.entity.Player; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.InventoryView; import javax.inject.Inject; import java.time.Instant; @@ -24,6 +26,8 @@ import java.util.Locale; import java.util.Optional; +import static fr.xephi.authme.listener.PlayerListener.PENDING_INVENTORIES; + /** * The current API of AuthMe. * @@ -32,6 +36,7 @@ * AuthMeApi authmeApi = AuthMeApi.getInstance(); * */ +@SuppressWarnings("unused") public class AuthMeApi { private static AuthMeApi singleton; @@ -256,6 +261,18 @@ public boolean registerPlayer(String playerName, String password) { return dataSource.saveAuth(auth); } + /** + * Open an inventory for the given player at any time. + * + * @param player The player to open the inventory for + * @param inventory The inventory to open + * @return The inventory view + */ + public InventoryView openInventory(Player player, Inventory inventory) { + PENDING_INVENTORIES.add(inventory); + return player.openInventory(inventory); + } + /** * Force a player to login, i.e. the player is logged in without needing his password. * diff --git a/src/main/java/fr/xephi/authme/listener/PlayerListener.java b/src/main/java/fr/xephi/authme/listener/PlayerListener.java index e435b9c2d..973b8e6c9 100644 --- a/src/main/java/fr/xephi/authme/listener/PlayerListener.java +++ b/src/main/java/fr/xephi/authme/listener/PlayerListener.java @@ -50,9 +50,12 @@ import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerRespawnEvent; import org.bukkit.event.player.PlayerShearEntityEvent; +import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryView; import javax.inject.Inject; +import java.util.ArrayList; +import java.util.List; import java.util.Locale; import java.util.Set; @@ -93,6 +96,7 @@ public class PlayerListener implements Listener { @Inject private QuickCommandsProtectionManager quickCommandsProtectionManager; + public static List PENDING_INVENTORIES = new ArrayList<>(); // Lowest priority to apply fast protection checks @EventHandler(priority = EventPriority.LOWEST) @@ -489,6 +493,17 @@ public void onPlayerConsumeItem(PlayerItemConsumeEvent event) { } } + private boolean isInventoryOpenedByApi(Inventory inventory) { + if (inventory == null) { + return false; + } + if (PENDING_INVENTORIES.contains(inventory)) { + PENDING_INVENTORIES.remove(inventory); + return true; + } else { + return false; + } + } @SuppressWarnings("all") private boolean isInventoryWhitelisted(InventoryView inventory) { if (inventory == null) { @@ -515,7 +530,8 @@ private boolean isInventoryWhitelisted(InventoryView inventory) { public void onPlayerInventoryOpen(InventoryOpenEvent event) { final HumanEntity player = event.getPlayer(); if (listenerService.shouldCancelEvent(player) - && !isInventoryWhitelisted(event.getView())) { + && !isInventoryWhitelisted(event.getView()) + && !isInventoryOpenedByApi(event.getInventory())) { event.setCancelled(true); /* diff --git a/src/main/java/fr/xephi/authme/service/BukkitService.java b/src/main/java/fr/xephi/authme/service/BukkitService.java index 45008a387..d78ea92e2 100644 --- a/src/main/java/fr/xephi/authme/service/BukkitService.java +++ b/src/main/java/fr/xephi/authme/service/BukkitService.java @@ -380,7 +380,11 @@ public void sendBungeeMessage(Player player, byte[] bytes) { * @param bytes the message */ public void sendVelocityMessage(Player player, byte[] bytes) { - player.sendPluginMessage(authMe, "authmevelocity:main", bytes); + if (player != null) { + player.sendPluginMessage(authMe, "authmevelocity:main", bytes); + } else { + Bukkit.getServer().sendPluginMessage(authMe, "authmevelocity:main", bytes); + } } diff --git a/src/main/java/fr/xephi/authme/util/message/MiniMessageUtils.java b/src/main/java/fr/xephi/authme/util/message/MiniMessageUtils.java index 5d7e62168..2fe728112 100644 --- a/src/main/java/fr/xephi/authme/util/message/MiniMessageUtils.java +++ b/src/main/java/fr/xephi/authme/util/message/MiniMessageUtils.java @@ -1,5 +1,6 @@ package fr.xephi.authme.util.message; +import fr.xephi.authme.util.Utils; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.minimessage.MiniMessage; import net.kyori.adventure.text.serializer.bungeecord.BungeeComponentSerializer; @@ -8,6 +9,15 @@ public class MiniMessageUtils { private static final MiniMessage miniMessage = MiniMessage.miniMessage(); + private static final BungeeComponentSerializer bungeeSerializer; + + static { + if (Utils.MAJOR_VERSION >= 16) { + bungeeSerializer = BungeeComponentSerializer.get(); + } else { + bungeeSerializer = BungeeComponentSerializer.legacy(); + } + } /** * Parse a MiniMessage string into a legacy string. @@ -28,7 +38,7 @@ public static String parseMiniMessageToLegacy(String message) { */ public static BaseComponent[] parseMiniMessageToBaseComponent(String message) { Component component = miniMessage.deserialize(message); - return BungeeComponentSerializer.legacy().serialize(component); + return bungeeSerializer.serialize(component); } private MiniMessageUtils() { From be97e7faa0523045fdf3d8e2da4f00382602cd57 Mon Sep 17 00:00:00 2001 From: DGun Otto <102713261+HaHaWTH@users.noreply.github.com> Date: Tue, 11 Jun 2024 21:43:35 +0800 Subject: [PATCH 03/51] Update maven.yml --- .github/workflows/maven.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index bdff351ae..78b3e0ee0 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -40,7 +40,9 @@ jobs: - mcVersion: '1.18.2' javaVersion: '17' - mcVersion: '1.20.4' - javaVersion: '21' + javaVersion: '21' + - mcVersion: '1.20.6' + javaVersion: '21' steps: - uses: HaHaWTH/minecraft-plugin-runtime-test@paper with: From 9b74cb5a0048743e2620f62f1f01e9267d3b485a Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Wed, 12 Jun 2024 01:45:57 +0800 Subject: [PATCH 04/51] Fix Folia join commands --- .../xephi/authme/settings/commandconfig/CommandManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/xephi/authme/settings/commandconfig/CommandManager.java b/src/main/java/fr/xephi/authme/settings/commandconfig/CommandManager.java index 1018da0a8..86f06aa8e 100644 --- a/src/main/java/fr/xephi/authme/settings/commandconfig/CommandManager.java +++ b/src/main/java/fr/xephi/authme/settings/commandconfig/CommandManager.java @@ -129,9 +129,9 @@ private void executeCommands(Player player, List commands if (predicate.test(cmd)) { long delay = cmd.getDelay(); if (delay > 0) { - bukkitService.scheduleSyncDelayedTask(() -> dispatchCommand(player, cmd), delay); + bukkitService.runTaskLater(player, () -> dispatchCommand(player, cmd), delay); } else { - dispatchCommand(player, cmd); + bukkitService.runTaskIfFolia(player, () -> dispatchCommand(player, cmd)); } } } From 5186d09116ca06dcbf348aaa5ddf9c9de2de4895 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:17:03 +0800 Subject: [PATCH 05/51] Revert some changes --- .../authme/util/message/MiniMessageUtils.java | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/src/main/java/fr/xephi/authme/util/message/MiniMessageUtils.java b/src/main/java/fr/xephi/authme/util/message/MiniMessageUtils.java index 2fe728112..36756c620 100644 --- a/src/main/java/fr/xephi/authme/util/message/MiniMessageUtils.java +++ b/src/main/java/fr/xephi/authme/util/message/MiniMessageUtils.java @@ -1,23 +1,11 @@ package fr.xephi.authme.util.message; -import fr.xephi.authme.util.Utils; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.minimessage.MiniMessage; -import net.kyori.adventure.text.serializer.bungeecord.BungeeComponentSerializer; import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; -import net.md_5.bungee.api.chat.BaseComponent; public class MiniMessageUtils { private static final MiniMessage miniMessage = MiniMessage.miniMessage(); - private static final BungeeComponentSerializer bungeeSerializer; - - static { - if (Utils.MAJOR_VERSION >= 16) { - bungeeSerializer = BungeeComponentSerializer.get(); - } else { - bungeeSerializer = BungeeComponentSerializer.legacy(); - } - } /** * Parse a MiniMessage string into a legacy string. @@ -29,18 +17,6 @@ public static String parseMiniMessageToLegacy(String message) { Component component = miniMessage.deserialize(message); return LegacyComponentSerializer.legacyAmpersand().serialize(component); } - - /** - * Parse a MiniMessage string into a BaseComponent. - * - * @param message The message to parse. - * @return The parsed message. - */ - public static BaseComponent[] parseMiniMessageToBaseComponent(String message) { - Component component = miniMessage.deserialize(message); - return bungeeSerializer.serialize(component); - } - private MiniMessageUtils() { } } From 5b52a0ff000267c06041d010b29d3aaa308f5d67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 04:48:06 +0000 Subject: [PATCH 06/51] Bump org.apache.maven.plugins:maven-clean-plugin from 3.3.2 to 3.4.0 Bumps [org.apache.maven.plugins:maven-clean-plugin](https://github.com/apache/maven-clean-plugin) from 3.3.2 to 3.4.0. - [Release notes](https://github.com/apache/maven-clean-plugin/releases) - [Commits](https://github.com/apache/maven-clean-plugin/compare/maven-clean-plugin-3.3.2...maven-clean-plugin-3.4.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-clean-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7de8a2952..7117c1ecf 100644 --- a/pom.xml +++ b/pom.xml @@ -151,7 +151,7 @@ org.apache.maven.plugins maven-clean-plugin - 3.3.2 + 3.4.0 From 4df4a1fa4b721864672aa8865fcaa57a304e0be8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 04:48:58 +0000 Subject: [PATCH 07/51] Bump org.apache.maven.plugins:maven-jar-plugin from 3.4.1 to 3.4.2 Bumps [org.apache.maven.plugins:maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.4.1 to 3.4.2. - [Release notes](https://github.com/apache/maven-jar-plugin/releases) - [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.4.1...maven-jar-plugin-3.4.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-jar-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7de8a2952..9b22fc3bb 100644 --- a/pom.xml +++ b/pom.xml @@ -199,7 +199,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.4.1 + 3.4.2 From 7d255dfa3073db3771a9f918ac2bfe29d2438cba Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Thu, 27 Jun 2024 11:57:17 +0800 Subject: [PATCH 08/51] Sync with upstream & Bump version number --- pom.xml | 2 +- src/main/java/fr/xephi/authme/AuthMe.java | 4 ++-- .../xephi/authme/process/join/AsynchronousJoin.java | 4 +--- .../process/logout/ProcessSyncPlayerLogout.java | 4 +--- .../process/unregister/AsynchronousUnregister.java | 4 +--- .../java/fr/xephi/authme/service/BukkitService.java | 12 ++++++++++++ src/main/resources/plugin.yml | 5 ++++- 7 files changed, 22 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 7de8a2952..937c234bf 100644 --- a/pom.xml +++ b/pom.xml @@ -699,7 +699,7 @@ - + com.maxmind.db maxmind-db-gson diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index 8731693b2..780fcf6a3 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -74,9 +74,9 @@ public class AuthMe extends JavaPlugin { private static final int CLEANUP_INTERVAL = 5 * TICKS_PER_MINUTE; // Version and build number values - private static String pluginVersion = "5.6.0-Fork"; + private static String pluginVersion = "5.6.1-Fork"; private static final String pluginBuild = "b"; - private static String pluginBuildNumber = "50"; + private static String pluginBuildNumber = "51"; // Private instances private EmailService emailService; private CommandHandler commandHandler; diff --git a/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java b/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java index dbfd9df06..424c49896 100644 --- a/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java +++ b/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java @@ -29,8 +29,6 @@ import org.bukkit.GameMode; import org.bukkit.Server; import org.bukkit.entity.Player; -import org.bukkit.potion.PotionEffect; -import org.bukkit.potion.PotionEffectType; import javax.inject.Inject; import java.util.Locale; @@ -208,7 +206,7 @@ private void processJoinSync(Player player, boolean isAuthAvailable) { int blindTimeOut = (registrationTimeout <= 0) ? 99999 : registrationTimeout; // AuthMeReReloaded - Fix potion apply on Folia - bukkitService.runTaskIfFolia(player,() -> player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, blindTimeOut, 2))); + bukkitService.runTaskIfFolia(player, () -> player.addPotionEffect(bukkitService.createBlindnessEffect(blindTimeOut))); } commandManager.runCommandsOnJoin(player); }); diff --git a/src/main/java/fr/xephi/authme/process/logout/ProcessSyncPlayerLogout.java b/src/main/java/fr/xephi/authme/process/logout/ProcessSyncPlayerLogout.java index 6aeed332c..96865e21c 100644 --- a/src/main/java/fr/xephi/authme/process/logout/ProcessSyncPlayerLogout.java +++ b/src/main/java/fr/xephi/authme/process/logout/ProcessSyncPlayerLogout.java @@ -14,8 +14,6 @@ import fr.xephi.authme.settings.properties.RegistrationSettings; import fr.xephi.authme.settings.properties.RestrictionSettings; import org.bukkit.entity.Player; -import org.bukkit.potion.PotionEffect; -import org.bukkit.potion.PotionEffectType; import javax.inject.Inject; @@ -75,7 +73,7 @@ private void applyLogoutEffect(Player player) { // Apply Blindness effect if (service.getProperty(RegistrationSettings.APPLY_BLIND_EFFECT)) { int timeout = service.getProperty(RestrictionSettings.TIMEOUT) * TICKS_PER_SECOND; - player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, timeout, 2)); + player.addPotionEffect(bukkitService.createBlindnessEffect(timeout)); } // Set player's data to unauthenticated diff --git a/src/main/java/fr/xephi/authme/process/unregister/AsynchronousUnregister.java b/src/main/java/fr/xephi/authme/process/unregister/AsynchronousUnregister.java index b69b99304..caecd295e 100644 --- a/src/main/java/fr/xephi/authme/process/unregister/AsynchronousUnregister.java +++ b/src/main/java/fr/xephi/authme/process/unregister/AsynchronousUnregister.java @@ -23,8 +23,6 @@ import fr.xephi.authme.settings.properties.RestrictionSettings; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -import org.bukkit.potion.PotionEffect; -import org.bukkit.potion.PotionEffectType; import javax.inject.Inject; @@ -150,7 +148,7 @@ private void performPostUnregisterActions(String name, Player player) { private void applyBlindEffect(Player player) { if (service.getProperty(RegistrationSettings.APPLY_BLIND_EFFECT)) { int timeout = service.getProperty(RestrictionSettings.TIMEOUT) * TICKS_PER_SECOND; - player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, timeout, 2)); + bukkitService.runTaskIfFolia(player, () -> player.addPotionEffect(bukkitService.createBlindnessEffect(timeout))); } } diff --git a/src/main/java/fr/xephi/authme/service/BukkitService.java b/src/main/java/fr/xephi/authme/service/BukkitService.java index d78ea92e2..8a8997955 100644 --- a/src/main/java/fr/xephi/authme/service/BukkitService.java +++ b/src/main/java/fr/xephi/authme/service/BukkitService.java @@ -18,6 +18,8 @@ import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.Event; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; import javax.inject.Inject; import java.util.Collection; @@ -327,6 +329,16 @@ public E createAndCallEvent(Function eventSupplier return event; } + /** + * Creates a PotionEffect with blindness for the given duration in ticks. + * + * @param timeoutInTicks duration of the effect in ticks + * @return blindness potion effect + */ + public PotionEffect createBlindnessEffect(int timeoutInTicks) { + return new PotionEffect(PotionEffectType.BLINDNESS, timeoutInTicks, 2); + } + /** * Gets the world with the given name. * diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 7219d0b24..6d014c345 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,10 +1,13 @@ +# noinspection YAMLSchemaValidation name: ${pluginDescription.name} +# noinspection YAMLSchemaValidation authors: [${pluginDescription.authors}] website: https://github.com/HaHaWTH/AuthMeReReloaded/ description: A fork of AuthMeReloaded that contains bug fixes +# noinspection YAMLSchemaValidation main: ${pluginDescription.main} folia-supported: true -version: 5.6.0-FORK-b50 +version: 5.6.1-FORK-b51 api-version: 1.13 softdepend: - Vault From 7130d3989ca81e10249369bc8f47517e8415c927 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Thu, 27 Jun 2024 12:02:24 +0800 Subject: [PATCH 09/51] Bump version number --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f49364d17..122bc5c54 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ fr.xephi authme - 5.6.0-FORK + 5.6.1-FORK AuthMeReReloaded Fork of the first authentication plugin for the Bukkit API! From f25610c90b2d1d0356f4260f13f7bb3e8546dc70 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Thu, 27 Jun 2024 12:10:57 +0800 Subject: [PATCH 10/51] Fix workflow --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 78b3e0ee0..9a188235e 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -25,7 +25,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: Download - path: ./target/AuthMe-5.6.0-FORK-Universal.jar + path: ./target/AuthMe-*-FORK-Universal.jar runtime-test: name: Plugin Runtime Test needs: [Build] From 9b0a4a003e863ad21cb8885161829728b98a3518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kobe=20=E2=91=A7?= <102713261+HaHaWTH@users.noreply.github.com> Date: Sun, 30 Jun 2024 12:18:46 +0800 Subject: [PATCH 11/51] Bump version to 5.7.0-FORK --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 122bc5c54..3a6fb4169 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ fr.xephi authme - 5.6.1-FORK + 5.7.0-FORK AuthMeReReloaded Fork of the first authentication plugin for the Bukkit API! From c99fc5c3898dd715f643930a6fd53723dec31c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kobe=20=E2=91=A7?= <102713261+HaHaWTH@users.noreply.github.com> Date: Sun, 30 Jun 2024 12:19:19 +0800 Subject: [PATCH 12/51] Update plugin.yml --- src/main/resources/plugin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 6d014c345..72e1ea9ba 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -7,7 +7,7 @@ description: A fork of AuthMeReloaded that contains bug fixes # noinspection YAMLSchemaValidation main: ${pluginDescription.main} folia-supported: true -version: 5.6.1-FORK-b51 +version: 5.7.0-FORK-b51 api-version: 1.13 softdepend: - Vault From 655c5ca42c8f53551f99f4efa840dc4960568f4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kobe=20=E2=91=A7?= <102713261+HaHaWTH@users.noreply.github.com> Date: Sun, 30 Jun 2024 12:20:05 +0800 Subject: [PATCH 13/51] Bump version to 5.7.0-Fork --- src/main/java/fr/xephi/authme/AuthMe.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index 780fcf6a3..f2bff2dd7 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -74,7 +74,7 @@ public class AuthMe extends JavaPlugin { private static final int CLEANUP_INTERVAL = 5 * TICKS_PER_MINUTE; // Version and build number values - private static String pluginVersion = "5.6.1-Fork"; + private static String pluginVersion = "5.7.0-Fork"; private static final String pluginBuild = "b"; private static String pluginBuildNumber = "51"; // Private instances From 37e6e9feb699c1bb62690f2061a1d00cda233f61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 05:07:13 +0000 Subject: [PATCH 14/51] Bump org.checkerframework:checker-qual from 3.40.0 to 3.45.0 Bumps [org.checkerframework:checker-qual](https://github.com/typetools/checker-framework) from 3.40.0 to 3.45.0. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.40.0...checker-framework-3.45.0) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3a6fb4169..7fed3926d 100644 --- a/pom.xml +++ b/pom.xml @@ -1128,7 +1128,7 @@ org.checkerframework checker-qual - 3.40.0 + 3.45.0 test From 92741daaa85d9a18b98e7547709fbeb250fe6f46 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Thu, 11 Jul 2024 15:10:40 +0800 Subject: [PATCH 15/51] fix: #178 mail sending lags server --- .../authme/data/VerificationCodeManager.java | 24 +++++++++++-------- .../authme/service/TeleportationService.java | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/main/java/fr/xephi/authme/data/VerificationCodeManager.java b/src/main/java/fr/xephi/authme/data/VerificationCodeManager.java index ad1b778da..1fc1e13b1 100644 --- a/src/main/java/fr/xephi/authme/data/VerificationCodeManager.java +++ b/src/main/java/fr/xephi/authme/data/VerificationCodeManager.java @@ -22,6 +22,8 @@ import java.util.Set; import java.util.concurrent.TimeUnit; +import static fr.xephi.authme.AuthMe.getScheduler; + public class VerificationCodeManager implements SettingsDependent, HasCleanup { private final EmailService emailService; @@ -133,17 +135,19 @@ public void codeExistOrGenerateNew(String name) { * @param name the name of the player to generate a code for */ private void generateCode(String name) { - DataSourceValue emailResult = dataSource.getEmail(name); - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy'年'MM'月'dd'日' HH:mm:ss"); - Date date = new Date(System.currentTimeMillis()); - if (emailResult.rowExists()) { - final String email = emailResult.getValue(); - if (!Utils.isEmailEmpty(email)) { - String code = RandomStringUtils.generateNum(6); // 6 digits code - verificationCodes.put(name.toLowerCase(Locale.ROOT), code); - emailService.sendVerificationMail(name, email, code, dateFormat.format(date)); + getScheduler().runTaskAsynchronously(() -> { + DataSourceValue emailResult = dataSource.getEmail(name); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy'-'MM'-'dd'-' HH:mm:ss"); + Date date = new Date(System.currentTimeMillis()); + if (emailResult.rowExists()) { + final String email = emailResult.getValue(); + if (!Utils.isEmailEmpty(email)) { + String code = RandomStringUtils.generateNum(6); // 6 digits code + verificationCodes.put(name.toLowerCase(Locale.ROOT), code); + emailService.sendVerificationMail(name, email, code, dateFormat.format(date)); + } } - } + }); } /** diff --git a/src/main/java/fr/xephi/authme/service/TeleportationService.java b/src/main/java/fr/xephi/authme/service/TeleportationService.java index c50b01291..4693d1fd6 100644 --- a/src/main/java/fr/xephi/authme/service/TeleportationService.java +++ b/src/main/java/fr/xephi/authme/service/TeleportationService.java @@ -144,7 +144,7 @@ public void teleportOnLogin(final Player player, PlayerAuth auth, LimboPlayer li if (settings.getProperty(RestrictionSettings.SAVE_QUIT_LOCATION)) { Location location = buildLocationFromAuth(player, auth); Location playerLoc = player.getLocation(); - if (location.getX() == playerLoc.getX() && location.getY() == location.getY() && location.getZ() == playerLoc.getZ() + if (location.getX() == playerLoc.getX() && location.getY() == playerLoc.getY() && location.getZ() == playerLoc.getZ() && location.getWorld() == playerLoc.getWorld()) return; logger.debug("Teleporting `{0}` after login, based on the player auth", player.getName()); teleportBackFromSpawn(player, location); From 02ebb0b0abe6a93a6847807e1f75488e1a4fe915 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Fri, 12 Jul 2024 23:26:14 +0800 Subject: [PATCH 16/51] hehe --- src/main/java/fr/xephi/authme/listener/ListenerService.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/fr/xephi/authme/listener/ListenerService.java b/src/main/java/fr/xephi/authme/listener/ListenerService.java index 3d582b0ea..d90c6f2d9 100644 --- a/src/main/java/fr/xephi/authme/listener/ListenerService.java +++ b/src/main/java/fr/xephi/authme/listener/ListenerService.java @@ -75,9 +75,7 @@ public boolean shouldCancelEvent(PlayerEvent event) { * @param player the player to verify * @return true if the associated event should be canceled, false otherwise */ - public boolean shouldCancelEvent(Player player) { - return player != null && !checkAuth(player.getName()) && !PlayerUtils.isNpc(player); } @Override From e0bf35284cb2f10b6a7c4341c8729ff2769e8d05 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Sat, 13 Jul 2024 04:08:55 +0800 Subject: [PATCH 17/51] Update runtime test to 1.21 --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9a188235e..0db3f8e61 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -41,7 +41,7 @@ jobs: javaVersion: '17' - mcVersion: '1.20.4' javaVersion: '21' - - mcVersion: '1.20.6' + - mcVersion: '1.21' javaVersion: '21' steps: - uses: HaHaWTH/minecraft-plugin-runtime-test@paper From 731c6477a5f4d82a528c3b9b0d42d302f2c6f4ce Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Sun, 14 Jul 2024 16:24:04 +0800 Subject: [PATCH 18/51] PlaceholderAPI hook --- pom.xml | 14 ++++ .../xephi/authme/listener/ServerListener.java | 5 ++ .../fr/xephi/authme/service/GeoIpService.java | 2 +- .../authme/service/PluginHookService.java | 29 ++++++++ .../service/hook/papi/AuthMeExpansion.java | 71 +++++++++++++++++++ .../settings/properties/HooksSettings.java | 4 ++ .../settings/properties/PluginSettings.java | 2 +- src/main/resources/plugin.yml | 1 + 8 files changed, 126 insertions(+), 2 deletions(-) create mode 100644 src/main/java/fr/xephi/authme/service/hook/papi/AuthMeExpansion.java diff --git a/pom.xml b/pom.xml index 7fed3926d..5e78cf867 100644 --- a/pom.xml +++ b/pom.xml @@ -623,6 +623,12 @@ https://s01.oss.sonatype.org/content/repositories/snapshots/ + + + placeholderapi-repo + https://repo.extendedclip.com/content/repositories/placeholderapi/ + + onarandombox-repo-releases @@ -1038,6 +1044,14 @@ + + + me.clip + placeholderapi + 2.11.6 + provided + + net.essentialsx diff --git a/src/main/java/fr/xephi/authme/listener/ServerListener.java b/src/main/java/fr/xephi/authme/listener/ServerListener.java index 97cefa04c..f5d961244 100644 --- a/src/main/java/fr/xephi/authme/listener/ServerListener.java +++ b/src/main/java/fr/xephi/authme/listener/ServerListener.java @@ -53,6 +53,9 @@ public void onPluginDisable(PluginDisableEvent event) { } else if ("ProtocolLib".equalsIgnoreCase(pluginName)) { protocolLibService.disable(); logger.warning("ProtocolLib has been disabled, unhooking packet adapters!"); + } else if ("PlaceholderAPI".equalsIgnoreCase(pluginName)) { + pluginHookService.unhookPlaceholderApi(); + logger.info("PlaceholderAPI has been disabled: unhooking placeholders"); } } @@ -74,6 +77,8 @@ public void onPluginEnable(PluginEnableEvent event) { spawnLoader.loadCmiSpawn(); } else if ("ProtocolLib".equalsIgnoreCase(pluginName)) { protocolLibService.setup(); + } else if ("PlaceholderAPI".equalsIgnoreCase(pluginName)) { + pluginHookService.tryHookToPlaceholderApi(); } } } diff --git a/src/main/java/fr/xephi/authme/service/GeoIpService.java b/src/main/java/fr/xephi/authme/service/GeoIpService.java index bf7252ff3..f18a85fa3 100644 --- a/src/main/java/fr/xephi/authme/service/GeoIpService.java +++ b/src/main/java/fr/xephi/authme/service/GeoIpService.java @@ -37,7 +37,7 @@ public class GeoIpService { private volatile boolean downloading; @Inject - GeoIpService(@DataFolder File dataFolder){ + GeoIpService(@DataFolder File dataFolder) { this.dataFile = dataFolder.toPath().resolve(DATABASE_FILE); // Fires download of recent data or the initialization of the look up service diff --git a/src/main/java/fr/xephi/authme/service/PluginHookService.java b/src/main/java/fr/xephi/authme/service/PluginHookService.java index 3615aa736..df588ee90 100644 --- a/src/main/java/fr/xephi/authme/service/PluginHookService.java +++ b/src/main/java/fr/xephi/authme/service/PluginHookService.java @@ -6,6 +6,8 @@ import com.onarandombox.MultiverseCore.api.MVWorldManager; import fr.xephi.authme.ConsoleLogger; import fr.xephi.authme.output.ConsoleLoggerFactory; +import fr.xephi.authme.service.hook.papi.AuthMeExpansion; +import me.clip.placeholderapi.PlaceholderAPIPlugin; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.entity.Player; @@ -26,6 +28,8 @@ public class PluginHookService { private Essentials essentials; private Plugin cmi; private MultiverseCore multiverse; + private PlaceholderAPIPlugin placeholderApi; + private AuthMeExpansion authMeExpansion; /** * Constructor. @@ -38,6 +42,7 @@ public PluginHookService(PluginManager pluginManager) { tryHookToEssentials(); tryHookToCmi(); tryHookToMultiverse(); + tryHookToPlaceholderApi(); } /** @@ -133,6 +138,20 @@ public void tryHookToEssentials() { } } + /** + * Attempts to create a hook into PlaceholderAPI. + */ + public void tryHookToPlaceholderApi() { + try { + placeholderApi = getPlugin(pluginManager, "PlaceholderAPI", PlaceholderAPIPlugin.class); + authMeExpansion = new AuthMeExpansion(); + authMeExpansion.register(); + } catch (Exception | NoClassDefFoundError ignored) { + placeholderApi = null; + authMeExpansion = null; + } + } + /** * Attempts to create a hook into CMI. */ @@ -180,6 +199,16 @@ public void unhookMultiverse() { multiverse = null; } + /** + * Unhooks from PlaceholderAPI. + */ + public void unhookPlaceholderApi() { + if (placeholderApi != null) { + authMeExpansion.unregister(); + placeholderApi = null; + } + } + // ------ // Helpers // ------ diff --git a/src/main/java/fr/xephi/authme/service/hook/papi/AuthMeExpansion.java b/src/main/java/fr/xephi/authme/service/hook/papi/AuthMeExpansion.java new file mode 100644 index 000000000..b4856f167 --- /dev/null +++ b/src/main/java/fr/xephi/authme/service/hook/papi/AuthMeExpansion.java @@ -0,0 +1,71 @@ +package fr.xephi.authme.service.hook.papi; + +import fr.xephi.authme.AuthMe; +import fr.xephi.authme.api.v3.AuthMeApi; +import fr.xephi.authme.settings.Settings; +import fr.xephi.authme.settings.properties.HooksSettings; +import me.clip.placeholderapi.expansion.PlaceholderExpansion; +import org.bukkit.OfflinePlayer; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; + +/** + * AuthMe PlaceholderAPI expansion class. + * @author Kobe 8 + */ +public class AuthMeExpansion extends PlaceholderExpansion { + private final Settings settings = AuthMe.settings; + private final AuthMeApi authMeApi = AuthMeApi.getInstance(); + @Override + public @NotNull String getIdentifier() { + return "authme"; + } + + @Override + public @NotNull String getAuthor() { + return "HaHaWTH"; + } + + @Override + public @NotNull String getVersion() { + return AuthMe.getPluginVersion(); + } + + @Override + public boolean persist() { + return true; + } + + @Override + public String onRequest(OfflinePlayer player, @NotNull String params) { + if (!settings.getProperty(HooksSettings.PLACEHOLDER_API)) return null; + if (params.equalsIgnoreCase("version")) { + return getVersion(); + } + if (params.equalsIgnoreCase("is_registered")) { + if (player != null) { + Player onlinePlayer = player.getPlayer(); + if (onlinePlayer != null) { + return String.valueOf(authMeApi.isRegistered(onlinePlayer.getName())); + } + } + } + if (params.equalsIgnoreCase("is_authenticated")) { + if (player != null) { + Player onlinePlayer = player.getPlayer(); + if (onlinePlayer != null) { + return String.valueOf(authMeApi.isAuthenticated(onlinePlayer)); + } + } + } + if (params.equalsIgnoreCase("last_login_time")) { + if (player != null) { + Player onlinePlayer = player.getPlayer(); + if (onlinePlayer != null) { + return authMeApi.getLastLoginTime(onlinePlayer.getName()).toString(); + } + } + } + return null; + } +} diff --git a/src/main/java/fr/xephi/authme/settings/properties/HooksSettings.java b/src/main/java/fr/xephi/authme/settings/properties/HooksSettings.java index 08c91c6a1..b2949af0d 100644 --- a/src/main/java/fr/xephi/authme/settings/properties/HooksSettings.java +++ b/src/main/java/fr/xephi/authme/settings/properties/HooksSettings.java @@ -15,6 +15,10 @@ public final class HooksSettings implements SettingsHolder { public static final Property MULTIVERSE = newProperty("Hooks.multiverse", true); + @Comment("Do we need to hook with PlaceholderAPI for AuthMe placeholders?") + public static final Property PLACEHOLDER_API = + newProperty("Hooks.placeholderapi", true); + @Comment("Do we need to hook with BungeeCord?") public static final Property BUNGEECORD = newProperty("Hooks.bungeecord", false); diff --git a/src/main/java/fr/xephi/authme/settings/properties/PluginSettings.java b/src/main/java/fr/xephi/authme/settings/properties/PluginSettings.java index 221496b35..03164af4e 100644 --- a/src/main/java/fr/xephi/authme/settings/properties/PluginSettings.java +++ b/src/main/java/fr/xephi/authme/settings/properties/PluginSettings.java @@ -21,7 +21,7 @@ public final class PluginSettings implements SettingsHolder { @Comment({ "Send i18n messages to player based on their client settings, this option will override `settings.messagesLanguage`", - "(Requires Protocollib or Packetevents)", + "(Requires ProtocolLib)", "This will not affect language of AuthMe help command." }) public static final Property I18N_MESSAGES = diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 72e1ea9ba..8dd7967be 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -20,6 +20,7 @@ softdepend: - EssentialsSpawn - ProtocolLib - floodgate + - PlaceholderAPI commands: authme: description: AuthMe op commands From 63bfc7a5c13de270af19dd2a52f09f997fdbbc75 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Sun, 14 Jul 2024 17:48:25 +0800 Subject: [PATCH 19/51] B52 release --- src/main/java/fr/xephi/authme/AuthMe.java | 2 +- src/main/resources/plugin.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index f2bff2dd7..fd51e70fe 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -76,7 +76,7 @@ public class AuthMe extends JavaPlugin { // Version and build number values private static String pluginVersion = "5.7.0-Fork"; private static final String pluginBuild = "b"; - private static String pluginBuildNumber = "51"; + private static String pluginBuildNumber = "52"; // Private instances private EmailService emailService; private CommandHandler commandHandler; diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 8dd7967be..833ad853b 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -7,7 +7,7 @@ description: A fork of AuthMeReloaded that contains bug fixes # noinspection YAMLSchemaValidation main: ${pluginDescription.main} folia-supported: true -version: 5.7.0-FORK-b51 +version: 5.7.0-FORK-b52 api-version: 1.13 softdepend: - Vault From 9bf6aae8e9a8a0d32acf49c1fe1f6e301022496e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kobe=20=E2=91=A7?= <102713261+HaHaWTH@users.noreply.github.com> Date: Wed, 17 Jul 2024 02:07:28 +0800 Subject: [PATCH 20/51] [ci skip] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index ea5e7e448..79ce794c3 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,6 @@ [Releases](https://github.com/HaHaWTH/AuthMeReReloaded/releases/latest) [Actions(Dev builds, use at your own risk!)](https://github.com/HaHaWTH/AuthMeReReloaded/actions/workflows/maven.yml) -If you are using FRP(内网穿透) for your server, this plugin may help [HAProxy-Detector](https://github.com/HaHaWTH/HAProxy-Detector) - **Pull Requests and suggestions are welcome!** ## License From f206deb8edbbfc58ef36470b643d9ef922a4a3ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 04:17:53 +0000 Subject: [PATCH 21/51] Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.7.0 to 3.8.0 Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.7.0 to 3.8.0. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.7.0...maven-javadoc-plugin-3.8.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5e78cf867..1b95f2f47 100644 --- a/pom.xml +++ b/pom.xml @@ -111,7 +111,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.7.0 + 3.8.0 false false From 1c1356a4d1f2e49700ee7ad2dba1c6f96e0c0639 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 04:18:17 +0000 Subject: [PATCH 22/51] Bump net.kyori:adventure-platform-bukkit from 4.3.2 to 4.3.3 Bumps [net.kyori:adventure-platform-bukkit](https://github.com/KyoriPowered/adventure-platform) from 4.3.2 to 4.3.3. - [Release notes](https://github.com/KyoriPowered/adventure-platform/releases) - [Commits](https://github.com/KyoriPowered/adventure-platform/compare/v4.3.2...v4.3.3) --- updated-dependencies: - dependency-name: net.kyori:adventure-platform-bukkit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5e78cf867..5025b2ef8 100644 --- a/pom.xml +++ b/pom.xml @@ -901,7 +901,7 @@ net.kyori adventure-platform-bukkit - 4.3.2 + 4.3.3 net.kyori From bd7a25560fe34e2c64b75cd083cf9b1cce8ea6f7 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Tue, 23 Jul 2024 03:52:01 +0800 Subject: [PATCH 23/51] Added config to disable changepassword email verification --- .../changepassword/ChangePasswordCommand.java | 14 +++++++++----- .../settings/properties/SecuritySettings.java | 5 +++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/main/java/fr/xephi/authme/command/executable/changepassword/ChangePasswordCommand.java b/src/main/java/fr/xephi/authme/command/executable/changepassword/ChangePasswordCommand.java index 83a0e5b2c..31580db3a 100644 --- a/src/main/java/fr/xephi/authme/command/executable/changepassword/ChangePasswordCommand.java +++ b/src/main/java/fr/xephi/authme/command/executable/changepassword/ChangePasswordCommand.java @@ -8,6 +8,7 @@ import fr.xephi.authme.service.CommonService; import fr.xephi.authme.service.ValidationService; import fr.xephi.authme.service.ValidationService.ValidationResult; +import fr.xephi.authme.settings.properties.SecuritySettings; import org.bukkit.entity.Player; import javax.inject.Inject; @@ -42,11 +43,14 @@ public void runCommand(Player player, List arguments) { commonService.send(player, MessageKey.NOT_LOGGED_IN); return; } - // Check if the user has been verified or not - if (codeManager.isVerificationRequired(player)) { - codeManager.codeExistOrGenerateNew(name); - commonService.send(player, MessageKey.VERIFICATION_CODE_REQUIRED); - return; + + if (commonService.getProperty(SecuritySettings.CHANGE_PASSWORD_EMAIL_VERIFICATION_REQUIRED)) { + // Check if the user has been verified or not + if (codeManager.isVerificationRequired(player)) { + codeManager.codeExistOrGenerateNew(name); + commonService.send(player, MessageKey.VERIFICATION_CODE_REQUIRED); + return; + } } String oldPassword = arguments.get(0); diff --git a/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java b/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java index b1d7c4aea..fc560e3cb 100644 --- a/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java +++ b/src/main/java/fr/xephi/authme/settings/properties/SecuritySettings.java @@ -62,6 +62,11 @@ public final class SecuritySettings implements SettingsHolder { public static final Property HAVE_I_BEEN_PWNED_LIMIT = newProperty("Security.account.haveIBeenPwned.limit", 0); + @Comment({"Require email verification when changing password if email feature enabled.", + "Original behavior is true"}) + public static final Property CHANGE_PASSWORD_EMAIL_VERIFICATION_REQUIRED = + newProperty("Security.account.emailVerification.required", true); + @Comment("Enable captcha when a player uses wrong password too many times") public static final Property ENABLE_LOGIN_FAILURE_CAPTCHA = newProperty("Security.captcha.useCaptcha", false); From 4c40ba36a60643d99da6ec7b8b163002e1f5bea4 Mon Sep 17 00:00:00 2001 From: luketeam5 Date: Tue, 23 Jul 2024 00:07:34 +0200 Subject: [PATCH 24/51] Better regex --- .../xephi/authme/settings/properties/RestrictionSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java b/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java index 1fc8341fc..d7d40aca9 100644 --- a/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java +++ b/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java @@ -173,7 +173,7 @@ public final class RestrictionSettings implements SettingsHolder { @Comment("Regex syntax for allowed chars in email.") public static final Property ALLOWED_EMAIL_REGEX = - newProperty("settings.restrictions.allowedEmailCharacters", "^[A-Za-z0-9_.]{3,20}@(qq|outlook|163|gmail|icloud)\\.com$"); + newProperty("settings.restrictions.allowedEmailCharacters", "^([a-zA-Z0-9_.+-]+)@([a-zA-Z0-9-]+)\.([a-zA-Z]{2,})$"); @Comment("Force survival gamemode when player joins?") From f0fae0fce0a0dbec311fdf95e32e925e0092fbcb Mon Sep 17 00:00:00 2001 From: luketeam5 Date: Tue, 23 Jul 2024 03:34:10 +0200 Subject: [PATCH 25/51] Update RestrictionSettings.java --- .../xephi/authme/settings/properties/RestrictionSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java b/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java index d7d40aca9..06eb2b55d 100644 --- a/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java +++ b/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java @@ -173,7 +173,7 @@ public final class RestrictionSettings implements SettingsHolder { @Comment("Regex syntax for allowed chars in email.") public static final Property ALLOWED_EMAIL_REGEX = - newProperty("settings.restrictions.allowedEmailCharacters", "^([a-zA-Z0-9_.+-]+)@([a-zA-Z0-9-]+)\.([a-zA-Z]{2,})$"); + newProperty("settings.restrictions.allowedEmailCharacters", "^([a-zA-Z0-9_.+-]+)@([a-zA-Z0-9-]+)\\.([a-zA-Z]{2,})$"); @Comment("Force survival gamemode when player joins?") From 91f0dfa5c503dafd7fa333775fd332e5d4727743 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 04:21:56 +0000 Subject: [PATCH 26/51] Bump org.xerial:sqlite-jdbc from 3.46.0.0 to 3.46.0.1 Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.46.0.0 to 3.46.0.1. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.46.0.0...3.46.0.1) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8ef54144c..928f09df3 100644 --- a/pom.xml +++ b/pom.xml @@ -1158,7 +1158,7 @@ org.xerial sqlite-jdbc - 3.46.0.0 + 3.46.0.1 test From 9ca3a248625df68f49964117ed698e37f7f0d326 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Wed, 31 Jul 2024 13:53:54 +0800 Subject: [PATCH 27/51] Temporarily fix inventory loss --- .../fr/xephi/authme/process/quit/ProcessSyncPlayerQuit.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/process/quit/ProcessSyncPlayerQuit.java b/src/main/java/fr/xephi/authme/process/quit/ProcessSyncPlayerQuit.java index 42048ef1e..41e713e83 100644 --- a/src/main/java/fr/xephi/authme/process/quit/ProcessSyncPlayerQuit.java +++ b/src/main/java/fr/xephi/authme/process/quit/ProcessSyncPlayerQuit.java @@ -29,7 +29,7 @@ public void processSyncQuit(Player player, boolean wasLoggedIn) { } else { limboService.restoreData(player); if (!UniversalScheduler.isFolia) { // AuthMeReReloaded - Fix #146 (Very stupid solution, but works) - player.saveData(); // #1238: Speed is sometimes not restored properly + // player.saveData(); // #1238: Speed is sometimes not restored properly } } player.leaveVehicle(); From ab40b1b82dc74901350819c7eacd65761510c303 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Wed, 31 Jul 2024 23:48:32 +0800 Subject: [PATCH 28/51] fix papi NPE --- .../fr/xephi/authme/service/hook/papi/AuthMeExpansion.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/service/hook/papi/AuthMeExpansion.java b/src/main/java/fr/xephi/authme/service/hook/papi/AuthMeExpansion.java index b4856f167..ce58950d3 100644 --- a/src/main/java/fr/xephi/authme/service/hook/papi/AuthMeExpansion.java +++ b/src/main/java/fr/xephi/authme/service/hook/papi/AuthMeExpansion.java @@ -15,7 +15,6 @@ */ public class AuthMeExpansion extends PlaceholderExpansion { private final Settings settings = AuthMe.settings; - private final AuthMeApi authMeApi = AuthMeApi.getInstance(); @Override public @NotNull String getIdentifier() { return "authme"; @@ -39,6 +38,8 @@ public boolean persist() { @Override public String onRequest(OfflinePlayer player, @NotNull String params) { if (!settings.getProperty(HooksSettings.PLACEHOLDER_API)) return null; + AuthMeApi authMeApi = AuthMeApi.getInstance(); + if (authMeApi == null) return null; if (params.equalsIgnoreCase("version")) { return getVersion(); } From bba90d93f1dbbbace950519e126bf846303a5bd8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 04:33:38 +0000 Subject: [PATCH 29/51] Bump org.checkerframework:checker-qual from 3.45.0 to 3.46.0 Bumps [org.checkerframework:checker-qual](https://github.com/typetools/checker-framework) from 3.45.0 to 3.46.0. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.45.0...checker-framework-3.46.0) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8ef54144c..682f59b30 100644 --- a/pom.xml +++ b/pom.xml @@ -1142,7 +1142,7 @@ org.checkerframework checker-qual - 3.45.0 + 3.46.0 test From faa3d9320c29e24d854840b263e2ff928302030b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 05:06:28 +0000 Subject: [PATCH 30/51] Bump net.kyori:adventure-platform-bukkit from 4.3.3 to 4.3.4 Bumps [net.kyori:adventure-platform-bukkit](https://github.com/KyoriPowered/adventure-platform) from 4.3.3 to 4.3.4. - [Release notes](https://github.com/KyoriPowered/adventure-platform/releases) - [Commits](https://github.com/KyoriPowered/adventure-platform/compare/v4.3.3...v4.3.4) --- updated-dependencies: - dependency-name: net.kyori:adventure-platform-bukkit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 932ee85c9..c90661d78 100644 --- a/pom.xml +++ b/pom.xml @@ -901,7 +901,7 @@ net.kyori adventure-platform-bukkit - 4.3.3 + 4.3.4 net.kyori From 67eb7dee0f56cbed3b278da7ea97f3cf948a5548 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 04:42:25 +0000 Subject: [PATCH 31/51] Bump org.xerial:sqlite-jdbc from 3.46.0.1 to 3.46.1.0 Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.46.0.1 to 3.46.1.0. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.46.0.1...3.46.1.0) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c90661d78..6ce9cc120 100644 --- a/pom.xml +++ b/pom.xml @@ -1158,7 +1158,7 @@ org.xerial sqlite-jdbc - 3.46.0.1 + 3.46.1.0 test From feea348ec3e47ef6c80bbb70f89c3ed284186b69 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 04:32:17 +0000 Subject: [PATCH 32/51] Bump org.apache.maven.plugins:maven-deploy-plugin from 3.1.2 to 3.1.3 Bumps [org.apache.maven.plugins:maven-deploy-plugin](https://github.com/apache/maven-deploy-plugin) from 3.1.2 to 3.1.3. - [Release notes](https://github.com/apache/maven-deploy-plugin/releases) - [Commits](https://github.com/apache/maven-deploy-plugin/compare/maven-deploy-plugin-3.1.2...maven-deploy-plugin-3.1.3) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-deploy-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c90661d78..1620105e9 100644 --- a/pom.xml +++ b/pom.xml @@ -503,7 +503,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.1.2 + 3.1.3 From 08dabda7c70c64879b96f1e83072401d10772750 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 04:34:00 +0000 Subject: [PATCH 33/51] Bump org.apache.maven.plugins:maven-install-plugin from 3.1.2 to 3.1.3 Bumps [org.apache.maven.plugins:maven-install-plugin](https://github.com/apache/maven-install-plugin) from 3.1.2 to 3.1.3. - [Release notes](https://github.com/apache/maven-install-plugin/releases) - [Commits](https://github.com/apache/maven-install-plugin/compare/maven-install-plugin-3.1.2...maven-install-plugin-3.1.3) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-install-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c90661d78..bbb11d724 100644 --- a/pom.xml +++ b/pom.xml @@ -497,7 +497,7 @@ org.apache.maven.plugins maven-install-plugin - 3.1.2 + 3.1.3 From 007e01156b7c4d927555cc7cc70ee1d0f2f45852 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Tue, 20 Aug 2024 23:52:40 +0800 Subject: [PATCH 34/51] B53 release --- pom.xml | 10 ---------- src/main/java/fr/xephi/authme/AuthMe.java | 2 +- src/main/resources/plugin.yml | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 9f0aa5d5b..816109556 100644 --- a/pom.xml +++ b/pom.xml @@ -898,16 +898,6 @@ adventure-text-minimessage 4.17.0 - - net.kyori - adventure-platform-bukkit - 4.3.4 - - - net.kyori - adventure-text-serializer-gson - 4.17.0 - diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index fd51e70fe..78a19279e 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -76,7 +76,7 @@ public class AuthMe extends JavaPlugin { // Version and build number values private static String pluginVersion = "5.7.0-Fork"; private static final String pluginBuild = "b"; - private static String pluginBuildNumber = "52"; + private static String pluginBuildNumber = "53"; // Private instances private EmailService emailService; private CommandHandler commandHandler; diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 833ad853b..7203312c3 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -7,7 +7,7 @@ description: A fork of AuthMeReloaded that contains bug fixes # noinspection YAMLSchemaValidation main: ${pluginDescription.main} folia-supported: true -version: 5.7.0-FORK-b52 +version: 5.7.0-FORK-b53 api-version: 1.13 softdepend: - Vault From 9e7e90db6c5c335cfcbbd241e1ec8c2595916ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kobe=20=E2=91=A7?= <102713261+HaHaWTH@users.noreply.github.com> Date: Thu, 22 Aug 2024 18:36:50 +0800 Subject: [PATCH 35/51] Update pom.xml --- pom.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 816109556..f35ced752 100644 --- a/pom.xml +++ b/pom.xml @@ -898,7 +898,17 @@ adventure-text-minimessage 4.17.0 - + + net.kyori + adventure-platform-bukkit + 4.3.4 + + + net.kyori + adventure-text-serializer-gson + 4.17.0 + + net.luckperms From bb85a7c61901824fc733417b1278f020fa7c2fd7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 04:44:19 +0000 Subject: [PATCH 36/51] Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.8.0 to 3.10.0 Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.8.0 to 3.10.0. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.8.0...maven-javadoc-plugin-3.10.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f35ced752..02b5b933e 100644 --- a/pom.xml +++ b/pom.xml @@ -111,7 +111,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.8.0 + 3.10.0 false false From fd2018186c1dcb3318b2e3848f6d098567ef82ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 05:00:38 +0000 Subject: [PATCH 37/51] Bump org.checkerframework:checker-qual from 3.46.0 to 3.47.0 Bumps [org.checkerframework:checker-qual](https://github.com/typetools/checker-framework) from 3.46.0 to 3.47.0. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.46.0...checker-framework-3.47.0) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f35ced752..324ba7fc3 100644 --- a/pom.xml +++ b/pom.xml @@ -1142,7 +1142,7 @@ org.checkerframework checker-qual - 3.46.0 + 3.47.0 test From 7713ee499d89fc115375e7cae258c9aca99980a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 04:54:43 +0000 Subject: [PATCH 38/51] Bump org.xerial:sqlite-jdbc from 3.46.1.0 to 3.46.1.1 Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.46.1.0 to 3.46.1.1. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.46.1.0...3.46.1.1) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4feefd99b..70cb9ab25 100644 --- a/pom.xml +++ b/pom.xml @@ -1158,7 +1158,7 @@ org.xerial sqlite-jdbc - 3.46.1.0 + 3.46.1.1 test From e5f6e31af22402c9923a84dcd3b542ed2d413cf5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 04:37:04 +0000 Subject: [PATCH 39/51] Bump org.xerial:sqlite-jdbc from 3.46.1.1 to 3.46.1.2 Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.46.1.1 to 3.46.1.2. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.46.1.1...3.46.1.2) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 70cb9ab25..ad9dab7fb 100644 --- a/pom.xml +++ b/pom.xml @@ -1158,7 +1158,7 @@ org.xerial sqlite-jdbc - 3.46.1.1 + 3.46.1.2 test From 5f165eed75ff13f586c05ef0d129d9eea32f4514 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 04:22:40 +0000 Subject: [PATCH 40/51] Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.10.0 to 3.10.1 Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.10.0 to 3.10.1. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.10.0...maven-javadoc-plugin-3.10.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ad9dab7fb..b9ee02952 100644 --- a/pom.xml +++ b/pom.xml @@ -111,7 +111,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.10.0 + 3.10.1 false false From 092df678a86dac64081488fdf0f65412ce09c4e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 05:07:53 +0000 Subject: [PATCH 41/51] Bump org.checkerframework:checker-qual from 3.47.0 to 3.48.0 Bumps [org.checkerframework:checker-qual](https://github.com/typetools/checker-framework) from 3.47.0 to 3.48.0. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/typetools/checker-framework/compare/checker-framework-3.47.0...checker-framework-3.48.0) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ad9dab7fb..a9961cec7 100644 --- a/pom.xml +++ b/pom.xml @@ -1142,7 +1142,7 @@ org.checkerframework checker-qual - 3.47.0 + 3.48.0 test From a6dc4514f2ce7016c100519e39d88967596fe73d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 05:04:50 +0000 Subject: [PATCH 42/51] Bump org.xerial:sqlite-jdbc from 3.46.1.2 to 3.47.0.0 Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.46.1.2 to 3.47.0.0. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.46.1.2...3.47.0.0) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4aa7a3309..c09587321 100644 --- a/pom.xml +++ b/pom.xml @@ -1158,7 +1158,7 @@ org.xerial sqlite-jdbc - 3.46.1.2 + 3.47.0.0 test From 3e87b9f44ac1e323ff3e6b5c8bd0deadcd8a7334 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 05:04:58 +0000 Subject: [PATCH 43/51] Bump org.apache.maven.plugins:maven-site-plugin from 3.12.1 to 3.21.0 Bumps [org.apache.maven.plugins:maven-site-plugin](https://github.com/apache/maven-site-plugin) from 3.12.1 to 3.21.0. - [Release notes](https://github.com/apache/maven-site-plugin/releases) - [Commits](https://github.com/apache/maven-site-plugin/compare/maven-site-plugin-3.12.1...maven-site-plugin-3.21.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-site-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4aa7a3309..617a3a5a2 100644 --- a/pom.xml +++ b/pom.xml @@ -509,7 +509,7 @@ org.apache.maven.plugins maven-site-plugin - 3.12.1 + 3.21.0 From b9e2514556604fa3aae3cc51a9bf65fa7ab7fe96 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Mon, 4 Nov 2024 19:24:24 +0800 Subject: [PATCH 44/51] Cleanup --- README.md | 17 ++++++------ .../fr/xephi/authme/api/v3/AuthMeApi.java | 16 ----------- .../xephi/authme/listener/PlayerListener.java | 27 +------------------ .../java/fr/xephi/authme/task/Updater.java | 23 +++++++++------- 4 files changed, 23 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index 79ce794c3..0e1dba549 100644 --- a/README.md +++ b/README.md @@ -27,15 +27,14 @@ 10. Player login logic improvement to reduce lag 11. Automatically purge bot data 12. **Folia support (in active testing)** - 13. Offhand Menu compatibility(Thats amazing) - 14. **Velocity support (See [Velocity Support](./vc-support.md))** - 15. Support Virtual Threads caching - 16. Automatically fix portal stuck issue - 17. Automatically login for Bedrock players(configurable) - 18. Fix shulker box crash bug on legacy versions(MC 1.13-) - 19. **H2 database support** - 20. **100% compatibility with original authme and extensions** - 21. More...... + 13. **Velocity support (See [Velocity Support](./vc-support.md))** + 14. Support Virtual Threads caching + 15. Automatically fix portal stuck issue + 16. Automatically login for Bedrock players(configurable) + 17. Fix shulker box crash bug on legacy versions(MC 1.13-) + 18. **H2 database support** + 19. **100% compatibility with original authme and extensions** + 20. More...... **Download links:** [Releases](https://github.com/HaHaWTH/AuthMeReReloaded/releases/latest) diff --git a/src/main/java/fr/xephi/authme/api/v3/AuthMeApi.java b/src/main/java/fr/xephi/authme/api/v3/AuthMeApi.java index 27743d5d5..81f55863f 100644 --- a/src/main/java/fr/xephi/authme/api/v3/AuthMeApi.java +++ b/src/main/java/fr/xephi/authme/api/v3/AuthMeApi.java @@ -15,8 +15,6 @@ import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.entity.Player; -import org.bukkit.inventory.Inventory; -import org.bukkit.inventory.InventoryView; import javax.inject.Inject; import java.time.Instant; @@ -26,8 +24,6 @@ import java.util.Locale; import java.util.Optional; -import static fr.xephi.authme.listener.PlayerListener.PENDING_INVENTORIES; - /** * The current API of AuthMe. * @@ -261,18 +257,6 @@ public boolean registerPlayer(String playerName, String password) { return dataSource.saveAuth(auth); } - /** - * Open an inventory for the given player at any time. - * - * @param player The player to open the inventory for - * @param inventory The inventory to open - * @return The inventory view - */ - public InventoryView openInventory(Player player, Inventory inventory) { - PENDING_INVENTORIES.add(inventory); - return player.openInventory(inventory); - } - /** * Force a player to login, i.e. the player is logged in without needing his password. * diff --git a/src/main/java/fr/xephi/authme/listener/PlayerListener.java b/src/main/java/fr/xephi/authme/listener/PlayerListener.java index b24da9da2..60aa74015 100644 --- a/src/main/java/fr/xephi/authme/listener/PlayerListener.java +++ b/src/main/java/fr/xephi/authme/listener/PlayerListener.java @@ -52,12 +52,9 @@ import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerRespawnEvent; import org.bukkit.event.player.PlayerShearEntityEvent; -import org.bukkit.inventory.Inventory; import org.bukkit.inventory.InventoryView; import javax.inject.Inject; -import java.util.ArrayList; -import java.util.List; import java.util.Locale; import java.util.Set; @@ -98,8 +95,6 @@ public class PlayerListener implements Listener { @Inject private QuickCommandsProtectionManager quickCommandsProtectionManager; - public static List PENDING_INVENTORIES = new ArrayList<>(); - // Lowest priority to apply fast protection checks @EventHandler(priority = EventPriority.LOWEST) public void onAsyncPlayerPreLoginEventLowest(AsyncPlayerPreLoginEvent event) { @@ -500,17 +495,6 @@ public void onPlayerConsumeItem(PlayerItemConsumeEvent event) { } } - private boolean isInventoryOpenedByApi(Inventory inventory) { - if (inventory == null) { - return false; - } - if (PENDING_INVENTORIES.contains(inventory)) { - PENDING_INVENTORIES.remove(inventory); - return true; - } else { - return false; - } - } @SuppressWarnings("all") private boolean isInventoryWhitelisted(InventoryView inventory) { if (inventory == null) { @@ -537,8 +521,7 @@ private boolean isInventoryWhitelisted(InventoryView inventory) { public void onPlayerInventoryOpen(InventoryOpenEvent event) { final HumanEntity player = event.getPlayer(); if (listenerService.shouldCancelEvent(player) - && !isInventoryWhitelisted(event.getView()) - && !isInventoryOpenedByApi(event.getInventory())) { + && !isInventoryWhitelisted(event.getView())) { event.setCancelled(true); /* @@ -556,12 +539,4 @@ public void onPlayerInventoryClick(InventoryClickEvent event) { event.setCancelled(true); } } -// @EventHandler(priority = EventPriority.LOWEST) -// public void onSwitchHand(PlayerSwapHandItemsEvent event) { -// Player player = event.getPlayer(); -// if (!player.isSneaking() || !player.hasPermission("keybindings.use")) -// return; -// event.setCancelled(true); -// Bukkit.dispatchCommand(event.getPlayer(), "help"); -// } } diff --git a/src/main/java/fr/xephi/authme/task/Updater.java b/src/main/java/fr/xephi/authme/task/Updater.java index 5616d88a8..52750873c 100644 --- a/src/main/java/fr/xephi/authme/task/Updater.java +++ b/src/main/java/fr/xephi/authme/task/Updater.java @@ -1,10 +1,13 @@ package fr.xephi.authme.task; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; + import java.io.IOException; +import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URI; import java.net.URL; -import java.util.Scanner; public class Updater { private final String currentVersion; @@ -32,14 +35,16 @@ public boolean isUpdateAvailable() { HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setConnectTimeout(10000); conn.setReadTimeout(10000); - Scanner scanner = new Scanner(conn.getInputStream()); - String response = scanner.useDelimiter("\\Z").next(); - scanner.close(); - String latestVersion = response.substring(response.indexOf("tag_name") + 11); - latestVersion = latestVersion.substring(0, latestVersion.indexOf("\"")); - this.latestVersion = latestVersion; - isUpdateAvailable = !currentVersion.equals(latestVersion); - return isUpdateAvailable; + conn.setRequestMethod("GET"); + conn.setRequestProperty("Accept", "application/vnd.github+json"); + try (InputStreamReader reader = new InputStreamReader(conn.getInputStream())) { + JsonObject jsonObject = new JsonParser().parse(reader).getAsJsonObject(); + String latest = jsonObject.get("tag_name").getAsString(); + latestVersion = latest; + isUpdateAvailable = !currentVersion.equals(latest); + reader.close(); + return isUpdateAvailable; + } } catch (IOException ignored) { this.latestVersion = null; isUpdateAvailable = false; From 5cc4167e4f55f2d0de0c50c9bc2bb4431061a3f0 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Mon, 4 Nov 2024 19:31:55 +0800 Subject: [PATCH 45/51] Reformat email.html --- src/main/resources/email.html | 2 +- src/main/resources/new_email.html | 2 +- src/main/resources/recovery_code_email.html | 2 +- src/main/resources/shutdown.html | 2 +- src/main/resources/verification_code_email.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/resources/email.html b/src/main/resources/email.html index 7b9e77faa..ddadabcd3 100644 --- a/src/main/resources/email.html +++ b/src/main/resources/email.html @@ -104,7 +104,7 @@

Minecraft ·

© 2024 HomoCraft. All rights reserved.

wdsj.in + style="text-decoration: none; font-size: 16px">example.com diff --git a/src/main/resources/new_email.html b/src/main/resources/new_email.html index 74a1a087b..b0da4f075 100644 --- a/src/main/resources/new_email.html +++ b/src/main/resources/new_email.html @@ -110,7 +110,7 @@

Minecraft ·

© 2024 HomoCraft. All rights reserved.

wdsj.in + style="text-decoration: none; font-size: 16px">example.com diff --git a/src/main/resources/recovery_code_email.html b/src/main/resources/recovery_code_email.html index c41c00c9b..4c665ec7d 100644 --- a/src/main/resources/recovery_code_email.html +++ b/src/main/resources/recovery_code_email.html @@ -103,7 +103,7 @@

Minecraft ·

© 2024 HomoCraft. All rights reserved.

wdsj.in + style="text-decoration: none; font-size: 16px">example.com diff --git a/src/main/resources/shutdown.html b/src/main/resources/shutdown.html index 2819ebfc0..249219389 100644 --- a/src/main/resources/shutdown.html +++ b/src/main/resources/shutdown.html @@ -101,7 +101,7 @@

Minecraft ·

© 2024 HomoCraft. All rights reserved.

wdsj.in + style="text-decoration: none; font-size: 16px">example.com diff --git a/src/main/resources/verification_code_email.html b/src/main/resources/verification_code_email.html index 0e8d1ddd8..c76d68318 100644 --- a/src/main/resources/verification_code_email.html +++ b/src/main/resources/verification_code_email.html @@ -103,7 +103,7 @@

Minecraft ·

© 2024 HomoCraft. All rights reserved.

wdsj.in + style="text-decoration: none; font-size: 16px">example.com From a70d1d72687c701f3631fe3bd93015f66d5fbad7 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Mon, 4 Nov 2024 19:36:07 +0800 Subject: [PATCH 46/51] Update workflow --- .github/workflows/maven.yml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 0db3f8e61..9241baade 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -41,7 +41,7 @@ jobs: javaVersion: '17' - mcVersion: '1.20.4' javaVersion: '21' - - mcVersion: '1.21' + - mcVersion: '1.21.1' javaVersion: '21' steps: - uses: HaHaWTH/minecraft-plugin-runtime-test@paper diff --git a/pom.xml b/pom.xml index 59fa736ea..55f130d0e 100644 --- a/pom.xml +++ b/pom.xml @@ -67,7 +67,7 @@ 3.6.3 - 1.20.6-R0.1-SNAPSHOT + 1.21.1-R0.1-SNAPSHOT AuthMe From 48a48f0c07596f1c0602a7717ab2e78c0f961f53 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Mon, 4 Nov 2024 19:38:31 +0800 Subject: [PATCH 47/51] Remove menu plugin --- .../authme/listener/PlayerListenerHigherThan18.java | 12 ------------ .../authme/settings/properties/PluginSettings.java | 7 ------- 2 files changed, 19 deletions(-) diff --git a/src/main/java/fr/xephi/authme/listener/PlayerListenerHigherThan18.java b/src/main/java/fr/xephi/authme/listener/PlayerListenerHigherThan18.java index 66c408a18..bd845ce0b 100644 --- a/src/main/java/fr/xephi/authme/listener/PlayerListenerHigherThan18.java +++ b/src/main/java/fr/xephi/authme/listener/PlayerListenerHigherThan18.java @@ -1,14 +1,10 @@ package fr.xephi.authme.listener; import fr.xephi.authme.settings.Settings; -import fr.xephi.authme.settings.properties.PluginSettings; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityPickupItemEvent; -import org.bukkit.event.player.PlayerSwapHandItemsEvent; import javax.inject.Inject; @@ -26,12 +22,4 @@ public void onPlayerPickupItem(EntityPickupItemEvent event) { } } - @EventHandler(priority = EventPriority.LOWEST) - public void onSwitchHand(PlayerSwapHandItemsEvent event) { - Player player = event.getPlayer(); - if (player.isSneaking() && player.hasPermission("keybindings.use") && settings.getProperty(PluginSettings.MENU_UNREGISTER_COMPATIBILITY)) { - event.setCancelled(true); - Bukkit.dispatchCommand(event.getPlayer(), "help"); - } - } } diff --git a/src/main/java/fr/xephi/authme/settings/properties/PluginSettings.java b/src/main/java/fr/xephi/authme/settings/properties/PluginSettings.java index 03164af4e..f09e550dd 100644 --- a/src/main/java/fr/xephi/authme/settings/properties/PluginSettings.java +++ b/src/main/java/fr/xephi/authme/settings/properties/PluginSettings.java @@ -11,13 +11,6 @@ import static ch.jalu.configme.properties.PropertyInitializer.newProperty; public final class PluginSettings implements SettingsHolder { - @Comment({ - "Should we execute /help command when unregistered players press Shift+F?", - "This keeps compatibility with some menu plugins", - "If you are using TrMenu, don't enable this because TrMenu already implemented this." - }) - public static final Property MENU_UNREGISTER_COMPATIBILITY = - newProperty("3rdPartyFeature.compatibility.menuPlugins", false); @Comment({ "Send i18n messages to player based on their client settings, this option will override `settings.messagesLanguage`", From 2bde2fd8ac3e45da451dcf40d133ce47d89d186d Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Mon, 4 Nov 2024 21:57:28 +0800 Subject: [PATCH 48/51] default false --- .../java/fr/xephi/authme/settings/properties/HooksSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/settings/properties/HooksSettings.java b/src/main/java/fr/xephi/authme/settings/properties/HooksSettings.java index b2949af0d..32e7a95f0 100644 --- a/src/main/java/fr/xephi/authme/settings/properties/HooksSettings.java +++ b/src/main/java/fr/xephi/authme/settings/properties/HooksSettings.java @@ -17,7 +17,7 @@ public final class HooksSettings implements SettingsHolder { @Comment("Do we need to hook with PlaceholderAPI for AuthMe placeholders?") public static final Property PLACEHOLDER_API = - newProperty("Hooks.placeholderapi", true); + newProperty("Hooks.placeholderapi", false); @Comment("Do we need to hook with BungeeCord?") public static final Property BUNGEECORD = From 7f00c4183fe3d06d59a9312085320b0276ea6ede Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 04:25:26 +0000 Subject: [PATCH 49/51] Bump org.xerial:sqlite-jdbc from 3.47.0.0 to 3.47.1.0 Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.47.0.0 to 3.47.1.0. - [Release notes](https://github.com/xerial/sqlite-jdbc/releases) - [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG) - [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.47.0.0...3.47.1.0) --- updated-dependencies: - dependency-name: org.xerial:sqlite-jdbc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 55f130d0e..8a414fa13 100644 --- a/pom.xml +++ b/pom.xml @@ -1158,7 +1158,7 @@ org.xerial sqlite-jdbc - 3.47.0.0 + 3.47.1.0 test From da99cad206f7e8942d92b3fecbdc54dd435df02a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 8 Dec 2024 12:57:07 +0000 Subject: [PATCH 50/51] Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.10.1 to 3.11.1 (#224) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8a414fa13..fefe0c564 100644 --- a/pom.xml +++ b/pom.xml @@ -111,7 +111,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.10.1 + 3.11.1 false false From b630df850f9550e235d2e93380ca6dcfc7ae4390 Mon Sep 17 00:00:00 2001 From: Deichor Date: Tue, 10 Dec 2024 02:33:35 +0300 Subject: [PATCH 51/51] Update Multiverse and removed unused folialib --- pom.xml | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/pom.xml b/pom.xml index fefe0c564..31343c8fb 100644 --- a/pom.xml +++ b/pom.xml @@ -631,8 +631,9 @@ - onarandombox-repo-releases - https://repo.onarandombox.com/content/repositories/multiverse/ + multiverse-multiverse-releases + Multiverse Repository + https://repo.onarandombox.com/multiverse-releases true @@ -640,22 +641,6 @@ false - - onarandombox-repo-snapshots - https://repo.onarandombox.com/content/repositories/multiverse-snapshots/ - - false - - - true - - - - - - devmart-other - https://nexuslite.gcnt.net/repos/other/ - opencollab-snapshot @@ -984,8 +969,8 @@ com.onarandombox.multiversecore - Multiverse-Core - 4.3.1 + multiverse-core + 4.3.14 jar provided