mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-06 09:36:40 +00:00
Many, many bug fixes
- Fix permission checks - Fix unban command - getOfflinePlexPlayer no longer uses cache - Register worlds before trying to load gamerules - Customizable ban messages
This commit is contained in:
@ -64,11 +64,10 @@ public class BanCMD extends PlexCommand
|
||||
punishment.setType(PunishmentType.BAN);
|
||||
punishment.setReason("");
|
||||
punishment.setPunishedUsername(plexPlayer.getName());
|
||||
//TODO: Debug End date
|
||||
punishment.setEndDate(new Date(Instant.now().plusSeconds(10/*PlexUtils.secondsToHours(24)*/).getEpochSecond()));
|
||||
punishment.setEndDate(new Date(Instant.now().plusSeconds(PlexUtils.hoursToSeconds(24)).getEpochSecond()));
|
||||
punishment.setCustomTime(false);
|
||||
plugin.getPunishmentManager().doPunishment(punishedPlayer, punishment);
|
||||
PlexUtils.broadcast(tl("unbanningPlayer", sender.getName(), plexPlayer.getName()));
|
||||
PlexUtils.broadcast(tl("banningPlayer", sender.getName(), plexPlayer.getName()));
|
||||
if (Bukkit.getPlayer(targetUUID) != null)
|
||||
{
|
||||
Bukkit.getPlayer(targetUUID).kick(componentFromString("&cYou've been banned."));
|
||||
@ -82,5 +81,4 @@ public class BanCMD extends PlexCommand
|
||||
{
|
||||
return args.length == 1 && isAdmin(sender) ? PlexUtils.getPlayerNameList() : ImmutableList.of();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user