diff --git a/bukkit/src/main/java/me/lucko/luckperms/LPBukkitPlugin.java b/bukkit/src/main/java/me/lucko/luckperms/LPBukkitPlugin.java
index 8349470f..b057cebd 100644
--- a/bukkit/src/main/java/me/lucko/luckperms/LPBukkitPlugin.java
+++ b/bukkit/src/main/java/me/lucko/luckperms/LPBukkitPlugin.java
@@ -217,6 +217,16 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
return getServer().getServicesManager().load(clazz);
}
+ @SuppressWarnings("deprecation")
+ @Override
+ public UUID getUUID(String playerName) {
+ try {
+ return getServer().getOfflinePlayer(playerName).getUniqueId();
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
@Override
public boolean isPluginLoaded(String name) {
return getServer().getPluginManager().isPluginEnabled(name);
diff --git a/bukkit/src/main/resources/plugin.yml b/bukkit/src/main/resources/plugin.yml
index a161f352..6a8f094e 100644
--- a/bukkit/src/main/resources/plugin.yml
+++ b/bukkit/src/main/resources/plugin.yml
@@ -2,7 +2,7 @@ name: LuckPerms
author: Luck
version: ${release.version}.${git.closest.tag.commit.count}
main: me.lucko.luckperms.LPBukkitPlugin
-softdepend: [Vault, PermissionsEx, GroupManager, PowerfulPerms, zPermissions] # For migration
+softdepend: [Vault, PermissionsEx, GroupManager, PowerfulPerms, zPermissions, bPermissions] # For migration
description: A permissions plugin
commands:
luckperms:
diff --git a/bungee/src/main/java/me/lucko/luckperms/LPBungeePlugin.java b/bungee/src/main/java/me/lucko/luckperms/LPBungeePlugin.java
index cab8110e..63d92c73 100644
--- a/bungee/src/main/java/me/lucko/luckperms/LPBungeePlugin.java
+++ b/bungee/src/main/java/me/lucko/luckperms/LPBungeePlugin.java
@@ -185,6 +185,11 @@ public class LPBungeePlugin extends Plugin implements LuckPermsPlugin {
return null;
}
+ @Override
+ public UUID getUUID(String playerName) {
+ return null; // Not needed on Bungee
+ }
+
@Override
public boolean isPluginLoaded(String name) {
return getProxy().getPluginManager().getPlugins().stream()
diff --git a/common/pom.xml b/common/pom.xml
index 0f227538..ef6b5919 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -132,6 +132,12 @@
3.0-dev-52
provided
+
+ de.bananaco
+ bpermissions-api
+ 2.12
+ provided
+
diff --git a/common/src/main/java/me/lucko/luckperms/LuckPermsPlugin.java b/common/src/main/java/me/lucko/luckperms/LuckPermsPlugin.java
index 9fd0afab..f50880dc 100644
--- a/common/src/main/java/me/lucko/luckperms/LuckPermsPlugin.java
+++ b/common/src/main/java/me/lucko/luckperms/LuckPermsPlugin.java
@@ -136,6 +136,13 @@ public interface LuckPermsPlugin {
*/
Object getService(Class clazz);
+ /**
+ * Used as a backup for migration
+ * @param playerName the players name
+ * @return a uuid if found, or null if not
+ */
+ UUID getUUID(String playerName);
+
/**
* Checks if a plugin is loaded on the platform
* @param name the name of the plugin
diff --git a/common/src/main/java/me/lucko/luckperms/commands/migration/MigrationMainCommand.java b/common/src/main/java/me/lucko/luckperms/commands/migration/MigrationMainCommand.java
index 9dab30d4..825c8457 100644
--- a/common/src/main/java/me/lucko/luckperms/commands/migration/MigrationMainCommand.java
+++ b/common/src/main/java/me/lucko/luckperms/commands/migration/MigrationMainCommand.java
@@ -66,6 +66,11 @@ public class MigrationMainCommand extends MainCommand