This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrations: fix and add vault integration
- Loading branch information
Showing
3 changed files
with
35 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package net.flectone.integrations.vault; | ||
|
||
import net.flectone.Main; | ||
import net.milkbowl.vault.chat.Chat; | ||
import org.bukkit.plugin.RegisteredServiceProvider; | ||
|
||
public class FVault { | ||
|
||
public static boolean registered = false; | ||
|
||
private static Chat provider; | ||
|
||
public static void register() { | ||
RegisteredServiceProvider<Chat> chatProvider = Main.getInstance().getServer().getServicesManager() | ||
.getRegistration(net.milkbowl.vault.chat.Chat.class); | ||
|
||
if (chatProvider == null) { | ||
Main.warning("⚠ Failed to load Vault Chat, you may not have LuckPerms installed"); | ||
return; | ||
} | ||
|
||
provider = chatProvider.getProvider(); | ||
registered = true; | ||
} | ||
|
||
public static Chat getProvider() { | ||
return provider; | ||
} | ||
|
||
} |