Rolls back Fixed withdraw GUI and parties glitching out when players are kicked

This commit is contained in:
Jules 2024-09-21 14:46:51 +02:00
parent 0ecb0cad21
commit bafd3e81b1
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,5 @@
package net.Indyuce.mmocore.api.eco;
import io.lumine.mythic.lib.api.event.PlayerLogoutEvent;
import io.lumine.mythic.lib.api.util.SmartGive;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.ConfigMessage;
@ -14,6 +13,7 @@ import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.inventory.ItemStack;
import java.util.HashSet;
@ -114,7 +114,7 @@ public class Withdraw implements Listener {
}
@EventHandler
public void c(PlayerLogoutEvent event) {
public void c(PlayerQuitEvent event) {
if (event.getPlayer().equals(player)) close();
}
}

View File

@ -1,6 +1,5 @@
package net.Indyuce.mmocore.party.provided;
import io.lumine.mythic.lib.api.event.PlayerLogoutEvent;
import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.ConfigMessage;
import net.Indyuce.mmocore.api.event.social.PartyChatEvent;
@ -11,6 +10,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.event.player.PlayerQuitEvent;
public class PartyListener implements Listener {
private final MMOCorePartyModule module;
@ -42,7 +42,7 @@ public class PartyListener implements Listener {
}
@EventHandler(priority = EventPriority.LOW)
public void leavePartyOnQuit(PlayerLogoutEvent event) {
public void leavePartyOnQuit(PlayerQuitEvent event) {
final PlayerData playerData = PlayerData.get(event.getPlayer());
final AbstractParty party = playerData.getParty();
if (party != null) ((Party) party).removeMember(playerData);