File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
src/main/java/org/maxgamer/quickshop/integration/plotsquared Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 2727import org .maxgamer .quickshop .integration .IntegrationStage ;
2828import org .maxgamer .quickshop .integration .QSIntegratedPlugin ;
2929import org .maxgamer .quickshop .util .Util ;
30+ import org .maxgamer .quickshop .util .reload .ReloadResult ;
31+ import org .maxgamer .quickshop .util .reload .ReloadStatus ;
3032
3133@ IntegrationStage (loadStage = IntegrateStage .onEnableAfter )
3234public class PlotSquaredIntegrationProxy extends QSIntegratedPlugin {
3335 private static QSIntegratedPlugin plotSquared ;
3436
3537 public PlotSquaredIntegrationProxy (QuickShop instance ) {
3638 super (instance );
39+ }
40+
41+ private void initInstance () {
3742 if (plotSquared == null ) {
3843 if (plugin .getServer ().getPluginManager ().getPlugin ("PlotSquared" ).getClass ().getPackage ().getName ().contains ("intellectualsite" )) {
39- plotSquared = new PlotSquaredIntegrationV4 (instance );
44+ plotSquared = new PlotSquaredIntegrationV4 (plugin );
4045 } else if (Util .isClassAvailable ("com.plotsquared.core.configuration.Caption" )) {
41- plotSquared = new PlotSquaredIntegrationV5 (instance );
46+ plotSquared = new PlotSquaredIntegrationV5 (plugin );
4247 } else {
43- plotSquared = new PlotSquaredIntegrationV6 (instance );
48+ plotSquared = new PlotSquaredIntegrationV6 (plugin );
4449 }
4550 }
4651 }
@@ -74,4 +79,10 @@ public void load() {
7479 public void unload () {
7580 plotSquared .unload ();
7681 }
82+
83+ @ Override
84+ public ReloadResult reloadModule () throws Exception {
85+ initInstance ();
86+ return ReloadResult .builder ().status (ReloadStatus .SUCCESS ).build ();
87+ }
7788}
You can’t perform that action at this time.
0 commit comments