Skip to content

Commit

Permalink
Fix debug message for LuckPermsHook
Browse files Browse the repository at this point in the history
  • Loading branch information
jonagamerpro1234 committed Nov 24, 2022
1 parent 7b95c6a commit 306b1e0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public void loadConfig() {
try {

//Other
Settings.settings_debug = config.getBoolean("Config.Debug");
Settings.update = Objects.equals(config.getString("Config.Update"), "true");
Settings.c_type = config.getString("Config.Type");
Settings.is_Group_Display = Objects.requireNonNull(config.getString("Config.Type")).equalsIgnoreCase("group");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public class DisplayGui {
private Inventory inv;
private ItemStack item;
private ItemMeta meta;
private Player player;
private CustomJoinAndQuitMessages plugin;
private final Player player;
private final CustomJoinAndQuitMessages plugin;

public DisplayGui(Player player, CustomJoinAndQuitMessages plugin) {
this.player = player;
Expand All @@ -28,17 +28,16 @@ public void create() {

for (int i = 0; i < 54; i++) {
inv.setItem(i, setDecoration());
if (i == 54) {
break;
}
}
setItems();
}


public ItemStack setDecoration() {
item = XMaterial.BLACK_STAINED_GLASS_PANE.parseItem();
assert item != null;
meta = item.getItemMeta();
assert meta != null;
meta.setDisplayName(null);
item.setItemMeta(meta);
return item;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ public void onJoinListener(@NotNull PlayerJoinEvent e) {
PlayerManager playerManager = new PlayerManager();
playerManager.createPlayer(p, tempGroup);

Util.sendColorMessage(p, Util.getPrefix() + " &eLuckPermHook is: " + luckPermsHook.isEnabled());
if(Settings.settings_debug){
Logger.debug(" &eLuckPermHook is: " + luckPermsHook.isEnabled());
}

if (Settings.c_type.equalsIgnoreCase("group")){
if (luckPermsHook.isEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class Settings {
public static boolean is_Group_Display;
public static boolean update;
public static String c_type;
public static boolean settings_debug;

//Join section
public static String join_type;
Expand Down
2 changes: 1 addition & 1 deletion CustomJoinAndQuitMessagesOld/src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Config:
Update: true

# |Debug| shows you important information about the plugin loading
Debug: false
Debug: true

# |Type| the type is a way of knowing what is being used whether in the [normal] | [group] | [none] format
Type: normal
Expand Down

0 comments on commit 306b1e0

Please sign in to comment.