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.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)
public class BanCMD extends PlexCommand
@ -146,9 +146,4 @@ public class BanCMD extends PlexCommand
}
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.util.PlexLog;
import dev.plex.util.PlexUtils;
import java.util.List;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.event.ClickEvent;
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.PlayerQuitEvent;
import java.util.List;
public class PlayerListener<T> extends PlexListener
{
// setting up a player's data
@ -96,7 +95,7 @@ public class PlayerListener<T> extends PlexListener
PlexPlayer player = DataUtils.getPlayer(event.getPlayer().getUniqueId());
if (player.isLockedUp())
{
Bukkit.getScheduler().runTaskLater(plugin, () -> event.getPlayer().openInventory(event.getInventory()), 1L);
Bukkit.getGlobalRegionScheduler().runDelayed(plugin, (scheduledTask) -> event.getPlayer().openInventory(event.getInventory()), 1L);
}
}