mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Move potion effects so they dont trigger on accident
This commit is contained in:
parent
dd20a06f80
commit
d15228656f
@ -14,6 +14,8 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.WorldCreator;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.zeroturnaround.zip.ZipUtil;
|
||||
|
||||
import java.awt.*;
|
||||
@ -59,6 +61,11 @@ public class IrisProject
|
||||
{
|
||||
sender.sendMessage("Can't find dimension: " + getName());
|
||||
return;
|
||||
} else if(sender.isPlayer()){
|
||||
sender.player().setGameMode(GameMode.SPECTATOR);
|
||||
sender.player().addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 2000, 10));
|
||||
sender.player().addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION, 2000, 10));
|
||||
sender.player().spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(C.BLUE + "Creating studio world. Please wait..."));
|
||||
}
|
||||
|
||||
J.attemptAsync(() ->
|
||||
|
@ -2,15 +2,9 @@ package com.volmit.iris.manager.command.studio;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.util.C;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MortarCommand;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
public class CommandIrisStudioOpen extends MortarCommand
|
||||
{
|
||||
@ -42,14 +36,6 @@ public class CommandIrisStudioOpen extends MortarCommand
|
||||
return true;
|
||||
}
|
||||
|
||||
if(sender.isPlayer())
|
||||
{
|
||||
sender.player().setGameMode(GameMode.SPECTATOR);
|
||||
sender.player().addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 2000, 10));
|
||||
sender.player().addPotionEffect(new PotionEffect(PotionEffectType.CONFUSION, 2000, 10));
|
||||
sender.player().spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(C.BLUE + "Creating studio world. Please wait..."));
|
||||
}
|
||||
|
||||
Iris.proj.open(sender, args[0]);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user