1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-02-06 07:21:26 +01:00

Merge pull request #1690 from MachiganMC/master

Fix Job showing empty tops
This commit is contained in:
Zrips 2023-12-19 12:19:00 +02:00 committed by GitHub
commit 54c2cec9ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.*")