Potential ban fixes

This commit is contained in:
Esophose 2019-08-14 22:26:47 -06:00
parent cb0e3ee281
commit 6bb498c607
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ public class Ban {
skyblock.getIslandManager().getIsland(Bukkit.getServer().getOfflinePlayer(islandOwnerUUID))
.getAPIWrapper(),
Bukkit.getServer().getOfflinePlayer(issuer), Bukkit.getServer().getOfflinePlayer(banned));
Bukkit.getScheduler().runTask(skyblock, () -> Bukkit.getServer().getPluginManager().callEvent(islandBanEvent));
Bukkit.getScheduler().scheduleSyncDelayedTask(skyblock, () -> Bukkit.getServer().getPluginManager().callEvent(islandBanEvent));
if (!islandBanEvent.isCancelled()) {
List<String> islandBans = new ArrayList<>();

View File

@ -223,7 +223,7 @@ public class Bans {
nInv.createItem(SkullUtil.create(targetPlayerTexture[0], targetPlayerTexture[1]),
ChatColor.translateAlternateColorCodes('&',
configLoad.getString("Menu.Bans.Item.Ban.Displayname")
.replace("%player", targetPlayerName)),
.replace("%player", targetPlayerName == null ? "" : targetPlayerName)),
configLoad.getStringList("Menu.Bans.Item.Ban.Lore"), null, null, null),
inventorySlot);
}