Half fixes
This commit is contained in:
parent
7385a1e94e
commit
ec269e6bd3
|
@ -4,6 +4,7 @@ import com.songoda.ultimatemoderation.UltimateModeration;
|
|||
import com.songoda.ultimatemoderation.punish.PunishmentNote;
|
||||
import com.songoda.ultimatemoderation.punish.PunishmentType;
|
||||
import com.songoda.ultimatemoderation.punish.player.PlayerPunishData;
|
||||
import com.songoda.ultimatemoderation.tickets.TicketStatus;
|
||||
import com.songoda.ultimatemoderation.utils.gui.AbstractGUI;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
|
@ -73,7 +74,8 @@ public class GUIPlayers extends AbstractGUI {
|
|||
lore.add(plugin.getLocale().getMessage("gui.players.click"));
|
||||
lore.add("");
|
||||
|
||||
int ticketAmt = plugin.getTicketManager().getTicketsAbout(pl).size();
|
||||
int ticketAmt = plugin.getTicketManager().getTicketsAbout(pl).stream()
|
||||
.filter(t -> t.getStatus() == TicketStatus.OPEN).collect(Collectors.toList()).size();
|
||||
|
||||
if (ticketAmt == 0)
|
||||
lore.add(plugin.getLocale().getMessage("gui.players.notickets"));
|
||||
|
|
|
@ -61,7 +61,11 @@ public class Punishment {
|
|||
+ plugin.getLocale().getMessage("event.ban.already"));
|
||||
return;
|
||||
}
|
||||
sendMessage(victim);
|
||||
if (victim.isOnline()) {
|
||||
victim.getPlayer().kickPlayer(plugin.getLocale().getMessage("event.ban.message",
|
||||
reason == null ? "" : reason,
|
||||
Methods.makeReadable(duration)));
|
||||
}
|
||||
break;
|
||||
case MUTE:
|
||||
if (!playerPunishData.getActivePunishments(PunishmentType.MUTE).isEmpty()) {
|
||||
|
@ -69,7 +73,10 @@ public class Punishment {
|
|||
+ plugin.getLocale().getMessage("event.mute.already"));
|
||||
return;
|
||||
}
|
||||
sendMessage(victim);
|
||||
if (victim.isOnline()) {
|
||||
victim.getPlayer().sendMessage(plugin.getReferences().getPrefix() + plugin.getLocale().getMessage("event.mute.message",
|
||||
reason, Methods.makeReadable(duration)));
|
||||
}
|
||||
break;
|
||||
case KICK:
|
||||
case WARNING:
|
||||
|
|
|
@ -74,8 +74,8 @@ gui.general.templatename = "Template Name"
|
|||
gui.players.title = "&8Players"
|
||||
gui.players.click = "&6Click to view player."
|
||||
gui.players.notickets = "&7No tickets currently opened about this player."
|
||||
gui.players.tickets = "&7This player has received &6%amount% &7tickets."
|
||||
gui.players.ticketsone = "&7This player has received &61 &7ticket."
|
||||
gui.players.tickets = "&7This player has &6%amount% &7open tickets."
|
||||
gui.players.ticketsone = "&7This player has &61 &7open ticket."
|
||||
gui.players.nowarnings = "&7No warnings recorded."
|
||||
gui.players.warnings = "&7This player has received &6%amount% &7warnings."
|
||||
gui.players.warningsone = "&7This player has received &61 &7warning."
|
||||
|
|
Loading…
Reference in New Issue