mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 05:28:59 +00:00
Load Scramble Seed key from Config
Remember all used Scramble seeds to unscramble potions
This commit is contained in:
@@ -21,6 +21,7 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
@@ -53,6 +54,7 @@ public class BPlayer {
|
||||
players.put(name, this);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static BPlayer get(Player player) {
|
||||
if (!players.isEmpty()) {
|
||||
return players.get(BUtil.playerString(player));
|
||||
@@ -61,6 +63,7 @@ public class BPlayer {
|
||||
}
|
||||
|
||||
// This method may be slow and should not be used if not needed
|
||||
@Nullable
|
||||
public static BPlayer getByName(String playerName) {
|
||||
if (P.useUUID) {
|
||||
for (Map.Entry<String, BPlayer> entry : players.entrySet()) {
|
||||
|
||||
Reference in New Issue
Block a user