From 88ed2690419cd48f9c71cac0642e492e5a79fde1 Mon Sep 17 00:00:00 2001 From: Zrips Date: Tue, 6 Jul 2021 13:04:20 +0300 Subject: [PATCH] No need to have option to hide vanished and... we actually need to hide them --- .../java/com/gamingmesh/jobs/config/GeneralConfigManager.java | 4 +--- src/main/java/com/gamingmesh/jobs/stuff/TabComplete.java | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java b/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java index 1ab4c546..472848fd 100644 --- a/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/GeneralConfigManager.java @@ -96,7 +96,7 @@ public class GeneralConfigManager { EmptyServerAccountActionBar, ActionBarsMessageByDefault, aBarSilentMode, ShowTotalWorkers, ShowPenaltyBonus, useDynamicPayment, JobsGUIOpenOnBrowse, JobsGUIShowChatBrowse, JobsGUISwitcheButtons, ShowActionNames, hideItemAttributes, DisableJoiningJobThroughGui, FireworkLevelupUse, UseRandom, UsePerPermissionForLeaving, - EnableConfirmation, FilterHiddenPlayerFromTabComplete, jobsInfoOpensBrowse, MonsterDamageUse, useMaxPaymentCurve, + EnableConfirmation, jobsInfoOpensBrowse, MonsterDamageUse, useMaxPaymentCurve, hideJobsInfoWithoutPermission, UseTaxes, TransferToServerAccount, TakeFromPlayersPayment, AutoJobJoinUse, AllowDelevel, BossBarEnabled = false, BossBarShowOnEachAction = false, BossBarsMessageByDefault = false, ExploreCompact, DBCleaningJobsUse, DBCleaningUsersUse, DisabledWorldsUse, UseAsWhiteListWorldList, PaymentMethodsMoney, PaymentMethodsPoints, PaymentMethodsExp, MythicMobsEnabled, @@ -1002,8 +1002,6 @@ public class GeneralConfigManager { c.addComment("JobsGUI.SkipAmount", "Defines by how many slots we need to skip after group"); JobsGUISkipAmount = c.get("JobsGUI.SkipAmount", 2); - c.addComment("Commands.FilterHiddenPlayersInTabComplete", "Do you want to filter the hidden player names from tab-complete?"); - FilterHiddenPlayerFromTabComplete = c.get("Commands.FilterHiddenPlayersInTabComplete", false); c.addComment("Commands.PageRow.JobsTop.AmountToShow", "Defines amount of players to be shown in one page for /jobs top & /jobs gtop"); JobsTopAmount = c.get("Commands.PageRow.JobsTop.AmountToShow", 15); c.addComment("Commands.PageRow.Placeholders.AmountToShow", "Defines amount of placeholders to be shown in one page for /jobs placeholders"); diff --git a/src/main/java/com/gamingmesh/jobs/stuff/TabComplete.java b/src/main/java/com/gamingmesh/jobs/stuff/TabComplete.java index f186de76..8c809c5c 100644 --- a/src/main/java/com/gamingmesh/jobs/stuff/TabComplete.java +++ b/src/main/java/com/gamingmesh/jobs/stuff/TabComplete.java @@ -89,8 +89,7 @@ public final class TabComplete implements TabCompleter { case "[playername]": for (Player player : Bukkit.getOnlinePlayers()) { // ignore hidden players - if (Jobs.getGCManager().FilterHiddenPlayerFromTabComplete && (player.hasMetadata("vanished") - || (sender instanceof Player && ((Player) sender).canSee(player)))) { + if (player.hasMetadata("vanished") || (sender instanceof Player && !((Player) sender).canSee(player))) { continue; }