Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. /* */ package net.definity.Game;
  2. /* */
  3. /* */ import net.definity.MYSQL.MySQL;
  4. import net.definity.API.FireworkUtils.FireworkUtils;
  5. /* */ import net.definity.AnvilRun.Main;
  6. /* */ import org.bukkit.Bukkit;
  7. /* */ import org.bukkit.Color;
  8. /* */ import org.bukkit.FireworkEffect;
  9. /* */ import org.bukkit.FireworkEffect.Builder;
  10. /* */ import org.bukkit.FireworkEffect.Type;
  11. /* */ import org.bukkit.entity.Firework;
  12. /* */ import org.bukkit.entity.Player;
  13. /* */ import org.bukkit.inventory.meta.FireworkMeta;
  14. import org.bukkit.plugin.Plugin;
  15. /* */ import org.bukkit.scheduler.BukkitScheduler;
  16. /* */
  17. /* */ public class EndGame implements org.bukkit.event.Listener
  18. /* */ {
  19. /* */ static net.definity.AnvilRun.Main plugin;
  20. /* */
  21. /* */ public EndGame(net.definity.AnvilRun.Main main)
  22. /* */ {
  23. /* 21 */ plugin = main;
  24. /* */ }
  25. /* */
  26. /* */ public static void start(Player p) {
  27. /* 25 */ net.definity.AnvilRun.API.gameStarted = false;
  28. /* 26 */ net.definity.AnvilRun.API.gamePaused = true;
  29. /* 27 */ Bukkit.broadcastMessage(net.definity.AnvilRun.API.prefix + "§9§lFélicitation à " + p.getName() + " qui a gagné la partie !");
  30. /* 28 */ p.getInventory().clear();
  31. /* 29 */ MySQL.addNovaCoins(p.getUniqueId(), 30, "Victoire");
  32. /* 30 */ MySQL.addNovaStars(p.getUniqueId(), 1, "Victoire");
  33. /* 31 */ p.setAllowFlight(true);
  34. /* 32 */ p.setFlying(true);
  35. /* 33 */ for (Player allp : Bukkit.getOnlinePlayers()) {
  36. /* 34 */ allp.playSound(allp.getLocation(), org.bukkit.Sound.ENDERDRAGON_GROWL, 100.0F, 1.0F);
  37. /* 35 */ if (allp != p) {
  38. /* 36 */ allp.setGameMode(org.bukkit.GameMode.SPECTATOR);
  39. /* */ }
  40. /* */ }
  41. /* */
  42. /* 40 */ Bukkit.getScheduler().cancelAllTasks();
  43. /* 41 */ Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() {
  44. /* */ public void run() {
  45.  
  46. FireworkUtils f = EndGame.this.getWorld(EndGame.this.getLocation(), Firework.class);
  47. /* */
  48. /* 46 */ ((FireworkMeta) f).addEffect(FireworkEffect.builder().flicker(true).trail(true)
  49. /* 47 */ .with(FireworkEffect.Type.STAR)
  50. /* 48 */ .with(FireworkEffect.Type.BALL)
  51. /* 49 */ .with(FireworkEffect.Type.BALL_LARGE)
  52. /* 50 */ .withColor(Color.BLUE).withColor(Color.RED).build());
  53. /* */
  54. /* 52 */ ((FireworkMeta) f).setPower(1);
  55. /* 53 */ ((Firework) f).setFireworkMeta((FireworkMeta) f);
  56. /* */ }
  57. /* 55 */ }, 10L, 20L);
  58. /* */
  59. /* 57 */ Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
  60. /* */ public void run() {
  61. /* 59 */ for (Player allp : Player ) {
  62. /* 60 */ allp.kickPlayer("Lobby");
  63. /* */ }
  64. /* 62 */ Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "stop");
  65. /* */ }
  66. /* 64 */ }, 300L);
  67. /* */ }
  68. protected FireworkUtils getWorld(Object location, Class<Firework> class1) {
  69. // TODO Auto-generated method stub
  70. return null;
  71. }
  72. protected Object getLocation() {
  73. // TODO Auto-generated method stub
  74. return null;
  75. }
  76. /* */
  77. protected Object getWorld() {
  78. // TODO Auto-generated method stub
  79. return null;
  80. } }
  81.  
  82.  
  83. /* Location: D:\DefinityNetwork\MASTER\AnvilRun\AnvilRun.jar!\fr\NovaCube\Game\EndGame.class
  84. * Java compiler version: 7 (51.0)
  85. * JD-Core Version: 0.7.1
  86. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement