Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void PlayerOpen(final InventoryOpenEvent event) {
- event.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 100000, 200));
- }
- @EventHandler
- public void PlayerClose(final InventoryCloseEvent event) {
- final Player player = (Player)event.getPlayer();
- for (final PotionEffect potionEffect : player.getActivePotionEffects()) {
- player.removePotionEffect(potionEffect.getType());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement