2018-09-26 02:07:46 -06:00
|
|
|
package com.esophose.playerparticles.command;
|
|
|
|
|
2018-10-07 21:18:19 -06:00
|
|
|
import java.util.ArrayList;
|
2018-09-26 02:07:46 -06:00
|
|
|
import java.util.List;
|
|
|
|
|
2018-09-26 23:31:00 -06:00
|
|
|
import com.esophose.playerparticles.manager.DataManager;
|
|
|
|
import com.esophose.playerparticles.manager.LangManager;
|
2018-09-26 02:07:46 -06:00
|
|
|
import com.esophose.playerparticles.manager.LangManager.Lang;
|
|
|
|
import com.esophose.playerparticles.particles.PPlayer;
|
2018-09-26 23:31:00 -06:00
|
|
|
import com.esophose.playerparticles.particles.ParticleGroup;
|
2018-09-26 02:07:46 -06:00
|
|
|
|
|
|
|
public class ResetCommandModule implements CommandModule {
|
|
|
|
|
2018-09-27 18:16:50 -06:00
|
|
|
public void onCommandExecute(PPlayer pplayer, String[] args) {
|
2018-10-06 13:53:31 -06:00
|
|
|
int particleCount = pplayer.getActiveParticles().size();
|
|
|
|
DataManager.saveParticleGroup(pplayer.getUniqueId(), ParticleGroup.getDefaultGroup());
|
|
|
|
LangManager.sendMessage(pplayer, Lang.RESET_SUCCESS, particleCount);
|
2018-09-27 18:16:50 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
public List<String> onTabComplete(PPlayer pplayer, String[] args) {
|
2019-04-28 00:17:08 -06:00
|
|
|
return new ArrayList<>();
|
2018-09-27 18:16:50 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
public String getName() {
|
|
|
|
return "reset";
|
|
|
|
}
|
2018-09-26 02:07:46 -06:00
|
|
|
|
2018-09-29 17:27:37 -06:00
|
|
|
public Lang getDescription() {
|
2018-10-01 22:23:05 -06:00
|
|
|
return Lang.COMMAND_DESCRIPTION_RESET;
|
2018-09-27 18:16:50 -06:00
|
|
|
}
|
2018-09-26 02:07:46 -06:00
|
|
|
|
2018-09-27 18:16:50 -06:00
|
|
|
public String getArguments() {
|
|
|
|
return "";
|
|
|
|
}
|
2018-09-26 02:07:46 -06:00
|
|
|
|
2018-09-27 18:16:50 -06:00
|
|
|
public boolean requiresEffects() {
|
|
|
|
return false;
|
|
|
|
}
|
2018-09-26 02:07:46 -06:00
|
|
|
|
|
|
|
}
|