Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.mpgc.botbattle;
- import org.bukkit.Bukkit;
- import org.bukkit.Location;
- import org.bukkit.Material;
- import org.bukkit.World;
- import org.bukkit.enchantments.Enchantment;
- import org.bukkit.inventory.ItemStack;
- import org.bukkit.inventory.meta.ItemMeta;
- import org.bukkit.plugin.Plugin;
- import org.bukkit.scheduler.BukkitRunnable;
- import org.bukkit.scheduler.BukkitTask;
- public abstract class ItemSpawn implements Plugin {
- static BotMain plugin;
- public static BotMain getInstance() {
- return plugin;
- }
- public static boolean isGameActive = false;
- public static void onItemSpawn() {
- Bukkit.getServer().getScheduler().runTaskTimerAsynchronously(plugin, new Runnable() {
- public void run() {
- if (BotMain.isStarted = true) {
- double x = MainCmd.cfg.getInt("arenen.item.1.x");
- double y = MainCmd.cfg.getInt("arenen.item.1.y");
- double z = MainCmd.cfg.getInt("arenen.item.1.z");
- World w = Bukkit.getWorld(MainCmd.cfg.getString("arenen.item.1.world"));
- ItemStack Schraube = new ItemStack(Material.BRICK, 4);
- ItemMeta SchraubeMeta = Schraube.getItemMeta();
- SchraubeMeta.setDisplayName("§bSchraube");
- Schraube.setItemMeta(SchraubeMeta);
- Bukkit.getWorld(MainCmd.cfg.getString("arenen.item.1.world")).dropItemNaturally(new Location(w, x ,y , z), Schraube);
- Bukkit.getWorld(MainCmd.cfg.getString("arenen.item.2.world")).dropItemNaturally(new Location(w, x ,y , z), Schraube);
- if (MainCmd.cfg.getString("arenen.item.3") != null) {
- Bukkit.getWorld(MainCmd.cfg.getString("arenen.item.3.world")).dropItemNaturally(new Location(w, x ,y , z), Schraube);
- }
- if (MainCmd.cfg.getString("arenen.item.4") != null) {
- Bukkit.getWorld(MainCmd.cfg.getString("arenen.item.4.world")).dropItemNaturally(new Location(w, x ,y , z), Schraube);
- }
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- ItemStack Mutter = new ItemStack(Material.IRON_BARDING, 1);
- ItemMeta MutterMeta = Mutter.getItemMeta();
- MutterMeta.setDisplayName("§eMutter");
- Mutter.setItemMeta(MutterMeta);
- Bukkit.getWorld(MainCmd.cfg.getString("arenen.item.1.world")).dropItemNaturally(new Location(w, x ,y , z), Mutter);
- Bukkit.getWorld(MainCmd.cfg.getString("arenen.item.2.world")).dropItemNaturally(new Location(w, x ,y , z), Mutter);
- if (MainCmd.cfg.getString("arenen.item.3") != null) {
- Bukkit.getWorld(MainCmd.cfg.getString("arenen.item.3.world")).dropItemNaturally(new Location(w, x ,y , z), Mutter);
- }
- if (MainCmd.cfg.getString("arenen.item.3") != null) {
- Bukkit.getWorld(MainCmd.cfg.getString("arenen.item.4.world")).dropItemNaturally(new Location(w, x ,y , z), Mutter);
- }
- try {
- Thread.sleep(2000);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- ItemStack Zahnrad = new ItemStack(Material.GOLD_BARDING, 1);
- ItemMeta ZahnradMeta = Zahnrad.getItemMeta();
- ZahnradMeta.setDisplayName("§aZahnrad");
- Zahnrad.setItemMeta(ZahnradMeta);
- Bukkit.getWorld(MainCmd.cfg.getString("arenen.item.1.world")).dropItemNaturally(new Location(w, x ,y , z), Zahnrad);
- Bukkit.getWorld(MainCmd.cfg.getString("arenen.item.2.world")).dropItemNaturally(new Location(w, x ,y , z), Zahnrad);
- if (MainCmd.cfg.getString("arenen.item.3") != null) {
- Bukkit.getWorld(MainCmd.cfg.getString("arenen.item.3.world")).dropItemNaturally(new Location(w, x ,y , z), Zahnrad);
- }
- if (MainCmd.cfg.getString("arenen.item.4") != null) {
- Bukkit.getWorld(MainCmd.cfg.getString("arenen.item.4.world")).dropItemNaturally(new Location(w, x ,y , z), Zahnrad);
- }
- if (isGameActive = false) {
- }
- }
- }
- }, 20L, 10);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement