Minor fix

This commit is contained in:
Telesphoreo 2024-01-27 15:56:40 -06:00
parent 7298c8669a
commit 6ce4843829
No known key found for this signature in database
GPG Key ID: 9D1991811E093C02
2 changed files with 3 additions and 9 deletions

View File

@ -31,7 +31,7 @@ import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@CommandParameters(name = "ban", usage = "/<command> <player> [-nrb] [reason] [-nrb]", aliases = "offlineban,gtfo", description = "Bans a player, offline or online") @CommandParameters(name = "ban", usage = "/<command> <player> [reason] [-nrb]", aliases = "offlineban,gtfo", description = "Bans a player, offline or online")
@CommandPermissions(permission = "plex.ban", source = RequiredCommandSource.ANY) @CommandPermissions(permission = "plex.ban", source = RequiredCommandSource.ANY)
public class BanCMD extends PlexCommand public class BanCMD extends PlexCommand
@ -146,9 +146,4 @@ public class BanCMD extends PlexCommand
} }
return Collections.emptyList(); return Collections.emptyList();
} }
private void kickPlayer(Player player, Punishment punishment)
{
}
} }

View File

@ -6,6 +6,7 @@ import dev.plex.meta.PlayerMeta;
import dev.plex.player.PlexPlayer; import dev.plex.player.PlexPlayer;
import dev.plex.util.PlexLog; import dev.plex.util.PlexLog;
import dev.plex.util.PlexUtils; import dev.plex.util.PlexUtils;
import java.util.List;
import net.kyori.adventure.text.Component; import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.event.ClickEvent; import net.kyori.adventure.text.event.ClickEvent;
import net.kyori.adventure.text.format.NamedTextColor; import net.kyori.adventure.text.format.NamedTextColor;
@ -18,8 +19,6 @@ import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerQuitEvent;
import java.util.List;
public class PlayerListener<T> extends PlexListener public class PlayerListener<T> extends PlexListener
{ {
// setting up a player's data // setting up a player's data
@ -96,7 +95,7 @@ public class PlayerListener<T> extends PlexListener
PlexPlayer player = DataUtils.getPlayer(event.getPlayer().getUniqueId()); PlexPlayer player = DataUtils.getPlayer(event.getPlayer().getUniqueId());
if (player.isLockedUp()) if (player.isLockedUp())
{ {
Bukkit.getScheduler().runTaskLater(plugin, () -> event.getPlayer().openInventory(event.getInventory()), 1L); Bukkit.getGlobalRegionScheduler().runDelayed(plugin, (scheduledTask) -> event.getPlayer().openInventory(event.getInventory()), 1L);
} }
} }