mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-25 00:26:21 +01:00
Rolls back Fixed withdraw GUI and parties glitching out when players are kicked
This commit is contained in:
parent
0ecb0cad21
commit
bafd3e81b1
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user