add item commands

This commit is contained in:
2026-04-01 18:18:05 +08:00
commit c9ae8e02e1
246 changed files with 51813 additions and 0 deletions

36
v1_12_r1/pom.xml Normal file
View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>BedwarsRel-Parent</artifactId>
<groupId>io.github.bedwarsrel</groupId>
<version>1.3.6</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.bedwarsrel.com</groupId>
<artifactId>BedwarsRel-v1_12_r1</artifactId>
<dependencies>
<dependency>
<groupId>io.github.bedwarsrel</groupId>
<artifactId>BedwarsRel-Common</artifactId>
<version>${project.parent.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.12-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.spigotmc</groupId>
<artifactId>minecraft-server</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,20 @@
package io.github.bedwarsrel.com.v1_12_r1;
import net.minecraft.server.v1_12_R1.ChatMessageType;
import net.minecraft.server.v1_12_R1.IChatBaseComponent;
import net.minecraft.server.v1_12_R1.IChatBaseComponent.ChatSerializer;
import net.minecraft.server.v1_12_R1.PacketPlayOutChat;
import org.bukkit.ChatColor;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
public class ActionBar {
public static void sendActionBar(Player player, String message) {
String s = ChatColor.translateAlternateColorCodes('&', message.replace("_", " "));
IChatBaseComponent icbc = ChatSerializer.a("{\"text\": \"" + s + "\"}");
PacketPlayOutChat bar = new PacketPlayOutChat(icbc, ChatMessageType.GAME_INFO);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(bar);
}
}

View File

@@ -0,0 +1,99 @@
package io.github.bedwarsrel.com.v1_12_r1;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.server.v1_12_R1.Entity;
import net.minecraft.server.v1_12_R1.EntityTypes;
import net.minecraft.server.v1_12_R1.MinecraftKey;
import net.minecraft.server.v1_12_R1.RegistryMaterials;
@SuppressWarnings("rawtypes")
public class CustomEntityRegistry extends RegistryMaterials {
private static CustomEntityRegistry instance = null;
private final BiMap<MinecraftKey, Class<? extends Entity>> customEntities = HashBiMap.create();
private final BiMap<Class<? extends Entity>, MinecraftKey> customEntityClasses =
this.customEntities.inverse();
private final Map<Class<? extends Entity>, Integer> customEntityIds = new HashMap<>();
private final RegistryMaterials wrapped;
private CustomEntityRegistry(RegistryMaterials original) {
this.wrapped = original;
}
public static void addCustomEntity(int entityId, String entityName,
Class<? extends Entity> entityClass) {
getInstance().putCustomEntity(entityId, entityName, entityClass);
}
public static CustomEntityRegistry getInstance() {
if (instance != null) {
return instance;
}
instance = new CustomEntityRegistry(EntityTypes.b);
try {
// TODO: Update name on version change (RegistryMaterials)
Field registryMaterialsField = EntityTypes.class.getDeclaredField("b");
registryMaterialsField.setAccessible(true);
Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiersField.setInt(registryMaterialsField,
registryMaterialsField.getModifiers() & ~Modifier.FINAL);
registryMaterialsField.set(null, instance);
} catch (Exception e) {
instance = null;
throw new RuntimeException("Unable to override the old entity RegistryMaterials", e);
}
return instance;
}
@SuppressWarnings("unchecked")
@Override
public int a(Object key) { // TODO: Update name on version change (getId)
if (this.customEntityIds.containsKey(key)) {
return this.customEntityIds.get(key);
}
return this.wrapped.a(key);
}
@SuppressWarnings("unchecked")
@Override
public MinecraftKey b(Object value) { // TODO: Update name on version change (getKey)
if (this.customEntityClasses.containsKey(value)) {
return this.customEntityClasses.get(value);
}
return (MinecraftKey) wrapped.b(value);
}
@SuppressWarnings("unchecked")
@Override
public Class<? extends Entity> get(Object key) {
if (this.customEntities.containsKey(key)) {
return this.customEntities.get(key);
}
return (Class<? extends Entity>) wrapped.get(key);
}
public void putCustomEntity(int entityId, String entityName,
Class<? extends Entity> entityClass) {
MinecraftKey minecraftKey = new MinecraftKey(entityName);
this.customEntities.put(minecraftKey, entityClass);
this.customEntityIds.put(entityClass, entityId);
}
}

View File

@@ -0,0 +1,30 @@
package io.github.bedwarsrel.com.v1_12_r1;
import java.util.List;
import net.minecraft.server.v1_12_R1.EnumParticle;
import net.minecraft.server.v1_12_R1.PacketPlayOutWorldParticles;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
public class ParticleSpawner {
public static void spawnParticle(List<Player> players, String particle, float x, float y,
float z) {
EnumParticle particl = EnumParticle.FIREWORKS_SPARK;
for (EnumParticle p : EnumParticle.values()) {
if (p.b().equals(particle)) {
particl = p;
break;
}
}
PacketPlayOutWorldParticles packet =
new PacketPlayOutWorldParticles(particl, false, x, y, z, 0.0F, 0.0F, 0.0F, 0.0F, 1);
for (Player player : players) {
CraftPlayer craftPlayer = (CraftPlayer) player;
craftPlayer.getHandle().playerConnection.sendPacket(packet);
}
}
}

View File

@@ -0,0 +1,20 @@
package io.github.bedwarsrel.com.v1_12_r1;
import net.minecraft.server.v1_12_R1.EntityCreature;
import net.minecraft.server.v1_12_R1.PathfinderGoalMeleeAttack;
public class PathfinderGoalBedwarsPlayer extends PathfinderGoalMeleeAttack {
private EntityCreature creature = null;
public PathfinderGoalBedwarsPlayer(EntityCreature name, double name3, boolean name4) {
super(name, name3, name4);
this.creature = name;
}
@Override
public void e() {
this.creature.getNavigation().a(this.creature.getGoalTarget());
}
}

View File

@@ -0,0 +1,26 @@
package io.github.bedwarsrel.com.v1_12_r1;
import net.minecraft.server.v1_12_R1.PacketPlayInClientCommand;
import net.minecraft.server.v1_12_R1.PacketPlayInClientCommand.EnumClientCommand;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
public class PerformRespawnRunnable extends BukkitRunnable {
private Player player = null;
public PerformRespawnRunnable(Player player) {
this.player = player;
}
@Override
public void run() {
PacketPlayInClientCommand clientCommand =
new PacketPlayInClientCommand(EnumClientCommand.PERFORM_RESPAWN);
CraftPlayer cp = (CraftPlayer) player;
cp.getHandle().playerConnection.a(clientCommand);
}
}

View File

@@ -0,0 +1,116 @@
/*******************************************************************************
* This file is part of ASkyBlock.
*
* ASkyBlock is free software: you can redistribute it and/or modify it under the terms of the GNU
* General Public License as published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* ASkyBlock is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with ASkyBlock. If not,
* see <http://www.gnu.org/licenses/>.
*******************************************************************************/
package io.github.bedwarsrel.com.v1_12_r1;
import net.minecraft.server.v1_12_R1.NBTTagCompound;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_12_R1.inventory.CraftItemStack;
import org.bukkit.entity.EntityType;
import org.bukkit.inventory.ItemStack;
public class SpawnEgg1_12 {
private EntityType type;
public SpawnEgg1_12(EntityType type) {
this.type = type;
}
/**
* Converts from an item stack to a spawn egg 1.9
*
* @param item - ItemStack, quantity is disregarded
* @return SpawnEgg 1.9
*/
public static SpawnEgg1_12 fromItemStack(ItemStack item) {
if (item == null) {
throw new IllegalArgumentException("item cannot be null");
}
if (item.getType() != Material.MONSTER_EGG) {
throw new IllegalArgumentException("item is not a monster egg");
}
net.minecraft.server.v1_12_R1.ItemStack stack = CraftItemStack.asNMSCopy(item);
NBTTagCompound tagCompound = stack.getTag();
if (tagCompound != null) {
@SuppressWarnings("deprecation")
EntityType type = EntityType.fromName(tagCompound.getCompound("EntityTag").getString("id"));
if (type != null) {
return new SpawnEgg1_12(type);
} else {
return null;
}
} else {
return null;
}
}
public SpawnEgg1_12 clone() {
return (SpawnEgg1_12) this.clone();
}
/**
* Get the type of entity this egg will spawn.
*
* @return The entity type.
*/
public EntityType getSpawnedType() {
return type;
}
/**
* Set the type of entity this egg will spawn.
*
* @param type The entity type.
*/
public void setSpawnedType(EntityType type) {
if (type.isAlive()) {
this.type = type;
}
}
/**
* Get an ItemStack of one spawn egg
*
* @return ItemStack
*/
public ItemStack toItemStack() {
return toItemStack(1);
}
/**
* Get an itemstack of spawn eggs
*
* @return ItemStack of spawn eggs
*/
@SuppressWarnings("deprecation")
public ItemStack toItemStack(int amount) {
ItemStack item = new ItemStack(Material.MONSTER_EGG, amount);
net.minecraft.server.v1_12_R1.ItemStack stack = CraftItemStack.asNMSCopy(item);
NBTTagCompound tagCompound = stack.getTag();
if (tagCompound == null) {
tagCompound = new NBTTagCompound();
}
NBTTagCompound id = new NBTTagCompound();
id.setString("id", type.getName());
tagCompound.set("EntityTag", id);
stack.setTag(tagCompound);
return CraftItemStack.asBukkitCopy(stack);
}
public String toString() {
return "SPAWN EGG{" + getSpawnedType() + "}";
}
}

View File

@@ -0,0 +1,116 @@
package io.github.bedwarsrel.com.v1_12_r1;
import io.github.bedwarsrel.BedwarsRel;
import io.github.bedwarsrel.shop.Specials.ITNTSheep;
import java.lang.reflect.Field;
import java.util.Set;
import net.minecraft.server.v1_12_R1.EntityLiving;
import net.minecraft.server.v1_12_R1.EntitySheep;
import net.minecraft.server.v1_12_R1.EntityTNTPrimed;
import net.minecraft.server.v1_12_R1.GenericAttributes;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.craftbukkit.v1_12_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftTNTPrimed;
import org.bukkit.entity.Creature;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.entity.TNTPrimed;
import org.bukkit.event.entity.EntityTargetEvent.TargetReason;
public class TNTSheep extends EntitySheep implements ITNTSheep {
private TNTPrimed primedTnt = null;
private World world = null;
public TNTSheep(net.minecraft.server.v1_12_R1.World world) {
super(world);
}
public TNTSheep(Location location, Player target) {
super(((CraftWorld) location.getWorld()).getHandle());
this.world = location.getWorld();
this.locX = location.getX();
this.locY = location.getY();
this.locZ = location.getZ();
try {
Field b = this.goalSelector.getClass().getDeclaredField("b");
b.setAccessible(true);
Set<?> goals = (Set<?>) b.get(this.goalSelector);
goals.clear(); // Clears the goals
this.getAttributeInstance(GenericAttributes.FOLLOW_RANGE).setValue(128D);
this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED)
.setValue(
BedwarsRel.getInstance().getConfig().getDouble("specials.tntsheep.speed", 0.4D));
} catch (Exception e) {
BedwarsRel.getInstance().getBugsnag().notify(e);
e.printStackTrace();
}
this.goalSelector.a(0, new PathfinderGoalBedwarsPlayer(this, 1D, false)); // Add bedwars player
// goal
try {
this.setGoalTarget((EntityLiving) (((CraftPlayer) target).getHandle()),
TargetReason.TARGET_ATTACKED_ENTITY, false);
} catch (Exception ex) {
// newer spigot builds
if (ex instanceof NoSuchMethodException) {
BedwarsRel.getInstance().getBugsnag().notify(ex);
this.setGoalTarget((EntityLiving) (((CraftPlayer) target).getHandle()));
}
}
((Creature) this.getBukkitEntity()).setTarget((LivingEntity) target);
}
@Override
public Location getLocation() {
return new Location(this.world, this.locX, this.locY, this.locZ);
}
@Override
public TNTPrimed getTNT() {
return this.primedTnt;
}
@Override
public void setTNT(TNTPrimed tnt) {
this.primedTnt = tnt;
}
@Override
public void remove() {
this.getBukkitEntity().remove();
}
@Override
public void setPassenger(TNTPrimed tnt) {
this.getBukkitEntity().setPassenger(tnt);
}
@Override
public void setTNTSource(Entity source) {
if (source == null) {
return;
}
try {
Field sourceField = EntityTNTPrimed.class.getDeclaredField("source");
sourceField.setAccessible(true);
sourceField.set(((CraftTNTPrimed) this.primedTnt).getHandle(),
((CraftEntity) source).getHandle());
} catch (Exception ex) {
BedwarsRel.getInstance().getBugsnag().notify(ex);
// didn't work
}
}
}

View File

@@ -0,0 +1,69 @@
package io.github.bedwarsrel.com.v1_12_r1;
import io.github.bedwarsrel.BedwarsRel;
import io.github.bedwarsrel.shop.Specials.ITNTSheep;
import io.github.bedwarsrel.shop.Specials.ITNTSheepRegister;
import java.lang.reflect.Field;
import net.minecraft.server.v1_12_R1.EntityTNTPrimed;
import org.bukkit.DyeColor;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_12_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftSheep;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftTNTPrimed;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.entity.TNTPrimed;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
import org.bukkit.scheduler.BukkitRunnable;
public class TNTSheepRegister implements ITNTSheepRegister {
@Override
public void registerEntities(int entityId) {
CustomEntityRegistry.addCustomEntity(entityId, "TNTSheep", TNTSheep.class);
}
@Override
public ITNTSheep spawnCreature(
final io.github.bedwarsrel.shop.Specials.TNTSheep specialItem,
final Location location, final Player owner, Player target, final DyeColor color) {
final TNTSheep sheep = new TNTSheep(location, target);
((CraftWorld) location.getWorld()).getHandle().addEntity(sheep, SpawnReason.CUSTOM);
sheep.setPosition(location.getX(), location.getY(), location.getZ());
((CraftSheep) sheep.getBukkitEntity()).setColor(color);
new BukkitRunnable() {
@Override
public void run() {
TNTPrimed primedTnt = (TNTPrimed) location.getWorld()
.spawnEntity(location.add(0.0, 1.0, 0.0), EntityType.PRIMED_TNT);
((CraftSheep) sheep.getBukkitEntity()).setPassenger(primedTnt);
sheep.setTNT(primedTnt);
try {
Field sourceField = EntityTNTPrimed.class.getDeclaredField("source");
sourceField.setAccessible(true);
sourceField.set(((CraftTNTPrimed) primedTnt).getHandle(),
((CraftLivingEntity) owner).getHandle());
} catch (Exception ex) {
BedwarsRel.getInstance().getBugsnag().notify(ex);
ex.printStackTrace();
}
sheep.getTNT().setYield((float) (sheep.getTNT().getYield()
* BedwarsRel
.getInstance().getConfig().getDouble("specials.tntsheep.explosion-factor", 1.0)));
sheep.getTNT().setFuseTicks((int) Math.round(
BedwarsRel.getInstance().getConfig().getDouble("specials.tntsheep.fuse-time", 8) * 20));
sheep.getTNT().setIsIncendiary(false);
specialItem.getGame().getRegion().addRemovingEntity(sheep.getTNT());
specialItem.getGame().getRegion().addRemovingEntity(sheep.getBukkitEntity());
specialItem.updateTNT();
}
}.runTaskLater(BedwarsRel.getInstance(), 5L);
return sheep;
}
}

