Make EventMassiveCore serialization safe

This commit is contained in:
Magnus Ulf Jørgensen 2017-02-18 13:13:26 +01:00
parent 145a9e5054
commit 7fd631bebe

View File

@ -1,19 +1,20 @@
package com.massivecraft.massivecore.event; package com.massivecraft.massivecore.event;
import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.event.Event; import org.bukkit.event.Event;
import com.massivecraft.massivecore.collections.MassiveMap;
public abstract class EventMassiveCore extends Event implements Runnable, Cancellable public abstract class EventMassiveCore extends Event implements Runnable, Cancellable
{ {
// -------------------------------------------- // // -------------------------------------------- //
// FIELDS // FIELDS
// -------------------------------------------- // // -------------------------------------------- //
private final Map<String, Object> customData = new LinkedHashMap<String, Object>(); private final transient Map<String, Object> customData = new MassiveMap<>();
public Map<String, Object> getCustomData() { return this.customData; } public Map<String, Object> getCustomData() { return this.customData; }
private boolean cancelled = false; private boolean cancelled = false;