Skip to content

Commit

Permalink
Blindness added
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanOff committed Jan 18, 2021
1 parent d041344 commit 41ad193
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions com/gaetan/staffpin/data/PlayerData.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;

public final class PlayerData {
/**
Expand Down Expand Up @@ -96,6 +98,7 @@ public void join() {
this.gameMode = this.player.getGameMode();
this.location = this.player.getLocation();
this.player.setGameMode(GameMode.SPECTATOR);
this.player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 400, 255));
this.clearInventory();
this.pinCooldown();
return;
Expand All @@ -118,6 +121,7 @@ public void correct() {
this.player.updateInventory();
this.player.teleport(this.getLocation());
this.player.setGameMode(this.getGameMode());
this.player.removePotionEffect(PotionEffectType.BLINDNESS);
this.setInventory(null);
}

Expand Down

0 comments on commit 41ad193

Please sign in to comment.