View File

@@ -0,0 +1,39 @@
package io.github.bedwarsrel.com.v1_12_r1;
import net.minecraft.server.v1_12_R1.IChatBaseComponent;
import net.minecraft.server.v1_12_R1.PacketPlayOutTitle;
import net.minecraft.server.v1_12_R1.PacketPlayOutTitle.EnumTitleAction;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
public class Title {
public static void showSubTitle(Player player, String subTitle, double fadeIn, double stay,
double fadeOut) {
IChatBaseComponent subTitleComponent =
IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + subTitle + "\"}");
PacketPlayOutTitle subTitlePacket =
new PacketPlayOutTitle(EnumTitleAction.SUBTITLE, subTitleComponent);
PacketPlayOutTitle timesPacket =
new PacketPlayOutTitle(EnumTitleAction.TIMES, null, (int) Math.round(fadeIn * 20.0),
(int) Math.round(stay * 20.0), (int) Math.round(fadeOut * 20.0));
((CraftPlayer) player).getHandle().playerConnection.sendPacket(timesPacket);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(subTitlePacket);
}
public static void showTitle(Player player, String title, double fadeIn, double stay,
double fadeOut) {
IChatBaseComponent titleComponent =
IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + title + "\"}");
PacketPlayOutTitle titlePacket = new PacketPlayOutTitle(EnumTitleAction.TITLE, titleComponent);
PacketPlayOutTitle timesPacket = new PacketPlayOutTitle(EnumTitleAction.TIMES, null,
(int) Math.round(fadeIn * 20), (int) Math.round(stay * 20), (int) Math.round(fadeOut * 20));
((CraftPlayer) player).getHandle().playerConnection.sendPacket(timesPacket);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(titlePacket);
}
}

