File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
src/main/java/org/hydev/mcpm/client/loader Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ package org .hydev .mcpm .client .loader ;
2
+
3
+ import org .bukkit .plugin .Plugin ;
4
+ import org .bukkit .plugin .java .JavaPlugin ;
5
+
6
+ import java .io .File ;
7
+
8
+ /**
9
+ * Entry point for plugin helper in order to reload itself
10
+ */
11
+ @ SuppressWarnings ("unused" )
12
+ public class PluginLoaderHelper extends JavaPlugin
13
+ {
14
+ /**
15
+ * Reload the mcpm plugin through the helper plugin
16
+ *
17
+ * @param instance Instance of the mcpm plugin
18
+ * @param jar Jar file path of the mcpm plugin
19
+ */
20
+ public void reloadMcpm (Plugin instance , File jar )
21
+ {
22
+ System .out .println ("Unloading MCPM..." );
23
+ PluginLoader .unloadPlugin (instance );
24
+ System .out .println ("Loading MCPM..." );
25
+ PluginLoader .loadPluginHelper (jar );
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments