diff --git a/src/main/java/dev/plex/command/impl/BanCMD.java b/src/main/java/dev/plex/command/impl/BanCMD.java index b116fb0..86b4017 100644 --- a/src/main/java/dev/plex/command/impl/BanCMD.java +++ b/src/main/java/dev/plex/command/impl/BanCMD.java @@ -88,7 +88,7 @@ public class BanCMD extends PlexCommand PlexUtils.broadcast(messageComponent("banningPlayer", sender.getName(), plexPlayer.getName())); if (player != null) { - player.kick(componentFromString("&cYou've been banned.")); + player.kick(Punishment.generateBanMessage(punishment)); } PlexLog.debug("(From /ban command) PunishedPlayer UUID: " + punishedPlayer.getUuid()); return null; diff --git a/src/main/java/dev/plex/command/impl/TempbanCMD.java b/src/main/java/dev/plex/command/impl/TempbanCMD.java new file mode 100644 index 0000000..f704211 --- /dev/null +++ b/src/main/java/dev/plex/command/impl/TempbanCMD.java @@ -0,0 +1,101 @@ +package dev.plex.command.impl; + +import com.google.common.collect.ImmutableList; +import dev.plex.cache.DataUtils; +import dev.plex.cache.PlayerCache; +import dev.plex.command.PlexCommand; +import dev.plex.command.annotation.CommandParameters; +import dev.plex.command.annotation.CommandPermissions; +import dev.plex.command.exception.PlayerNotBannedException; +import dev.plex.command.exception.PlayerNotFoundException; +import dev.plex.command.source.RequiredCommandSource; +import dev.plex.player.PlexPlayer; +import dev.plex.player.PunishedPlayer; +import dev.plex.punishment.Punishment; +import dev.plex.punishment.PunishmentType; +import dev.plex.rank.enums.Rank; +import dev.plex.util.PlexUtils; +import java.time.LocalDateTime; +import java.util.List; +import java.util.UUID; +import net.kyori.adventure.text.Component; +import org.apache.commons.lang.StringUtils; +import org.bukkit.Bukkit; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +@CommandParameters(name = "tempban", usage = "/