From 5b5502c0b4ffdafe495c6fe935e448309bbbf4c0 Mon Sep 17 00:00:00 2001 From: NK Date: Thu, 22 Dec 2022 10:08:58 +0000 Subject: [PATCH] using oop now --- .../me/night/nullvalkyrie/ui/inventory/InventoryListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/night/nullvalkyrie/ui/inventory/InventoryListener.java b/src/main/java/me/night/nullvalkyrie/ui/inventory/InventoryListener.java index a97bc7a..20f2a3d 100644 --- a/src/main/java/me/night/nullvalkyrie/ui/inventory/InventoryListener.java +++ b/src/main/java/me/night/nullvalkyrie/ui/inventory/InventoryListener.java @@ -1,6 +1,7 @@ package me.night.nullvalkyrie.ui.inventory; import me.night.nullvalkyrie.Main; +import me.night.nullvalkyrie.database.UserDataManager; import me.night.nullvalkyrie.enums.Items; import me.night.nullvalkyrie.util.RandomCollection; import me.night.nullvalkyrie.util.Util; @@ -17,7 +18,7 @@ import org.bukkit.scheduler.BukkitRunnable; import java.util.ArrayList; import java.util.Collections; import java.util.List; - +@SuppressWarnings("ConstantConditions") public class InventoryListener implements Listener { public static RandomCollection randomCollection; @@ -71,6 +72,7 @@ public class InventoryListener implements Listener { player.sendMessage(ChatColor.RED + "You already got all the rewards!"); return; } + new UserDataManager().updateUserBank(player.getUniqueId().toString(), -100); List colors = List.of("WHITE", "ORANGE", "MAGENTA", "LIGHT_BLUE", "YELLOW", "LIME", "PINK", "GRAY", "LIGHT_GRAY", "CYAN", "PURPLE", "BLUE", "BROWN", "GREEN", "RED", "BLACK"); List slot1 = new ArrayList<>(colors); List slot2 = new ArrayList<>(colors);