Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/main/java/ch/njol/skript/classes/Serializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
import ch.njol.yggdrasil.Fields;
import ch.njol.yggdrasil.YggdrasilSerializer;

/**
* @author Peter Güttinger
*/
public abstract class Serializer<T> extends YggdrasilSerializer<T> {

@Nullable
Expand Down Expand Up @@ -79,10 +76,12 @@ public <E extends T> E newInstance(final Class<E> c) {
*/
@Override
public abstract Fields serialize(T o) throws NotSerializableException;

@Override
public abstract void deserialize(T o, Fields f) throws StreamCorruptedException, NotSerializableException;

public void deserialize(T o, Fields f) throws StreamCorruptedException, NotSerializableException {
throw new SkriptAPIException("deserialize(Object, Fields) has not been overridden in " + getClass() + " (serializer of " + info + ")");
}

/**
* Not currently used (everything happens on Bukkit's main thread).
*
Expand Down
Loading