Skip to content

Commit

Permalink
Remove glow in last 10s
Browse files Browse the repository at this point in the history
  • Loading branch information
iceBear67 committed Oct 14, 2024
1 parent 7538d2c commit 52dd3af
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
2 changes: 0 additions & 2 deletions src/main/java/dev/tylerm/khs/configuration/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ public class Config {
startingSeekerCount,
delayedRespawnDelay,
hidingTimer,
whenToHighlight,
endGameDelay;

public static float
Expand Down Expand Up @@ -153,7 +152,6 @@ public static void loadConfig() {
tauntCountdown = config.getBoolean("taunt.showCountdown");
tauntDelay = Math.max(60, config.getInt("taunt.delay"));
tauntLast = config.getBoolean("taunt.whenLastPerson");
whenToHighlight = config.getInt("whenToHighlight");

//Glow
blindnessWhenHit = config.getInt("blindnessWhenHit");
Expand Down
13 changes: 2 additions & 11 deletions src/main/java/dev/tylerm/khs/game/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import dev.tylerm.khs.game.util.WinType;
import org.bukkit.*;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect;
Expand Down Expand Up @@ -339,17 +340,7 @@ private void whilePlaying() {
if (gameTick % 20 == 0) {
if (gameLength > 0) {
board.reloadGameBoards();
if (gameTimer-- < whenToHighlight * 20) {
for (Player seeker : board.getSeekers()) {
for (Entity nearbyEntity : seeker.getNearbyEntities(2, 2, 2)) {
if(nearbyEntity instanceof Player player){
if(board.isHider(player)){
player.addPotionEffect(new PotionEffect(PotionEffectType.GLOWING, 20, 1));
}
}
}
}
}
gameTimer--;
}
if (currentMap.isWorldBorderEnabled()) currentMap.getWorldBorder().update();
if (tauntEnabled) taunt.update();
Expand Down
3 changes: 0 additions & 3 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ spawnPatch: false
# default: 300 aka 5min
gameLength: 300

# The last seconds in the game we'll highlight hiders around seekers.
whenToHighlight: 10

# How long will be added into the timer when a seeker is found
extendPerKill: 30

Expand Down

0 comments on commit 52dd3af

Please sign in to comment.