Use smaller object footprint when abandoning conversation

This commit is contained in:
PikaMug 2020-08-23 21:25:25 -04:00
parent bcb8e75de0
commit ecaf8cb06b
2 changed files with 10 additions and 10 deletions

View File

@ -136,10 +136,10 @@ public class QuestFactory implements ConversationAbandonedListener {
if (abandonedEvent.getContext().getSessionData(CK.Q_NAME) != null) {
editingQuestNames.remove(abandonedEvent.getContext().getSessionData(CK.Q_NAME));
}
final Player player = (Player) abandonedEvent.getContext().getForWhom();
selectedBlockStarts.remove(player.getUniqueId());
selectedKillLocations.remove(player.getUniqueId());
selectedReachLocations.remove(player.getUniqueId());
final UUID uuid = ((Player) abandonedEvent.getContext().getForWhom()).getUniqueId();
selectedBlockStarts.remove(uuid);
selectedKillLocations.remove(uuid);
selectedReachLocations.remove(uuid);
}
public Prompt returnToMenu(final ConversationContext context) {

View File

@ -126,12 +126,12 @@ public class ActionFactory implements ConversationAbandonedListener {
@Override
public void conversationAbandoned(final ConversationAbandonedEvent abandonedEvent) {
final Player player = (Player) abandonedEvent.getContext().getForWhom();
selectedExplosionLocations.remove(player.getUniqueId());
selectedEffectLocations.remove(player.getUniqueId());
selectedMobLocations.remove(player.getUniqueId());
selectedLightningLocations.remove(player.getUniqueId());
selectedTeleportLocations.remove(player.getUniqueId());
final UUID uuid = ((Player) abandonedEvent.getContext().getForWhom()).getUniqueId();
selectedExplosionLocations.remove(uuid);
selectedEffectLocations.remove(uuid);
selectedMobLocations.remove(uuid);
selectedLightningLocations.remove(uuid);
selectedTeleportLocations.remove(uuid);
}
public Prompt returnToMenu(final ConversationContext context) {