Fix build

This commit is contained in:
NotAlexNoyle committed 2025-05-28 04:32:37 -04:00
1 parent b9b9dcf732
commit 41af8264b3
2 files changed
+12 -10

No files matched your search

+6 -8
View File
@@ -8,7 +8,6 @@ import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import net.trueog.diamondbankog.DiamondBankOG;
import net.trueog.diamondbankog.PostgreSQL;
import net.trueog.utilitiesog.UtilitiesOG;
@@ -21,19 +20,18 @@ public class Listeners implements Listener {
try {
PostgreSQL.PlayerBalance balanceResult = asyncPlayerBalance.get();
PostgreSQL.PlayerBalance balanceResult = asyncPlayerBalance.get();
double totalBalance = balanceResult.getBankBalance() + balanceResult.getEnderChestBalance() + balanceResult.getInventoryBalance();
double totalBalance = balanceResult.getBankBalance() + balanceResult.getEnderChestBalance() + balanceResult.getInventoryBalance();
// Send a message to the player with their balance.
// Send a message to the player with their balance.
UtilitiesOG.trueogMessage(event.getPlayer(), "&BYour balance is: &e" + 5 + "&B Diamonds.");
UtilitiesOG.logToConsole("[Template-OG]", "The player: " + event.getPlayer() + "'s <aqua>balance</aqua> is: " + 5 + "&B Diamonds");
UtilitiesOG.trueogMessage(event.getPlayer(), "&BYour balance is: &e" + totalBalance + "&B Diamonds.");
UtilitiesOG.logToConsole("[Template-OG]", "The player: " + event.getPlayer() + "'s <aqua>balance</aqua> is: " + totalBalance + "&B Diamonds");
}
catch (InterruptedException | ExecutionException error) {
catch (InterruptedException | ExecutionException error) {
UtilitiesOG.logToConsole("[Template-OG]", "ERROR: The player: " + event.getPlayer() + "'s balance could not be fetched! ERROR: " + error.getMessage());
+6 -2
View File
@@ -1,17 +1,21 @@
package plugin;
import org.bukkit.Bukkit;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;
import net.trueog.diamondbankog.DiamondBankAPI;
public class TemplateOG extends JavaPlugin {
private static TemplateOG plugin;
private static DiamondBankAPI diamondBankAPI;
public void onEnable() {
plugin = this;
getServer().getPluginManager().registerEvents(new Listeners(), this);
RegisteredServiceProvider<DiamondBankAPI> diamondBankAPIProvider = getServer().getServicesManager().getRegistration(DiamondBankAPI.class);
if (diamondBankAPIProvider == null) {
getLogger().severe("DiamondBank-OG API is null");