Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.niccholaspage.TehDeathPlugin;
- import java.util.Random;
- public enum DeathMessage {
- PLAYER("%a fucking pwned %v wielding %h"),
- CACTUS("The cactus won the shoot out against %v"),
- DROWN("%v sank like the Titanic", "%v doesn't have gills"),
- CHICKEN("%v tried to hit a chicken, but the chicken hit back", "%v thought chickens were weak"),
- ENDERMAN("%v got owned by an Enderman"),
- CREEPER("%v tried to hug a creeper", "A giant green penis snuck up on %v"),
- SKELETON("%v got owned by a skeleton", "%v loves getting owned by undead arrows"),
- SPIDER("%v attempted to ride a spider"),
- ZOMBIE("%v tried to get rotten flesh"),
- WOLF("%v attempted wolf abuse"),
- FALL("%v tested gravity. Yup, still works.", "%v tried to roll. Better luck next time.", "%v was owned by gravity"),
- SUICIDE("%v was done with life"),
- HUNGER("%v was too skinny", "%v starved"),
- TnT("%v was blown up by TnT", "%v tried to grief but failed", "%v became a million pieces"),
- LIGHTNING("%v was standing in the wrong place in the rain", "%v was shocked by lightning"),
- FIRE("%v is on fire today"),
- GHAST("%v was fooling around in the nether"),
- PIG_ZOMBIE("%v lost to an undead golden sword"),
- WITHER("%v has lost to three heads"),
- VOID("%v has fell into space"),
- SUFFOCATION("%v became a sandwich"),
- PROJECTILE("%v cannot dodge arrows"),
- LAVA("%v thought lava was water", "%v lost the battle of lava vs human"),
- POISON("%v, that wasn't lemonade"),
- MELTING("%v because stew"),
- MAGIC("%v was killed by witchcraft"),
- FALLING_BLOCK("Minecraft is not a cartoon, %v"),
- EPIC_FAIL("%v herped");
- private String[] messages;
- private DeathMessage(String... messages){
- this.messages = messages;
- }
- public String parse(String victim, String held){
- return parse(victim, held, null);
- }
- public String parse(String victim, String held, String attacker){
- String randomMessage = messages[new Random().nextInt(messages.length)];
- if (victim != null){
- randomMessage = randomMessage.replace("%v", victim);
- }
- if (held != null){
- randomMessage = randomMessage.replace("%h", held);
- }
- if (attacker != null){
- randomMessage = randomMessage.replace("%a", attacker);
- }
- return randomMessage;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement