mirror of
https://github.com/SunNetservers/MiniGames.git
synced 2025-07-13 11:34:43 +02:00
Fixes some bugs
Fixes the win block type causing a win even when the win location is set. Fixes the leave command only working for dropper arenas. Fixes the command listener only cancelling command usage while in a dropper arena. Fixes only dropper sessions being quit when the server stops.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
package net.knarcraft.minigames.command;
|
||||
|
||||
import net.knarcraft.minigames.MiniGames;
|
||||
import net.knarcraft.minigames.arena.dropper.DropperArenaSession;
|
||||
import net.knarcraft.minigames.arena.ArenaSession;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabExecutor;
|
||||
@ -25,10 +25,9 @@ public class LeaveArenaCommand implements TabExecutor {
|
||||
return false;
|
||||
}
|
||||
|
||||
DropperArenaSession existingSession = MiniGames.getInstance().getDropperArenaPlayerRegistry().getArenaSession(
|
||||
player.getUniqueId());
|
||||
ArenaSession existingSession = MiniGames.getInstance().getSession(player.getUniqueId());
|
||||
if (existingSession == null) {
|
||||
commandSender.sendMessage("You are not in a dropper arena!");
|
||||
commandSender.sendMessage("You are not in a mini-games arena!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user