Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* */ package net.definity.Game;
- /* */
- /* */ import net.definity.MYSQL.MySQL;
- import net.definity.API.FireworkUtils.FireworkUtils;
- /* */ import net.definity.AnvilRun.Main;
- /* */ import org.bukkit.Bukkit;
- /* */ import org.bukkit.Color;
- /* */ import org.bukkit.FireworkEffect;
- /* */ import org.bukkit.FireworkEffect.Builder;
- /* */ import org.bukkit.FireworkEffect.Type;
- /* */ import org.bukkit.entity.Firework;
- /* */ import org.bukkit.entity.Player;
- /* */ import org.bukkit.inventory.meta.FireworkMeta;
- import org.bukkit.plugin.Plugin;
- /* */ import org.bukkit.scheduler.BukkitScheduler;
- /* */
- /* */ public class EndGame implements org.bukkit.event.Listener
- /* */ {
- /* */ static net.definity.AnvilRun.Main plugin;
- /* */
- /* */ public EndGame(net.definity.AnvilRun.Main main)
- /* */ {
- /* 21 */ plugin = main;
- /* */ }
- /* */
- /* */ public static void start(Player p) {
- /* 25 */ net.definity.AnvilRun.API.gameStarted = false;
- /* 26 */ net.definity.AnvilRun.API.gamePaused = true;
- /* 27 */ Bukkit.broadcastMessage(net.definity.AnvilRun.API.prefix + "§9§lFélicitation à " + p.getName() + " qui a gagné la partie !");
- /* 28 */ p.getInventory().clear();
- /* 29 */ MySQL.addNovaCoins(p.getUniqueId(), 30, "Victoire");
- /* 30 */ MySQL.addNovaStars(p.getUniqueId(), 1, "Victoire");
- /* 31 */ p.setAllowFlight(true);
- /* 32 */ p.setFlying(true);
- /* 33 */ for (Player allp : Bukkit.getOnlinePlayers()) {
- /* 34 */ allp.playSound(allp.getLocation(), org.bukkit.Sound.ENDERDRAGON_GROWL, 100.0F, 1.0F);
- /* 35 */ if (allp != p) {
- /* 36 */ allp.setGameMode(org.bukkit.GameMode.SPECTATOR);
- /* */ }
- /* */ }
- /* */
- /* 40 */ Bukkit.getScheduler().cancelAllTasks();
- /* 41 */ Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() {
- /* */ public void run() {
- FireworkUtils f = EndGame.this.getWorld(EndGame.this.getLocation(), Firework.class);
- /* */
- /* 46 */ ((FireworkMeta) f).addEffect(FireworkEffect.builder().flicker(true).trail(true)
- /* 47 */ .with(FireworkEffect.Type.STAR)
- /* 48 */ .with(FireworkEffect.Type.BALL)
- /* 49 */ .with(FireworkEffect.Type.BALL_LARGE)
- /* 50 */ .withColor(Color.BLUE).withColor(Color.RED).build());
- /* */
- /* 52 */ ((FireworkMeta) f).setPower(1);
- /* 53 */ ((Firework) f).setFireworkMeta((FireworkMeta) f);
- /* */ }
- /* 55 */ }, 10L, 20L);
- /* */
- /* 57 */ Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
- /* */ public void run() {
- /* 59 */ for (Player allp : Player ) {
- /* 60 */ allp.kickPlayer("Lobby");
- /* */ }
- /* 62 */ Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "stop");
- /* */ }
- /* 64 */ }, 300L);
- /* */ }
- protected FireworkUtils getWorld(Object location, Class<Firework> class1) {
- // TODO Auto-generated method stub
- return null;
- }
- protected Object getLocation() {
- // TODO Auto-generated method stub
- return null;
- }
- /* */
- protected Object getWorld() {
- // TODO Auto-generated method stub
- return null;
- } }
- /* Location: D:\DefinityNetwork\MASTER\AnvilRun\AnvilRun.jar!\fr\NovaCube\Game\EndGame.class
- * Java compiler version: 7 (51.0)
- * JD-Core Version: 0.7.1
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement