diff options
author | snowleo <schneeleo@gmail.com> | 2011-10-23 21:45:01 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-10-23 21:45:01 +0200 |
commit | 78884719823fb73d268bf9767189e85e7f916e41 (patch) | |
tree | 10e43a0d82d2db3b9c70d2ea3ee167db30682ad9 /EssentialsUpdate/src/com/earth2me/essentials/update/WorkListener.java | |
parent | 1b4b78d6e63ec54a5fceb604dffd1311b83bef8b (diff) | |
download | Essentials-78884719823fb73d268bf9767189e85e7f916e41.tar Essentials-78884719823fb73d268bf9767189e85e7f916e41.tar.gz Essentials-78884719823fb73d268bf9767189e85e7f916e41.tar.lz Essentials-78884719823fb73d268bf9767189e85e7f916e41.tar.xz Essentials-78884719823fb73d268bf9767189e85e7f916e41.zip |
Statemachine for installation wizard (WIP)
Diffstat (limited to 'EssentialsUpdate/src/com/earth2me/essentials/update/WorkListener.java')
-rw-r--r-- | EssentialsUpdate/src/com/earth2me/essentials/update/WorkListener.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/WorkListener.java b/EssentialsUpdate/src/com/earth2me/essentials/update/WorkListener.java new file mode 100644 index 000000000..da6bdb978 --- /dev/null +++ b/EssentialsUpdate/src/com/earth2me/essentials/update/WorkListener.java @@ -0,0 +1,38 @@ +package com.earth2me.essentials.update; + +import org.bukkit.entity.Player; +import org.bukkit.plugin.Plugin; + + +public abstract class WorkListener +{ + public WorkListener(final Plugin plugin, final VersionInfo newVersionInfo) + { + this.plugin = plugin; + this.newVersionInfo = newVersionInfo; + } + private final transient Plugin plugin; + private final transient VersionInfo newVersionInfo; + + public final void onWorkAbort() { + onWorkAbort(null); + } + + public abstract void onWorkAbort(String message); + + public final void onWorkDone() { + onWorkDone(null); + } + + public abstract void onWorkDone(String message); + + public VersionInfo getNewVersionInfo() + { + return newVersionInfo; + } + + public Plugin getPlugin() + { + return plugin; + } +} |