1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-04-06 12:16:20 +02:00
This commit is contained in:
Zrips 2023-12-19 12:57:40 +02:00
commit a2018cb7c9
2 changed files with 2 additions and 4 deletions

View File

@ -6,11 +6,9 @@ import com.gamingmesh.jobs.container.TopList;
import com.gamingmesh.jobs.i18n.Language;
import net.Zrips.CMILib.Container.PageInfo;
import net.Zrips.CMILib.Locale.LC;
import net.Zrips.CMILib.Logs.CMIDebug;
import net.Zrips.CMILib.Messages.CMIMessages;
import net.Zrips.CMILib.Scoreboards.CMIScoreboard;
import net.Zrips.CMILib.Version.Schedulers.CMIScheduler;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@ -108,7 +106,7 @@ public class gtop implements Cmd {
private static boolean hasToBeSeenInGlobalTop(TopList topList) {
Player player = topList.getPlayerInfo().getJobsPlayer().getPlayer();
if (player != null)
return !player.isPermissionSet("jobs.hidegtop");
return !player.hasPermission("jobs.hidegtop");
return !Jobs.getVaultPermission().playerHas(
null,
Bukkit.getOfflinePlayer(topList.getPlayerInfo().getUuid()),

View File

@ -113,7 +113,7 @@ public class top implements Cmd {
private static boolean hasToBeSeenInTop(TopList topList, Job job) {
Player player = topList.getPlayerInfo().getJobsPlayer().getPlayer();
if (player != null)
return !player.isPermissionSet("jobs.hidetop.*") || !player.isPermissionSet("jobs.hidetop." + job.getName().toLowerCase());
return !(player.hasPermission("jobs.hidetop.*") || player.hasPermission("jobs.hidetop." + job.getName().toLowerCase()));
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(topList.getPlayerInfo().getUuid());
return !(Jobs.getVaultPermission().playerHas(null, offlinePlayer, "jobs.hidetop.*")