View File

@@ -0,0 +1,136 @@
package io.github.bedwarsrel.com.v1_12_r1;
import io.github.bedwarsrel.BedwarsRel;
import io.github.bedwarsrel.game.Game;
import io.github.bedwarsrel.utils.Utils;
import io.github.bedwarsrel.villager.MerchantCategory;
import io.github.bedwarsrel.villager.VillagerTrade;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.minecraft.server.v1_12_R1.EntityHuman;
import net.minecraft.server.v1_12_R1.EntityVillager;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_12_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_12_R1.entity.CraftVillager;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.MerchantRecipe;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.scheduler.BukkitRunnable;
public class VillagerItemShop {
private MerchantCategory category = null;
private Game game = null;
private Player player = null;
// 存储玩家当前打开的交易中的命令物品: 玩家 -> (结果物品 -> 命令列表)
public static Map<Player, Map<ItemStack, List<String>>> playerCommandItems = new HashMap<>();
public VillagerItemShop(Game g, Player p, MerchantCategory category) {
this.game = g;
this.player = p;
this.category = category;
}
private EntityVillager createVillager() {
try {
EntityVillager ev =
new EntityVillager(((CraftWorld) this.game.getRegion().getWorld()).getHandle());
return ev;
} catch (Exception e) {
BedwarsRel.getInstance().getBugsnag().notify(e);
e.printStackTrace();
}
return null;
}
private EntityHuman getEntityHuman() {
try {
return ((CraftPlayer) this.player).getHandle();
} catch (Exception e) {
BedwarsRel.getInstance().getBugsnag().notify(e);
e.printStackTrace();
}
return null;
}
public void openTrading() {
// As task because of inventory issues
new BukkitRunnable() {
@SuppressWarnings("deprecation")
@Override
public void run() {
try {
EntityVillager entityVillager = VillagerItemShop.this.createVillager();
CraftVillager craftVillager = (CraftVillager) entityVillager.getBukkitEntity();
EntityHuman entityHuman = VillagerItemShop.this.getEntityHuman();
// set location
List<MerchantRecipe> recipeList = new ArrayList<MerchantRecipe>();
Map<ItemStack, List<String>> commandMap = new HashMap<>();
for (VillagerTrade trade : VillagerItemShop.this.category
.getFilteredOffers()) {
ItemStack reward = trade.getRewardItem().clone();
Method colorable = Utils.getColorableMethod(reward.getType());
if (Utils.isColorable(reward)) {
reward
.setDurability(game.getPlayerTeam(player).getColor().getDyeColor().getWoolData());
} else if (colorable != null) {
ItemMeta meta = reward.getItemMeta();
colorable.setAccessible(true);
colorable.invoke(meta, new Object[]{VillagerItemShop.this.game
.getPlayerTeam(VillagerItemShop.this.player).getColor().getColor()});
reward.setItemMeta(meta);
}
if (!(trade.getHandle()
.getInstance() instanceof net.minecraft.server.v1_12_R1.MerchantRecipe)) {
continue;
}
// 如果交易有命令,存储映射
if (trade.hasCommands()) {
commandMap.put(reward, trade.getCommands());
}
MerchantRecipe recipe = new MerchantRecipe(reward, 1024);
recipe.addIngredient(trade.getItem1());
if (trade.getItem2() != null) {
recipe.addIngredient(trade.getItem2());
} else {
recipe.addIngredient(new ItemStack(Material.AIR));
}
recipe.setUses(0);
recipe.setExperienceReward(false);
recipeList.add(recipe);
}
// 存储该玩家的命令物品映射
playerCommandItems.put(player, commandMap);
craftVillager.setRecipes(recipeList);
craftVillager.setRiches(0);
entityVillager.setTradingPlayer(entityHuman);
((CraftPlayer) player).getHandle().openTrade(entityVillager);
} catch (Exception ex) {
BedwarsRel.getInstance().getBugsnag().notify(ex);
ex.printStackTrace();
}
}
}.runTask(BedwarsRel.getInstance());
}
}