Loading in boosters (still untested) started on having proxy communicate booster updates to the server
This commit is contained in:
@@ -9,6 +9,7 @@ import com.alttd.vboosters.commands.BoosterCommand;
|
||||
import com.alttd.vboosters.commands.DonorRankCommand;
|
||||
import com.alttd.vboosters.listeners.PluginMessageListener;
|
||||
import com.alttd.vboosters.managers.BoosterManager;
|
||||
import com.alttd.vboosters.storage.VelocityBoosterStorage;
|
||||
import com.google.inject.Inject;
|
||||
import com.velocitypowered.api.event.Subscribe;
|
||||
import com.velocitypowered.api.event.proxy.ProxyInitializeEvent;
|
||||
@@ -54,6 +55,7 @@ public class VelocityBoosters {
|
||||
server.getEventManager().register(this, new PluginMessageListener(channelIdentifier));
|
||||
|
||||
loadCommands();
|
||||
VelocityBoosterStorage.getVelocityBoosterStorage(); //this loads the boosters in
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
|
||||
@@ -124,6 +124,9 @@ public class VelocityBooster implements Booster {
|
||||
setDuration(getTimeRemaining());
|
||||
setActive(false);
|
||||
saveBooster();
|
||||
if (!finished) {
|
||||
//TODO send plugin message that its stopped
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -136,6 +139,7 @@ public class VelocityBooster implements Booster {
|
||||
public void finish() { //TODO finish it on the servers as well
|
||||
finished = true;
|
||||
stopBooster();
|
||||
//TODO send plugin message that this is finished
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user