fix tick manager bigs

This commit is contained in:
Tyler Murphy 2021-08-13 21:52:26 -04:00
parent 45d710f748
commit 0c233f3ce4
2 changed files with 10 additions and 2 deletions

View file

@ -10,6 +10,10 @@ import net.tylermurphy.hideAndSeek.ICommand;
public class SetSeeker implements ICommand { public class SetSeeker implements ICommand {
public void execute(CommandSender sender, String[] args) { public void execute(CommandSender sender, String[] args) {
if(!status.equals("Standby") && !status.equals("Setup")) {
sender.sendMessage(errorPrefix + "Game is currently in session");
return;
}
String playerName; String playerName;
if(args.length < 1) { if(args.length < 1) {
playerName = sender.getName(); playerName = sender.getName();
@ -25,7 +29,7 @@ public class SetSeeker implements ICommand {
Hider.addEntry(temp.getName()); Hider.addEntry(temp.getName());
} }
Seeker.addEntry(player.getName()); Seeker.addEntry(player.getName());
sender.sendMessage(String.format("%s Set %s as the seaker.", messagePrefix, args[0])); sender.sendMessage(String.format("%s Set %s as the seaker.", messagePrefix, playerName));
} }
public String getLabel() { public String getLabel() {

View file

@ -35,6 +35,10 @@ public class TickManager {
checkTeams(); checkTeams();
for(Player player : playerList.values()) {
player.addPotionEffect(new PotionEffect(PotionEffectType.SATURATION, 1000000, 127, false, false));
}
if(status.equals("Standby") || status.equals("Setup")) { if(status.equals("Standby") || status.equals("Setup")) {
onStandby(); onStandby();
} else if(status.equals("Starting")) { } else if(status.equals("Starting")) {
@ -104,7 +108,7 @@ public class TickManager {
private static void onStandby() { private static void onStandby() {
for(Player player : playerList.values()) { for(Player player : playerList.values()) {
player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 1000000, 127, false, false)); player.addPotionEffect(new PotionEffect(PotionEffectType.HEAL, 1000000, 127, false, false));
} }
} }