Added bugs bunny quotes
This commit is contained in:
parent
3c241c48bc
commit
8da2431415
@ -1,5 +1,10 @@
|
||||
package mineplex.core.gadget.gadgets.morph;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -10,20 +15,32 @@ import com.mojang.authlib.GameProfile;
|
||||
import mineplex.core.common.skin.SkinData;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguisePlayer;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.hologram.Hologram;
|
||||
import mineplex.core.utils.UtilGameProfile;
|
||||
|
||||
public class MorphAwkwardRabbit extends MorphGadget
|
||||
{
|
||||
|
||||
private List<String> _quotes = new ArrayList<>();
|
||||
|
||||
public MorphAwkwardRabbit(GadgetManager manager)
|
||||
{
|
||||
super(manager, "Awkward Rabbit Morph", UtilText.splitLinesToArray(new String[]{C.cGray + "Dale was the most awkward of Rabbits."}, LineFormat.LORE),
|
||||
-19, Material.SKULL_ITEM, (byte) 0);
|
||||
_quotes.addAll(Arrays.asList(
|
||||
"Eh, what's up, doc?",
|
||||
"That's all, folks.",
|
||||
"Gee, ain't I a stinker?",
|
||||
"Carrots are devine...",
|
||||
"I know this defies the\n law of gravity,\n but I never studied law!",
|
||||
"I don’t ask questions,\n I just have fun",
|
||||
"Hey, just a minute you!\n Them’s fightin’ words!"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -56,7 +73,24 @@ public class MorphAwkwardRabbit extends MorphGadget
|
||||
if (event.isSneaking())
|
||||
return;
|
||||
|
||||
|
||||
Location randomLoc = event.getPlayer().getLocation().clone();
|
||||
int[] rPos = new int[]{-2, -1, 0, 1, 2};
|
||||
int rX = rPos[UtilMath.random.nextInt(rPos.length)], rZ = rPos[UtilMath.random.nextInt(rPos.length)];
|
||||
|
||||
randomLoc.add(rX, 1, rZ);
|
||||
|
||||
String quote = _quotes.get(UtilMath.random.nextInt(_quotes.size()));
|
||||
Hologram hologram;
|
||||
if (quote.contains("*nl*"))
|
||||
{
|
||||
String[] lines = quote.split("\n");
|
||||
hologram = new Hologram(Manager.getHologramManager(), randomLoc, true, 2000, lines);
|
||||
}
|
||||
else
|
||||
{
|
||||
hologram = new Hologram(Manager.getHologramManager(), randomLoc, true, 2000, quote);
|
||||
}
|
||||
hologram.start();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user