Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
JiveOff committed Sep 13, 2023
2 parents 98bfedf + 60ae626 commit 9b90991
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@GameMetadata(
name = "Arena",
color = "&c",
description = "L'équipe avec le plus de kills à la fin du timer gagne !!!!",
description = "L'équipe avec le plus de kills à la fin du timer gagne ! Coucou :)",
authors = {"JiveOff"},
rules = @GameRules(
allowRespawn = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import org.bukkit.block.Block;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;

import java.util.List;
import java.util.Random;
Expand All @@ -29,8 +31,11 @@ public static ItemStack getTheShovel() {
return THE_SHOVEL;
}

public void allPlayersToSurvival() {
Core.get().getPlayerManager().getPlayingPlayers().forEach(player -> player.entity().setGameMode(org.bukkit.GameMode.SURVIVAL));
public void setupPlayers() {
Core.get().getPlayerManager().getPlayingPlayers().forEach(player -> {
player.entity().setGameMode(org.bukkit.GameMode.SURVIVAL);
player.entity().addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 20 * 420, 1, false, false, false));
});
}

public void setupTheShovel() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void beginGame() {
super.beginGame();

this.gameLogic.giveTheInventory();
this.gameLogic.allPlayersToSurvival();
this.gameLogic.setupPlayers();
this.gameLogic.startTimer();
}

Expand Down

0 comments on commit 9b90991

Please sign in to comment.