Advertisement
Guest User

Untitled

a guest
Jan 9th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.33 KB | None | 0 0
  1. /* */ package org.hcfpvp.hcf.Hcf;
  2. /* */
  3. /* */ import com.sk89q.worldedit.bukkit.WorldEditPlugin;
  4. /* */ import java.io.File;
  5. /* */ import java.text.DecimalFormat;
  6. /* */ import java.util.Map;
  7. /* */ import java.util.Map.Entry;
  8. /* */ import java.util.Random;
  9. /* */ import java.util.concurrent.TimeUnit;
  10. /* */ import net.md_5.bungee.api.ChatColor;
  11. /* */ import org.apache.commons.lang3.time.DurationFormatUtils;
  12. /* */ import org.bukkit.Bukkit;
  13. /* */ import org.bukkit.Server;
  14. /* */ import org.bukkit.command.PluginCommand;
  15. /* */ import org.bukkit.configuration.file.FileConfiguration;
  16. /* */ import org.bukkit.configuration.file.FileConfigurationOptions;
  17. /* */ import org.bukkit.configuration.serialization.ConfigurationSerialization;
  18. /* */ import org.bukkit.plugin.Plugin;
  19. /* */ import org.bukkit.plugin.PluginDescriptionFile;
  20. /* */ import org.bukkit.plugin.PluginManager;
  21. /* */ import org.bukkit.plugin.java.JavaPlugin;
  22. /* */ import org.bukkit.scheduler.BukkitRunnable;
  23. /* */ import org.hcfpvp.base.base.BasePlugins;
  24. /* */ import org.hcfpvp.base.base.command.ChatModule.MessageCommand;
  25. /* */ import org.hcfpvp.base.base.command.ChatModule.ReplyCommand;
  26. /* */ import org.hcfpvp.base.base.command.ChatModule.StaffChatCommand;
  27. /* */ import org.hcfpvp.base.base.command.ChatModule.ToggleMessageCommand;
  28. /* */ import org.hcfpvp.base.base.command.EssentialsModule.BroadCastCommand;
  29. /* */ import org.hcfpvp.base.base.command.EssentialsModule.ClearCommand;
  30. /* */ import org.hcfpvp.base.base.command.EssentialsModule.FeedCommand;
  31. /* */ import org.hcfpvp.base.base.command.EssentialsModule.FlyCommand;
  32. /* */ import org.hcfpvp.base.base.command.EssentialsModule.FreezeCommand;
  33. /* */ import org.hcfpvp.base.base.command.EssentialsModule.GameModeCommand;
  34. /* */ import org.hcfpvp.base.base.command.EssentialsModule.GiveCommand;
  35. /* */ import org.hcfpvp.base.base.command.EssentialsModule.GodCommand;
  36. /* */ import org.hcfpvp.base.base.command.EssentialsModule.InvSeeCommand;
  37. /* */ import org.hcfpvp.base.base.command.EssentialsModule.ItemCommand;
  38. /* */ import org.hcfpvp.base.base.command.EssentialsModule.LagCommand;
  39. /* */ import org.hcfpvp.base.base.command.EssentialsModule.ListCommand;
  40. /* */ import org.hcfpvp.base.base.command.EssentialsModule.PingCommand;
  41. /* */ import org.hcfpvp.base.base.command.EssentialsModule.SetMaxPlayersCommand;
  42. /* */ import org.hcfpvp.base.base.command.EssentialsModule.StaffModeCommand;
  43. /* */ import org.hcfpvp.base.base.command.EssentialsModule.VanishCommand;
  44. /* */ import org.hcfpvp.base.base.command.NoteModule.NoteCommand;
  45. /* */ import org.hcfpvp.base.base.command.TeleportModule.TeleportAllCommand;
  46. /* */ import org.hcfpvp.base.base.command.TeleportModule.TeleportCommand;
  47. /* */ import org.hcfpvp.base.base.command.TeleportModule.TeleportHereCommand;
  48. /* */ import org.hcfpvp.base.base.listener.GodListener;
  49. /* */ import org.hcfpvp.base.base.listener.NoteListener;
  50. /* */ import org.hcfpvp.base.base.listener.StaffChatListener;
  51. /* */ import org.hcfpvp.base.base.listener.StaffModeListener;
  52. /* */ import org.hcfpvp.base.base.listener.VanishListener;
  53. /* */ import org.hcfpvp.hcf.balance.EconomyCommand;
  54. /* */ import org.hcfpvp.hcf.balance.EconomyManager;
  55. /* */ import org.hcfpvp.hcf.balance.FlatFileEconomyManager;
  56. /* */ import org.hcfpvp.hcf.balance.PayCommand;
  57. /* */ import org.hcfpvp.hcf.balance.ShopSignListener;
  58. /* */ import org.hcfpvp.hcf.classes.PvpClassManager;
  59. /* */ import org.hcfpvp.hcf.classes.archer.ArcherClass;
  60. /* */ import org.hcfpvp.hcf.combatlog.CombatLogListener;
  61. /* */ import org.hcfpvp.hcf.combatlog.CustomEntityRegistration;
  62. /* */ import org.hcfpvp.hcf.command.CoordsCommand;
  63. /* */ import org.hcfpvp.hcf.command.CrowbarCommand;
  64. /* */ import org.hcfpvp.hcf.command.DonatorReviveCommand;
  65. /* */ import org.hcfpvp.hcf.command.GMCCommand;
  66. /* */ import org.hcfpvp.hcf.command.GMSCommand;
  67. /* */ import org.hcfpvp.hcf.command.GoppleCommand;
  68. /* */ import org.hcfpvp.hcf.command.HelpCommand;
  69. /* */ import org.hcfpvp.hcf.command.HelpopCommand;
  70. /* */ import org.hcfpvp.hcf.command.LogoutCommand;
  71. /* */ import org.hcfpvp.hcf.command.MapKitCommand;
  72. /* */ import org.hcfpvp.hcf.command.OreStatsCommand;
  73. /* */ import org.hcfpvp.hcf.command.PvpTimerCommand;
  74. /* */ import org.hcfpvp.hcf.command.RandomCommand;
  75. /* */ import org.hcfpvp.hcf.command.RefundCommand;
  76. /* */ import org.hcfpvp.hcf.command.ReportCommand;
  77. /* */ import org.hcfpvp.hcf.command.SetBorderCommand;
  78. /* */ import org.hcfpvp.hcf.command.SetCommand;
  79. /* */ import org.hcfpvp.hcf.command.SpawnCommand;
  80. /* */ import org.hcfpvp.hcf.command.SpawnerCommand;
  81. /* */ import org.hcfpvp.hcf.command.TeamspeakCommand;
  82. /* */ import org.hcfpvp.hcf.config.PlayerData;
  83. /* */ import org.hcfpvp.hcf.config.PotionLimiterData;
  84. /* */ import org.hcfpvp.hcf.config.WorldData;
  85. /* */ import org.hcfpvp.hcf.faction.FactionExecutor;
  86. /* */ import org.hcfpvp.hcf.faction.FactionManager;
  87. /* */ import org.hcfpvp.hcf.faction.FactionMember;
  88. /* */ import org.hcfpvp.hcf.faction.FlatFileFactionManager;
  89. /* */ import org.hcfpvp.hcf.faction.claim.Claim;
  90. /* */ import org.hcfpvp.hcf.faction.claim.ClaimHandler;
  91. /* */ import org.hcfpvp.hcf.faction.claim.ClaimWandListener;
  92. /* */ import org.hcfpvp.hcf.faction.claim.Subclaim;
  93. /* */ import org.hcfpvp.hcf.faction.type.ClaimableFaction;
  94. /* */ import org.hcfpvp.hcf.faction.type.EndPortalFaction;
  95. /* */ import org.hcfpvp.hcf.faction.type.Faction;
  96. /* */ import org.hcfpvp.hcf.faction.type.PlayerFaction;
  97. /* */ import org.hcfpvp.hcf.faction.type.RoadFaction;
  98. /* */ import org.hcfpvp.hcf.faction.type.RoadFaction.EastRoadFaction;
  99. /* */ import org.hcfpvp.hcf.faction.type.RoadFaction.NorthRoadFaction;
  100. /* */ import org.hcfpvp.hcf.faction.type.RoadFaction.SouthRoadFaction;
  101. /* */ import org.hcfpvp.hcf.faction.type.RoadFaction.WestRoadFaction;
  102. /* */ import org.hcfpvp.hcf.faction.type.SpawnFaction;
  103. /* */ import org.hcfpvp.hcf.fixes.BeaconStrengthFixListener;
  104. /* */ import org.hcfpvp.hcf.fixes.BlockHitFixListener;
  105. /* */ import org.hcfpvp.hcf.fixes.BlockJumpGlitchFixListener;
  106. /* */ import org.hcfpvp.hcf.fixes.BoatGlitchFixListener;
  107. /* */ import org.hcfpvp.hcf.fixes.EnchantLimitListener;
  108. /* */ import org.hcfpvp.hcf.fixes.EnderChestRemovalListener;
  109. /* */ import org.hcfpvp.hcf.fixes.HungerFixListener;
  110. /* */ import org.hcfpvp.hcf.fixes.InfinityArrowFixListener;
  111. /* */ import org.hcfpvp.hcf.fixes.NoPermissionClickListener;
  112. /* */ import org.hcfpvp.hcf.fixes.PearlGlitchListener;
  113. /* */ import org.hcfpvp.hcf.fixes.PortalListener;
  114. /* */ import org.hcfpvp.hcf.fixes.PotionLimitListener;
  115. /* */ import org.hcfpvp.hcf.fixes.ServerSecurityListener;
  116. /* */ import org.hcfpvp.hcf.fixes.VoidGlitchFixListener;
  117. /* */ import org.hcfpvp.hcf.fixes.WeatherFixListener;
  118. /* */ import org.hcfpvp.hcf.kothgame.CaptureZone;
  119. /* */ import org.hcfpvp.hcf.kothgame.EventExecutor;
  120. /* */ import org.hcfpvp.hcf.kothgame.EventScheduler;
  121. /* */ import org.hcfpvp.hcf.kothgame.conquest.ConquestExecutor;
  122. /* */ import org.hcfpvp.hcf.kothgame.eotw.EOTWHandler;
  123. /* */ import org.hcfpvp.hcf.kothgame.eotw.EotwCommand;
  124. /* */ import org.hcfpvp.hcf.kothgame.eotw.EotwListener;
  125. /* */ import org.hcfpvp.hcf.kothgame.faction.CapturableFaction;
  126. /* */ import org.hcfpvp.hcf.kothgame.faction.ConquestFaction;
  127. /* */ import org.hcfpvp.hcf.kothgame.faction.KothFaction;
  128. /* */ import org.hcfpvp.hcf.kothgame.koth.KothExecutor;
  129. /* */ import org.hcfpvp.hcf.listener.AutoSmeltOreListener;
  130. /* */ import org.hcfpvp.hcf.listener.BookDeenchantListener;
  131. /* */ import org.hcfpvp.hcf.listener.BorderListener;
  132. /* */ import org.hcfpvp.hcf.listener.BottledExpListener;
  133. /* */ import org.hcfpvp.hcf.listener.ChatListener;
  134. /* */ import org.hcfpvp.hcf.listener.CoreListener;
  135. /* */ import org.hcfpvp.hcf.listener.CrowbarListener;
  136. /* */ import org.hcfpvp.hcf.listener.ElevatorListener;
  137. /* */ import org.hcfpvp.hcf.listener.ExpMultiplierListener;
  138. /* */ import org.hcfpvp.hcf.listener.FactionListener;
  139. /* */ import org.hcfpvp.hcf.listener.FactionsCoreListener;
  140. /* */ import org.hcfpvp.hcf.listener.FoundDiamondsListener;
  141. /* */ import org.hcfpvp.hcf.listener.FurnaceSmeltSpeederListener;
  142. /* */ import org.hcfpvp.hcf.listener.ItemStatTrackingListener;
  143. /* */ import org.hcfpvp.hcf.listener.SignSubclaimListener;
  144. /* */ import org.hcfpvp.hcf.listener.SkullListener;
  145. /* */ import org.hcfpvp.hcf.listener.UnRepairableListener;
  146. /* */ import org.hcfpvp.hcf.listener.WorldListener;
  147. /* */ import org.hcfpvp.hcf.scoreboard.ScoreboardHandler;
  148. /* */ import org.hcfpvp.hcf.sotw.SotwCommand;
  149. /* */ import org.hcfpvp.hcf.sotw.SotwTimer;
  150. /* */ import org.hcfpvp.hcf.timer.TimerExecutor;
  151. /* */ import org.hcfpvp.hcf.timer.TimerManager;
  152. /* */ import org.hcfpvp.hcf.user.FactionUser;
  153. /* */ import org.hcfpvp.hcf.user.UserManager;
  154. /* */ import org.hcfpvp.hcf.visualise.ProtocolLibHook;
  155. /* */ import org.hcfpvp.hcf.visualise.VisualiseHandler;
  156. /* */ import org.hcfpvp.hcf.visualise.WallBorderListener;
  157. /* */ import org.hcfpvp.hcfold.EventSignListener;
  158. /* */ import org.hcfpvp.hcfold.crate.KeyListener;
  159. /* */ import org.hcfpvp.hcfold.crate.KeyManager;
  160. /* */ import org.hcfpvp.hcfold.crate.LootExecutor;
  161. /* */
  162. /* */ public class HCF extends JavaPlugin
  163. /* */ {
  164. /* */ public static File conf;
  165. /* */ public static FileConfiguration config;
  166. /* */ private String craftBukkitVersion;
  167. /* */ private static HCF instance;
  168. /* */
  169. /* */ public HCF()
  170. /* */ {
  171. /* 180 */ this.random = new Random();
  172. /* */ }
  173. /* */
  174. /* */
  175. /* */
  176. /* */
  177. /* */
  178. /* */
  179. /* */
  180. /* */
  181. /* 190 */ public static String scrub = "http://pastebin.com/raw/cMptHipd";
  182. /* */ private CombatLogListener combatLogListener;
  183. /* */ private ConfigurationService configuration;
  184. /* */ private CoreListener core;
  185. /* */
  186. /* */ public static HCF getPlugin()
  187. /* */ {
  188. /* 197 */ return plugin;
  189. /* */ }
  190. /* */
  191. /* */ public static HCF getInstance()
  192. /* */ {
  193. /* 202 */ return instance;
  194. /* */ }
  195. /* */
  196. /* */ public static String getReaming(long millis)
  197. /* */ {
  198. /* 207 */ return getRemaining(millis, true, true);
  199. /* */ }
  200. /* */
  201. /* */ public String getCraftBukkitVersion()
  202. /* */ {
  203. /* 212 */ return this.craftBukkitVersion;
  204. /* */ }
  205. /* */
  206. /* */ public static String getRemaining(long millis, boolean milliseconds)
  207. /* */ {
  208. /* 217 */ return getRemaining(millis, milliseconds, true);
  209. /* */ }
  210. /* */
  211. /* */ public static String getRemaining(long duration, boolean milliseconds, boolean trail)
  212. /* */ {
  213. /* 222 */ if ((milliseconds) && (duration < MINUTE)) {
  214. /* 223 */ return ((DecimalFormat)(trail ? DateTimeFormats.REMAINING_SECONDS_TRAILING : DateTimeFormats.REMAINING_SECONDS).get()).format(duration * 0.001D) + 's';
  215. /* */ }
  216. /* 225 */ return DurationFormatUtils.formatDuration(duration, (duration >= HOUR ? "HH:" : "") + "mm:ss");
  217. /* */ }
  218. /* */
  219. /* */ public void onEnable()
  220. /* */ {
  221. /* 230 */ plugin = this;
  222. /* */
  223. /* 232 */ BasePlugins.getPlugin().init(this);
  224. /* */
  225. /* 234 */ config = getConfig();
  226. /* 235 */ config.options().copyDefaults(true);
  227. /* 236 */ saveConfig();
  228. /* 237 */ conf = new File(getDataFolder(), "config.yml");
  229. /* */
  230. /* 239 */ WorldData.getInstance().setup(this);
  231. /* 240 */ PlayerData.getInstance().setup(this);
  232. /* 241 */ PotionLimiterData.getInstance().setup(this);
  233. /* 242 */ PotionLimitListener.init();
  234. /* */
  235. /* 244 */ ProtocolLibHook.hook(this);
  236. /* 245 */ CustomEntityRegistration.registerCustomEntities();
  237. /* 246 */ Plugin wep = Bukkit.getPluginManager().getPlugin("WorldEdit");
  238. /* */
  239. /* 248 */ this.craftBukkitVersion = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
  240. /* 249 */ this.worldEdit = (((wep instanceof WorldEditPlugin)) && (wep.isEnabled()) ? (WorldEditPlugin)wep : null);
  241. /* */
  242. /* 251 */ registerConfiguration();
  243. /* 252 */ registerCommands();
  244. /* 253 */ registerManagers();
  245. /* 254 */ registerListeners();
  246. /* */
  247. /* 256 */ runRegisterCore();
  248. /* */
  249. /* 258 */ Cooldowns.createCooldown("Assassin_item_cooldown");
  250. /* 259 */ Cooldowns.createCooldown("Archer_item_cooldown");
  251. /* 260 */ Cooldowns.createCooldown("revive_cooldown");
  252. /* 261 */ Cooldowns.createCooldown("report_cooldown");
  253. /* 262 */ Cooldowns.createCooldown("helpop_cooldown");
  254. /* 263 */ new BukkitRunnable()
  255. /* */ {
  256. /* */ public void run()
  257. /* */ {
  258. /* 267 */ HCF.this.saveData();
  259. /* */ }
  260. /* 269 */ }.runTaskTimerAsynchronously(plugin, TimeUnit.SECONDS.toMillis(20L), TimeUnit.SECONDS.toMillis(20L));
  261. /* */ }
  262. /* */
  263. /* */ private void runRegisterCore() {
  264. /* 273 */ PluginManager manager = Bukkit.getPluginManager();
  265. /* */ }
  266. /* */
  267. /* */
  268. /* */
  269. /* */
  270. /* */
  271. /* */ private void saveData()
  272. /* */ {
  273. /* 283 */ this.economyManager.saveEconomyData();
  274. /* 284 */ this.factionManager.saveFactionData();
  275. /* 285 */ this.keyManager.saveKeyData();
  276. /* 286 */ this.userManager.saveUserData();
  277. /* */ }
  278. /* */
  279. /* */ public void onDisable() {
  280. /* 290 */ CombatLogListener.removeCombatLoggers();
  281. /* 291 */ this.pvpClassManager.onDisable();
  282. /* 292 */ CustomEntityRegistration.unregisterCustomEntities();
  283. /* 293 */ CombatLogListener.removeCombatLoggers();
  284. /* 294 */ this.scoreboardHandler.clearBoards();
  285. /* 295 */ saveData();
  286. /* 296 */ plugin = null;
  287. /* */ }
  288. /* */
  289. /* */ private void registerConfiguration()
  290. /* */ {
  291. /* 301 */ ConfigurationSerialization.registerClass(CaptureZone.class);
  292. /* 303 */ ConfigurationSerialization.registerClass(Claim.class);
  293. /* 304 */ ConfigurationSerialization.registerClass(Subclaim.class);
  294. /* 306 */ ConfigurationSerialization.registerClass(FactionUser.class);
  295. /* 307 */ ConfigurationSerialization.registerClass(ClaimableFaction.class);
  296. /* 308 */ ConfigurationSerialization.registerClass(ConquestFaction.class);
  297. /* 309 */ ConfigurationSerialization.registerClass(CapturableFaction.class);
  298. /* 310 */ ConfigurationSerialization.registerClass(KothFaction.class);
  299. /* 311 */ ConfigurationSerialization.registerClass(EndPortalFaction.class);
  300. /* 312 */ ConfigurationSerialization.registerClass(Faction.class);
  301. /* 313 */ ConfigurationSerialization.registerClass(FactionMember.class);
  302. /* 314 */ ConfigurationSerialization.registerClass(PlayerFaction.class);
  303. /* 315 */ ConfigurationSerialization.registerClass(RoadFaction.class);
  304. /* 316 */ ConfigurationSerialization.registerClass(SpawnFaction.class);
  305. /* 317 */ ConfigurationSerialization.registerClass(RoadFaction.NorthRoadFaction.class);
  306. /* 318 */ ConfigurationSerialization.registerClass(RoadFaction.EastRoadFaction.class);
  307. /* 319 */ ConfigurationSerialization.registerClass(RoadFaction.SouthRoadFaction.class);
  308. /* 320 */ ConfigurationSerialization.registerClass(RoadFaction.WestRoadFaction.class);
  309. /* */ }
  310. /* */
  311. /* */ private void registerListeners()
  312. /* */ {
  313. /* 325 */ PluginManager manager = getServer().getPluginManager();
  314. /* 326 */ manager.registerEvents(new NoteListener(), this);
  315. /* 327 */ manager.registerEvents(new OreStatsCommand(), this);
  316. /* 328 */ manager.registerEvents(new GodListener(), this);
  317. /* 329 */ manager.registerEvents(new VanishListener(), this);
  318. /* 330 */ manager.registerEvents(new StaffChatListener(), this);
  319. /* 331 */ manager.registerEvents(new ArcherClass(this), this);
  320. /* 332 */ manager.registerEvents(new KeyListener(this), this);
  321. /* 333 */ manager.registerEvents(new PortalListener(this), this);
  322. /* 334 */ manager.registerEvents(new WeatherFixListener(), this);
  323. /* 335 */ manager.registerEvents(new NoPermissionClickListener(), this);
  324. /* 336 */ manager.registerEvents(new AutoSmeltOreListener(), this);
  325. /* 337 */ manager.registerEvents(new BlockHitFixListener(), this);
  326. /* 338 */ manager.registerEvents(new BlockJumpGlitchFixListener(), this);
  327. /* 339 */ manager.registerEvents(new BoatGlitchFixListener(), this);
  328. /* 340 */ manager.registerEvents(new BookDeenchantListener(), this);
  329. /* 341 */ manager.registerEvents(new BorderListener(), this);
  330. /* 342 */ manager.registerEvents(new BottledExpListener(), this);
  331. /* 343 */ manager.registerEvents(new ChatListener(this), this);
  332. /* 344 */ manager.registerEvents(new ClaimWandListener(this), this);
  333. /* 345 */ manager.registerEvents(new CombatLogListener(this), this);
  334. /* 346 */ manager.registerEvents(new CoreListener(this), this);
  335. /* 347 */ manager.registerEvents(new CrowbarListener(this), this);
  336. /* 348 */ manager.registerEvents(new DeathListener(this), this);
  337. /* 349 */ manager.registerEvents(new ElevatorListener(), this);
  338. /* 350 */ manager.registerEvents(new DeathMessageListener(this), this);
  339. /* 351 */ manager.registerEvents(new RefundCommand(this), this);
  340. /* 353 */ manager.registerEvents(new EnchantLimitListener(), this);
  341. /* 354 */ manager.registerEvents(new EnderChestRemovalListener(), this);
  342. /* 355 */ manager.registerEvents(new FlatFileFactionManager(this), this);
  343. /* 356 */ manager.registerEvents(new EotwListener(this), this);
  344. /* 357 */ manager.registerEvents(new EventSignListener(), this);
  345. /* 359 */ manager.registerEvents(new ExpMultiplierListener(), this);
  346. /* 360 */ manager.registerEvents(new FactionListener(this), this);
  347. /* 361 */ manager.registerEvents(this.foundDiamondsListener = new FoundDiamondsListener(this), this);
  348. /* 362 */ manager.registerEvents(new FurnaceSmeltSpeederListener(), this);
  349. /* 363 */ manager.registerEvents(new InfinityArrowFixListener(), this);
  350. /* 364 */ manager.registerEvents(new ItemStatTrackingListener(), this);
  351. /* 365 */ manager.registerEvents(new ServerSecurityListener(), this);
  352. /* 366 */ manager.registerEvents(new HungerFixListener(), this);
  353. /* 367 */ manager.registerEvents(new PearlGlitchListener(this), this);
  354. /* 368 */ manager.registerEvents(new PotionLimitListener(), this);
  355. /* 369 */ manager.registerEvents(new FactionsCoreListener(this), this);
  356. /* 370 */ manager.registerEvents(new SignSubclaimListener(this), this);
  357. /* 371 */ manager.registerEvents(new ShopSignListener(this), this);
  358. /* 372 */ manager.registerEvents(new SkullListener(), this);
  359. /* 373 */ manager.registerEvents(new BeaconStrengthFixListener(), this);
  360. /* 374 */ manager.registerEvents(new VoidGlitchFixListener(), this);
  361. /* 375 */ manager.registerEvents(new WallBorderListener(this), this);
  362. /* 376 */ manager.registerEvents(new WorldListener(this), this);
  363. /* 377 */ manager.registerEvents(new UnRepairableListener(), this);
  364. /* 378 */ manager.registerEvents(new StaffModeListener(), this);
  365. /* */ }
  366. /* */
  367. /* */
  368. /* */
  369. /* */
  370. /* */
  371. /* */
  372. /* */
  373. /* */
  374. /* */
  375. /* */
  376. /* */
  377. /* */
  378. /* */
  379. /* */
  380. /* */
  381. /* */
  382. /* */
  383. /* */
  384. /* */
  385. /* */
  386. /* */
  387. /* */
  388. /* */
  389. /* */
  390. /* */
  391. /* */
  392. /* */
  393. /* */
  394. /* */
  395. /* */
  396. /* */
  397. /* */
  398. /* */
  399. /* */
  400. /* */
  401. /* */
  402. /* */
  403. /* */
  404. /* */
  405. /* */
  406. /* */ private void registerCommands()
  407. /* */ {
  408. /* 422 */ getCommand("note").setExecutor(new NoteCommand());
  409. /* 423 */ getCommand("list").setExecutor(new ListCommand());
  410. /* 424 */ getCommand("setborder").setExecutor(new SetBorderCommand());
  411. /* 425 */ getCommand("freeze").setExecutor(new FreezeCommand(this));
  412. /* 426 */ getCommand("staffrevive").setExecutor(new StaffReviveCommand(this));
  413. /* 427 */ getCommand("lag").setExecutor(new LagCommand());
  414. /* 428 */ getCommand("broadcast").setExecutor(new BroadCastCommand());
  415. /* 429 */ getCommand("togglemessage").setExecutor(new ToggleMessageCommand());
  416. /* 430 */ getCommand("reply").setExecutor(new ReplyCommand());
  417. /* 431 */ getCommand("message").setExecutor(new MessageCommand());
  418. /* 432 */ getCommand("feed").setExecutor(new FeedCommand());
  419. /* 433 */ getCommand("ping").setExecutor(new PingCommand());
  420. /* 434 */ getCommand("teleportall").setExecutor(new TeleportAllCommand());
  421. /* 435 */ getCommand("teleporthere").setExecutor(new TeleportHereCommand());
  422. /* 436 */ getCommand("give").setExecutor(new GiveCommand());
  423. /* 437 */ getCommand("gamemode").setExecutor(new GameModeCommand());
  424. /* 438 */ getCommand("item").setExecutor(new ItemCommand());
  425. /* 439 */ getCommand("fly").setExecutor(new FlyCommand());
  426. /* 440 */ getCommand("invsee").setExecutor(new InvSeeCommand(this));
  427. /* 441 */ getCommand("god").setExecutor(new GodCommand());
  428. /* 442 */ getCommand("vanish").setExecutor(new VanishCommand());
  429. /* 443 */ getCommand("sotw").setExecutor(new SotwCommand(this));
  430. /* 444 */ getCommand("random").setExecutor(new RandomCommand(this));
  431. /* 445 */ getCommand("conquest").setExecutor(new ConquestExecutor(this));
  432. /* 446 */ getCommand("crowbar").setExecutor(new CrowbarCommand());
  433. /* 447 */ getCommand("economy").setExecutor(new EconomyCommand(this));
  434. /* 448 */ getCommand("eotw").setExecutor(new EotwCommand(this));
  435. /* 449 */ getCommand("event").setExecutor(new EventExecutor(this));
  436. /* 450 */ getCommand("faction").setExecutor(new FactionExecutor(this));
  437. /* 451 */ getCommand("gopple").setExecutor(new GoppleCommand(this));
  438. /* 452 */ getCommand("koth").setExecutor(new KothExecutor(this));
  439. /* 454 */ getCommand("logout").setExecutor(new LogoutCommand(this));
  440. /* 455 */ getCommand("pay").setExecutor(new PayCommand(this));
  441. /* 456 */ getCommand("pvptimer").setExecutor(new PvpTimerCommand(this));
  442. /* 457 */ getCommand("refund").setExecutor(new RefundCommand(this));
  443. /* 458 */ getCommand("spawn").setExecutor(new SpawnCommand(this));
  444. /* 459 */ getCommand("timer").setExecutor(new TimerExecutor(this));
  445. /* 460 */ getCommand("ores").setExecutor(new OreStatsCommand());
  446. /* 461 */ getCommand("key").setExecutor(new LootExecutor(this));
  447. /* 462 */ getCommand("help").setExecutor(new HelpCommand());
  448. /* 463 */ getCommand("teamspeak").setExecutor(new TeamspeakCommand());
  449. /* 464 */ getCommand("coords").setExecutor(new CoordsCommand());
  450. /* 465 */ getCommand("gmc").setExecutor(new GMCCommand());
  451. /* 466 */ getCommand("gms").setExecutor(new GMSCommand());
  452. /* 467 */ getCommand("report").setExecutor(new ReportCommand());
  453. /* 468 */ getCommand("helpop").setExecutor(new HelpopCommand());
  454. /* 469 */ getCommand("mapkit").setExecutor(new MapKitCommand(this));
  455. /* 470 */ getCommand("medic").setExecutor(new DonatorReviveCommand(this));
  456. /* 471 */ getCommand("setmaxplayers").setExecutor(new SetMaxPlayersCommand());
  457. /* */
  458. /* 473 */ getCommand("staffmode").setExecutor(new StaffModeCommand());
  459. /* 474 */ getCommand("spawner").setExecutor(new SpawnerCommand(this));
  460. /* 475 */ getCommand("set").setExecutor(new SetCommand(this));
  461. /* 476 */ getCommand("clear").setExecutor(new ClearCommand());
  462. /* 477 */ getCommand("teleport").setExecutor(new TeleportCommand());
  463. /* 478 */ getCommand("staffchat").setExecutor(new StaffChatCommand());
  464. /* */
  465. /* 480 */ Map<String, Map<String, Object>> map = getDescription().getCommands();
  466. /* 481 */ for (Map.Entry<String, Map<String, Object>> entry : map.entrySet())
  467. /* */ {
  468. /* 483 */ PluginCommand command = getCommand((String)entry.getKey());
  469. /* 484 */ command.setPermission("command." + (String)entry.getKey());
  470. /* 485 */ command.setPermissionMessage(ChatColor.RED + "You do not have permission for this command.");
  471. /* */ }
  472. /* */ }
  473. /* */
  474. /* */ private void registerManagers()
  475. /* */ {
  476. /* 491 */ this.claimHandler = new ClaimHandler(this);
  477. /* 493 */ this.economyManager = new FlatFileEconomyManager(this);
  478. /* 494 */ this.eotwHandler = new EOTWHandler(this);
  479. /* 495 */ this.eventScheduler = new EventScheduler(this);
  480. /* 496 */ this.factionManager = new FlatFileFactionManager(this);
  481. /* 497 */ this.pvpClassManager = new PvpClassManager(this);
  482. /* 498 */ this.timerManager = new TimerManager(this);
  483. /* 499 */ this.scoreboardHandler = new ScoreboardHandler(this);
  484. /* 500 */ this.userManager = new UserManager(this);
  485. /* 501 */ this.visualiseHandler = new VisualiseHandler();
  486. /* 502 */ this.sotwTimer = new SotwTimer();
  487. /* 503 */ this.keyManager = new KeyManager(this);
  488. /* 504 */ this.message = new Message(this);
  489. /* */ }
  490. /* */
  491. /* */ public Message getMessage()
  492. /* */ {
  493. /* 509 */ return this.message;
  494. /* */ }
  495. /* */
  496. /* */ public Random getRandom()
  497. /* */ {
  498. /* 514 */ return this.random;
  499. /* */ }
  500. /* */
  501. /* */ public WorldEditPlugin getWorldEdit()
  502. /* */ {
  503. /* 519 */ return this.worldEdit;
  504. /* */ }
  505. /* */
  506. /* */ public KeyManager getKeyManager()
  507. /* */ {
  508. /* 524 */ return this.keyManager;
  509. /* */ }
  510. /* */
  511. /* */ public ClaimHandler getClaimHandler()
  512. /* */ {
  513. /* 529 */ return this.claimHandler;
  514. /* */ }
  515. /* */
  516. /* */ public SotwTimer getSotwTimer() {
  517. /* 533 */ return this.sotwTimer;
  518. /* */ }
  519. /* */
  520. /* */
  521. /* */ public ConfigurationService getConfiguration()
  522. /* */ {
  523. /* 539 */ return this.configuration;
  524. /* */ }
  525. /* */
  526. /* */ public VanishListener getVanish() {
  527. /* 548 */ return this.vanish;
  528. /* */ }
  529. /* */
  530. /* */ public EconomyManager getEconomyManager()
  531. /* */ {
  532. /* 553 */ return this.economyManager;
  533. /* */ }
  534. /* */
  535. /* */ public EOTWHandler getEotwHandler()
  536. /* */ {
  537. /* 558 */ return this.eotwHandler;
  538. /* */ }
  539. /* */
  540. /* */ public FactionManager getFactionManager()
  541. /* */ {
  542. /* 563 */ return this.factionManager;
  543. /* */ }
  544. /* */
  545. /* */ public PvpClassManager getPvpClassManager()
  546. /* */ {
  547. /* 568 */ return this.pvpClassManager;
  548. /* */ }
  549. /* */
  550. /* */
  551. /* */ public ScoreboardHandler getScoreboardHandler()
  552. /* */ {
  553. /* 574 */ return this.scoreboardHandler;
  554. /* */ }
  555. /* */
  556. /* */ public TimerManager getTimerManager()
  557. /* */ {
  558. /* 579 */ return this.timerManager;
  559. /* */ }
  560. /* */
  561. /* */ public UserManager getUserManager()
  562. /* */ {
  563. /* 584 */ return this.userManager;
  564. /* */ }
  565. /* */
  566. /* */ public VisualiseHandler getVisualiseHandler()
  567. /* */ {
  568. /* 589 */ return this.visualiseHandler;
  569. /* */ }
  570. /* */
  571. /* 592 */ private static final long MINUTE = TimeUnit.MINUTES.toMillis(1L);
  572. /* 593 */ private static final long HOUR = TimeUnit.HOURS.toMillis(1L);
  573. /* */ private static HCF plugin;
  574. /* */ public static Plugin pl;
  575. /* */ private Message message;
  576. /* */ public EventScheduler eventScheduler;
  577. /* */ private Random random;
  578. /* */ private WorldEditPlugin worldEdit;
  579. /* */ private FoundDiamondsListener foundDiamondsListener;
  580. /* */ private ClaimHandler claimHandler;
  581. /* */ private KeyManager keyManager;
  582. /* */ private EconomyManager economyManager;
  583. /* */ private EOTWHandler eotwHandler;
  584. /* */ private FactionManager factionManager;
  585. /* */ private PvpClassManager pvpClassManager;
  586. /* */ private VanishListener vanish;
  587. /* */ private ScoreboardHandler scoreboardHandler;
  588. /* */ private SotwTimer sotwTimer;
  589. /* */ private TimerManager timerManager;
  590. /* */ private UserManager userManager;
  591. /* */ private VisualiseHandler visualiseHandler;
  592. /* */ }
  593.  
  594.  
  595. /* Location: C:\Users\Zach\Desktop\HCF.jar!\org\hcfpvp\hcf\HCF.class
  596. * Java compiler version: 8 (52.0)
  597. * JD-Core Version: 0.7.1
  598. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement