Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.54 KB | None | 0 0
  1. package com.redewally.manager;
  2.  
  3. import com.comphenix.protocol.ProtocolLibrary;
  4. import com.comphenix.protocol.ProtocolManager;
  5. import com.redewally.manager.api.Prefixos;
  6. import com.redewally.manager.api.Tablist;
  7. import com.redewally.manager.api.Title;
  8. import com.redewally.manager.cash.Cash;
  9. import com.redewally.manager.cash.CashCommand;
  10. import com.redewally.manager.chat.Chat;
  11. import com.redewally.manager.chat.CommandChat;
  12. import com.redewally.manager.chat.CommandGlobal;
  13. import com.redewally.manager.clearlag.Manager;
  14. import com.redewally.manager.clearlag.MobLimiter;
  15. import com.redewally.manager.commands.CommandAPI;
  16. import com.redewally.manager.commands.CommandAnuncio;
  17. import com.redewally.manager.commands.CommandBack;
  18. import com.redewally.manager.commands.CommandBunker;
  19. import com.redewally.manager.commands.CommandChapeu;
  20. import com.redewally.manager.commands.CommandChatVIP;
  21. import com.redewally.manager.commands.CommandChunk;
  22. import com.redewally.manager.commands.CommandCompactar;
  23. import com.redewally.manager.commands.CommandCraft;
  24. import com.redewally.manager.commands.CommandDeus;
  25. import com.redewally.manager.commands.CommandDia;
  26. import com.redewally.manager.commands.CommandEnchant;
  27. import com.redewally.manager.commands.CommandEnderChest;
  28. import com.redewally.manager.commands.CommandEsconder;
  29. import com.redewally.manager.commands.CommandFertilizar;
  30. import com.redewally.manager.commands.CommandGerais;
  31. import com.redewally.manager.commands.CommandGive;
  32. import com.redewally.manager.commands.CommandHead;
  33. import com.redewally.manager.commands.CommandHeal;
  34. import com.redewally.manager.commands.CommandItemInfo;
  35. import com.redewally.manager.commands.CommandKick;
  36. import com.redewally.manager.commands.CommandKill;
  37. import com.redewally.manager.commands.CommandKit;
  38. import com.redewally.manager.commands.CommandLimpar;
  39. import com.redewally.manager.commands.CommandLimparChat;
  40. import com.redewally.manager.commands.CommandLuz;
  41. import com.redewally.manager.commands.CommandMemory;
  42. import com.redewally.manager.commands.CommandMobstack;
  43. import com.redewally.manager.commands.CommandNoite;
  44. import com.redewally.manager.commands.CommandOlharInventario;
  45. import com.redewally.manager.commands.CommandPing;
  46. import com.redewally.manager.commands.CommandPromote;
  47. import com.redewally.manager.commands.CommandReiniciar;
  48. import com.redewally.manager.commands.CommandReparar;
  49. import com.redewally.manager.commands.CommandReportar;
  50. import com.redewally.manager.commands.CommandRocket;
  51. import com.redewally.manager.commands.CommandSairComEstilo;
  52. import com.redewally.manager.commands.CommandSpawn;
  53. import com.redewally.manager.commands.CommandSpeed;
  54. import com.redewally.manager.commands.CommandStaff;
  55. import com.redewally.manager.commands.CommandTeleportar;
  56. import com.redewally.manager.commands.CommandTell;
  57. import com.redewally.manager.commands.CommandTitle;
  58. import com.redewally.manager.commands.CommandTop;
  59. import com.redewally.manager.commands.CommandTpa;
  60. import com.redewally.manager.commands.CommandTpall;
  61. import com.redewally.manager.commands.CommandUptime;
  62. import com.redewally.manager.commands.CommandVIP;
  63. import com.redewally.manager.events.ActionInfo;
  64. import com.redewally.manager.events.AntiJigsaw;
  65. import com.redewally.manager.events.CapirotoListener;
  66. import com.redewally.manager.events.DeusListener;
  67. import com.redewally.manager.events.EsconderListener;
  68. import com.redewally.manager.events.IPListener;
  69. import com.redewally.manager.events.Listeners;
  70. import com.redewally.manager.events.NoStack;
  71. import com.redewally.manager.events.PreloginListener;
  72. import com.redewally.manager.events.SalvarBack;
  73. import com.redewally.manager.events.ShopListener;
  74. import com.redewally.manager.kits.MainInventory;
  75. import com.redewally.manager.kits.categories.BasicInventory;
  76. import com.redewally.manager.kits.categories.RanksInventory;
  77. import com.redewally.manager.kits.categories.VIPInventory;
  78. import com.redewally.manager.kits.preview.PreviewBasicoInventory;
  79. import com.redewally.manager.kits.preview.PreviewDiarioInventory;
  80. import com.redewally.manager.kits.preview.PreviewMensalInventory;
  81. import com.redewally.manager.kits.preview.PreviewSemanalInventory;
  82. import com.redewally.manager.lixeira.CentralL;
  83. import com.redewally.manager.lixeira.Comando_Lixeira;
  84. import com.redewally.manager.utils.CashSQL;
  85. import com.redewally.manager.utils.Lists;
  86. import com.redewally.manager.utils.RankupCore;
  87. import com.redewally.manager.utils.Reflection;
  88. import com.redewally.manager.utils.StartedTime;
  89. import com.redewally.manager.utils.TimeFormater;
  90. import java.io.ByteArrayOutputStream;
  91. import java.io.DataOutputStream;
  92. import java.io.File;
  93. import java.io.IOException;
  94. import java.util.ArrayList;
  95. import java.util.HashMap;
  96. import java.util.Iterator;
  97. import java.util.List;
  98. import java.util.NavigableMap;
  99. import java.util.TreeMap;
  100. import java.util.concurrent.TimeUnit;
  101. import net.milkbowl.vault.economy.Economy;
  102. import org.bukkit.Bukkit;
  103. import org.bukkit.Location;
  104. import org.bukkit.configuration.file.FileConfiguration;
  105. import org.bukkit.configuration.file.YamlConfiguration;
  106. import org.bukkit.entity.Player;
  107. import org.bukkit.inventory.ItemStack;
  108. import org.bukkit.plugin.RegisteredServiceProvider;
  109. import org.bukkit.plugin.java.JavaPlugin;
  110. import org.bukkit.scheduler.BukkitRunnable;
  111. import org.bukkit.scheduler.BukkitScheduler;
  112. import ru.tehkode.permissions.PermissionUser;
  113. import ru.tehkode.permissions.bukkit.PermissionsEx;
  114.  
  115. public class Main extends JavaPlugin {
  116. public Lists lists = new Lists();
  117. public HashMap<Location, ItemStack> spawners = new HashMap();
  118. public HashMap<String, Cash> cache = new HashMap();
  119. public ArrayList<String> preLogin = new ArrayList();
  120. public ArrayList<String> weiting = new ArrayList();
  121. public String status;
  122. public StartedTime start;
  123. public ProtocolManager protocolManager;
  124. public Config spawn = new Config(this, "spawn.yml");
  125. public Config data = new Config(this, "data.yml");
  126. public static CashSQL sql;
  127. public static String player = "";
  128. public static String chat_status;
  129. public static FileConfiguration cnf;
  130. public static Main pl;
  131. public static Main plugin;
  132. public static ArrayList<String> logado = new ArrayList();
  133. public static Title titleapi;
  134. public static Main instance;
  135. public static List<String> sites = new ArrayList();
  136. public static Economy econ;
  137. public static Economy economy;
  138. private static Prefixos so;
  139. private static RankupCore core;
  140. private static Chat c;
  141. private static String symbol = "•";
  142. public static int rst;
  143. public static int time = 0;
  144. public static long uptime = 0L;
  145. public static boolean loockclans = false;
  146. public static boolean Restart;
  147. public static boolean Reiniciar;
  148. public static boolean first = false;
  149. public static boolean muted = false;
  150. public static final NavigableMap<Long, String> suffixes = new TreeMap();
  151. private boolean restart = false;
  152. public FileConfiguration DATA_YAML;
  153. public File f;
  154. public FileConfiguration DATA_YAML2;
  155. public File f2;
  156.  
  157. static {
  158. loockclans = false;
  159. uptime = 0L;
  160. Restart = false;
  161. Reiniciar = false;
  162. }
  163.  
  164. public static Main getInstance() {
  165. return instance;
  166. }
  167.  
  168. public static Main getPlugin() {
  169. return plugin;
  170. }
  171.  
  172. public static boolean isWeiting(String p) {
  173. return !getInstance().weiting.contains(p);
  174. }
  175.  
  176. public void onEnable() {
  177. plugin = this;
  178. chat_status = "ON";
  179. instance = this;
  180. muted = false;
  181. sites.add("google.com.br");
  182. sites.add("google.com");
  183. sites.add("prnt");
  184. sites.add("redeseed");
  185. sites.add("seednetwork");
  186. sites.add("seedmc");
  187. sites.add("youtube");
  188. sites.add("youtu.be");
  189. Restart = false;
  190. Reiniciar = false;
  191. Manager manager = new Manager();
  192. info("Habilitando...");
  193. info("Habilitado com sucesso.");
  194. File f = new File("plugins/SeedManager");
  195. sql = new CashSQL();
  196. time = this.getConfig().getInt("cleartime");
  197. this.start = new StartedTime(System.currentTimeMillis());
  198. this.protocolManager = ProtocolLibrary.getProtocolManager();
  199. c = new Chat();
  200. core = new RankupCore(this);
  201. so = new Prefixos();
  202. suffixes.put(1000L, "K");
  203. suffixes.put(1000000L, "KK");
  204. suffixes.put(1000000000L, "B");
  205. suffixes.put(1000000000000L, "T");
  206. suffixes.put(1000000000000000L, "Q");
  207. suffixes.put(1000000000000000000L, "E");
  208. this.createCustomConfig();
  209. this.createCustomConfig2();
  210. this.saveConfig();
  211. this.setupEconomy();
  212. manager.run();
  213. MobLimiter.load();
  214. this.status = "DESMUTADO";
  215. this.data.saveDefaultConfig();
  216. this.saveDefaultConfig();
  217. new Reflection(this);
  218. this.setupEconomy();
  219. AntiJigsaw listener = new AntiJigsaw(this, this.getConfig());
  220. ProtocolLibrary.getProtocolManager().addPacketListener(listener);
  221. BukkitScheduler var10000 = Bukkit.getScheduler();
  222. List var10002 = listener.uuids;
  223. listener.uuids.getClass();
  224. var10000.scheduleSyncDelayedTask(this, var10002::clear, 5L);
  225. cnf = this.getConfig();
  226. if (!(new File(this.getDataFolder(), "locais.yml")).exists()) {
  227. this.saveDefaultConfig();
  228. }
  229.  
  230. if (!f.exists()) {
  231. f.mkdirs();
  232. }
  233.  
  234. cnf = this.getConfig();
  235. if (!(new File(this.getDataFolder(), "config.yml")).exists()) {
  236. this.saveDefaultConfig();
  237. }
  238.  
  239. if (!this.getServer().getMessenger().isOutgoingChannelRegistered(this, "BungeeCord")) {
  240. this.getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
  241. }
  242.  
  243. Bukkit.getServer().getConsoleSender().sendMessage("§a[SeedManager] Plugin habilitado com sucesso!");
  244. Bukkit.getServer().getPluginManager().registerEvents(new Listeners(), this);
  245. Bukkit.getServer().getPluginManager().registerEvents(new EsconderListener(), this);
  246. Bukkit.getServer().getPluginManager().registerEvents(new IPListener(), this);
  247. Bukkit.getServer().getPluginManager().registerEvents(new NoStack(), this);
  248. Bukkit.getServer().getPluginManager().registerEvents(new DeusListener(), this);
  249. Bukkit.getServer().getPluginManager().registerEvents(new PreloginListener(), this);
  250. Bukkit.getServer().getPluginManager().registerEvents(new ActionInfo(), this);
  251. Bukkit.getServer().getPluginManager().registerEvents(new CapirotoListener(), this);
  252. Bukkit.getServer().getPluginManager().registerEvents(new Chat(), this);
  253. Bukkit.getServer().getPluginManager().registerEvents(new CentralL(), this);
  254. Bukkit.getServer().getPluginManager().registerEvents(new PreviewBasicoInventory(), this);
  255. Bukkit.getServer().getPluginManager().registerEvents(new PreviewDiarioInventory(), this);
  256. Bukkit.getServer().getPluginManager().registerEvents(new PreviewMensalInventory(), this);
  257. Bukkit.getServer().getPluginManager().registerEvents(new PreviewSemanalInventory(), this);
  258. Bukkit.getServer().getPluginManager().registerEvents(new SalvarBack(), this);
  259. Bukkit.getServer().getPluginManager().registerEvents(new ShopListener(), this);
  260. Bukkit.getServer().getPluginManager().registerEvents(new RanksInventory(), this);
  261. Bukkit.getServer().getPluginManager().registerEvents(new MainInventory(), this);
  262. Bukkit.getServer().getPluginManager().registerEvents(new BasicInventory(), this);
  263. Bukkit.getServer().getPluginManager().registerEvents(new VIPInventory(), this);
  264. this.getCommand("Lagg").setExecutor(new CommandChunk());
  265. this.getCommand("Gamemode").setExecutor(new CommandGerais());
  266. this.getCommand("Iteminfo").setExecutor(new CommandItemInfo());
  267. this.getCommand("S").setExecutor(new CommandStaff());
  268. this.getCommand("Set").setExecutor(new CommandGerais());
  269. this.getCommand("Spawn").setExecutor(new CommandSpawn());
  270. this.getCommand("Fertilizar").setExecutor(new CommandFertilizar());
  271. this.getCommand("Promover").setExecutor(new CommandPromote());
  272. this.getCommand("Kit").setExecutor(new CommandKit());
  273. this.getCommand("G").setExecutor(new CommandGlobal());
  274. this.getCommand("Cash").setExecutor(new CashCommand());
  275. this.getCommand("Chat").setExecutor(new CommandChat());
  276. this.getCommand("Lixeira").setExecutor(new Comando_Lixeira());
  277. this.getCommand("Compactar").setExecutor(new CommandCompactar());
  278. this.getCommand("Limparchat").setExecutor(new CommandLimparChat());
  279. this.getCommand("Chatvip").setExecutor(new CommandChatVIP());
  280. this.getCommand("Enchant").setExecutor(new CommandEnchant());
  281. this.getCommand("Fix").setExecutor(new CommandReparar());
  282. this.getCommand("Setspawn").setExecutor(new CommandSpawn());
  283. this.getCommand("Arena").setExecutor(new CommandGerais());
  284. this.getCommand("Mina").setExecutor(new CommandGerais());
  285. this.getCommand("MinaPvP").setExecutor(new CommandGerais());
  286. this.getCommand("Loja").setExecutor(new CommandGerais());
  287. this.getCommand("Reportar").setExecutor(new CommandReportar());
  288. this.getCommand("ToggleReportar").setExecutor(new CommandReportar());
  289. this.getCommand("Enderchest").setExecutor(new CommandEnderChest());
  290. this.getCommand("Vip").setExecutor(new CommandVIP());
  291. this.getCommand("SetVip").setExecutor(new CommandVIP());
  292. this.getCommand("Memory").setExecutor(new CommandMemory());
  293. this.getCommand("Back").setExecutor(new CommandBack());
  294. this.getCommand("Ping").setExecutor(new CommandPing());
  295. this.getCommand("B").setExecutor(new CommandBunker());
  296. this.getCommand("List").setExecutor(new CommandGerais());
  297. this.getCommand("Tell").setExecutor(new CommandTell());
  298. this.getCommand("Tpa").setExecutor(new CommandTpa());
  299. this.getCommand("Tpaaceitar").setExecutor(new CommandTpa());
  300. this.getCommand("Tpanegar").setExecutor(new CommandTpa());
  301. this.getCommand("Head").setExecutor(new CommandHead());
  302. this.getCommand("Luz").setExecutor(new CommandLuz());
  303. this.getCommand("Invsee").setExecutor(new CommandOlharInventario());
  304. this.getCommand("Saircomestilo").setExecutor(new CommandSairComEstilo());
  305. this.getCommand("Tp").setExecutor(new CommandTeleportar());
  306. this.getCommand("Speed").setExecutor(new CommandSpeed());
  307. this.getCommand("Api").setExecutor(new CommandAPI());
  308. this.getCommand("Craft").setExecutor(new CommandCraft());
  309. this.getCommand("Dia").setExecutor(new CommandDia());
  310. this.getCommand("Uptime").setExecutor(new CommandUptime());
  311. this.getCommand("Noite").setExecutor(new CommandNoite());
  312. this.getCommand("Tpall").setExecutor(new CommandTpall());
  313. this.getCommand("Give").setExecutor(new CommandGive());
  314. this.getCommand("Kill").setExecutor(new CommandKill());
  315. this.getCommand("Mobstack").setExecutor(new CommandMobstack());
  316. this.getCommand("Gamemode").setExecutor(new CommandGerais());
  317. this.getCommand("Hat").setExecutor(new CommandChapeu());
  318. this.getCommand("God").setExecutor(new CommandDeus());
  319. this.getCommand("Esconder").setExecutor(new CommandEsconder());
  320. this.getCommand("Rocket").setExecutor(new CommandRocket());
  321. this.getCommand("Kick").setExecutor(new CommandKick());
  322. this.getCommand("Title").setExecutor(new CommandTitle());
  323. this.getCommand("Top").setExecutor(new CommandTop());
  324. this.getCommand("Gm").setExecutor(new CommandGerais());
  325. this.getCommand("Fly").setExecutor(new CommandGerais());
  326. this.getCommand("Fakes").setExecutor(new CommandGerais());
  327. this.getCommand("Clear").setExecutor(new CommandLimpar());
  328. this.getCommand("Cc").setExecutor(new CommandGerais());
  329. this.getCommand("List").setExecutor(new CommandGerais());
  330. this.getCommand("Online").setExecutor(new CommandGerais());
  331. this.getCommand("V").setExecutor(new CommandGerais());
  332. this.getCommand("Reiniciar").setExecutor(new CommandReiniciar());
  333. this.getCommand("Heal").setExecutor(new CommandHeal());
  334. this.getCommand("Anuncio").setExecutor(new CommandAnuncio());
  335. Iterator var6 = getInstance().data.getConfig().getConfigurationSection("Data").getKeys(false).iterator();
  336.  
  337. while(var6.hasNext()) {
  338. String add = (String)var6.next();
  339. double coins = getInstance().data.getConfig().getDouble("Data." + add + ".Coins");
  340. Cash gc = new Cash(add, coins);
  341. this.cache.put(add, gc);
  342. }
  343.  
  344. Bukkit.getServer().getScheduler().scheduleAsyncRepeatingTask(this, new Runnable() {
  345. public void run() {
  346. }
  347. }, 1500L, 1500L);
  348. Bukkit.getServer().getScheduler().scheduleAsyncRepeatingTask(this, new Runnable() {
  349. public void run() {
  350. }
  351. }, 5400L, 5400L);
  352. Bukkit.getScheduler().scheduleAsyncRepeatingTask(this, new Runnable() {
  353. public void run() {
  354. Iterator var2 = Bukkit.getOnlinePlayers().iterator();
  355.  
  356. while(var2.hasNext()) {
  357. Player p = (Player)var2.next();
  358. Tablist.sendTitleTab(p, "§f \n§6§lSEED MC §7\n§fwww.seed-mc.online §d\n\n §aPromoção de Inauguração!§9\n §aPacotes §l25% §aOFF, utilize o cupom §lFULLPVP§a!\n§f", "§f \n§6Twitter:§f twitter.com/ServidoresSeed \n§6Discord:§f discord.seed-mc.online \n§6Fórum:§f forum.seed-mc.online\n§f \n§f \n §6 Adquira VIP e CASH acessando: §floja.seed-mc.online \n§f");
  359. }
  360.  
  361. }
  362. }, 50L, 50L);
  363. }
  364.  
  365. public void atualizar() {
  366. (new BukkitRunnable() {
  367. public void run() {
  368. if (!Main.this.restart) {
  369. String time = TimeFormater.format(System.currentTimeMillis() - Main.getInstance().start.getStartedTime());
  370. if (time.toLowerCase().contains("6h")) {
  371. Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "reiniciar auto");
  372. Main.this.restart = true;
  373. }
  374.  
  375. }
  376. }
  377. }).runTaskTimerAsynchronously(this, 20L, 20L);
  378. }
  379.  
  380. public static void info(String msg) {
  381. Bukkit.getConsoleSender().sendMessage("§e[SeedManager] " + msg);
  382. }
  383.  
  384. public static void serverConnect(Player p, String server) {
  385. ByteArrayOutputStream b = new ByteArrayOutputStream();
  386. DataOutputStream out = new DataOutputStream(b);
  387.  
  388. try {
  389. out.writeUTF("Connect");
  390. out.writeUTF(server);
  391. } catch (IOException var5) {
  392. var5.printStackTrace();
  393. }
  394.  
  395. p.sendPluginMessage(plugin, "BungeeCord", b.toByteArray());
  396. }
  397.  
  398. void createCustomConfig() {
  399. this.f = new File(this.getDataFolder(), "kits.yml");
  400. if (!this.f.exists()) {
  401. try {
  402. this.f.createNewFile();
  403. } catch (IOException var2) {
  404. Bukkit.getConsoleSender().sendMessage("§cNão foi possível criar o arquivo kits.yml");
  405. }
  406. }
  407.  
  408. this.DATA_YAML = YamlConfiguration.loadConfiguration(this.f);
  409. }
  410.  
  411. void createCustomConfig2() {
  412. this.f2 = new File(this.getDataFolder(), "spawners.yml");
  413. if (!this.f2.exists()) {
  414. try {
  415. this.f2.createNewFile();
  416. } catch (IOException var2) {
  417. Bukkit.getConsoleSender().sendMessage("§cNão foi possível criar o arquivo spawners.yml");
  418. }
  419. }
  420.  
  421. this.DATA_YAML2 = YamlConfiguration.loadConfiguration(this.f2);
  422. }
  423.  
  424. public void onDisable() {
  425. Bukkit.getServer().getConsoleSender().sendMessage("§c[SeedManager] Plugin desabilitado com sucesso!");
  426. this.saveDefaultConfig();
  427. Iterator var2 = Cash.getAll().iterator();
  428.  
  429. while(var2.hasNext()) {
  430. Cash c = (Cash)var2.next();
  431. c.save();
  432. }
  433.  
  434. }
  435.  
  436. public static Chat getChat() {
  437. return c;
  438. }
  439.  
  440. public static Prefixos getPrefixosAPI() {
  441. return so;
  442. }
  443.  
  444. public static RankupCore getCore() {
  445. return core;
  446. }
  447.  
  448. public static String getSymbol() {
  449. return symbol;
  450. }
  451.  
  452. public static double getMoneyJogador(String p) {
  453. getInstance();
  454. return economy.getBalance(p);
  455. }
  456.  
  457. public static double getMoney(Player p) {
  458. return getMoneyJogador(p.getName()) >= 1.0E10D ? 1.0E9D : getMoneyJogador(p.getName());
  459. }
  460.  
  461. public static void debug(String msg) {
  462. Bukkit.getConsoleSender().sendMessage("§e[SeedManager] " + msg);
  463. }
  464.  
  465. private boolean setupEconomy() {
  466. if (this.getServer().getPluginManager().getPlugin("Vault") == null) {
  467. return false;
  468. } else {
  469. RegisteredServiceProvider<Economy> economyProvider = this.getServer().getServicesManager().getRegistration(Economy.class);
  470. if (economyProvider != null) {
  471. economy = (Economy)economyProvider.getProvider();
  472. }
  473.  
  474. return economy != null;
  475. }
  476. }
  477.  
  478. public String formatDifference(long time) {
  479. if (time == 0L) {
  480. return "nunca";
  481. } else {
  482. long day = TimeUnit.MILLISECONDS.toDays(time);
  483. long hours = TimeUnit.MILLISECONDS.toHours(time) - day * 24L;
  484. long minutes = TimeUnit.MILLISECONDS.toMinutes(time) - TimeUnit.MILLISECONDS.toHours(time) * 60L;
  485. long seconds = TimeUnit.MILLISECONDS.toSeconds(time) - TimeUnit.MILLISECONDS.toMinutes(time) * 60L;
  486. StringBuilder sb = new StringBuilder();
  487. if (day > 0L) {
  488. sb.append(day).append(" ").append(day == 1L ? "dia" : "dias").append(" ");
  489. }
  490.  
  491. if (hours > 0L) {
  492. sb.append(hours).append(" ").append(hours == 1L ? "hora" : "horas").append(" ");
  493. }
  494.  
  495. if (minutes > 0L) {
  496. sb.append(minutes).append(" ").append(minutes == 1L ? "minuto" : "minutos").append(" ");
  497. }
  498.  
  499. if (seconds > 0L) {
  500. sb.append(seconds).append(" ").append(seconds == 1L ? "segundo" : "segundos");
  501. }
  502.  
  503. String diff = sb.toString();
  504. return diff.isEmpty() ? "agora" : diff;
  505. }
  506. }
  507.  
  508. public String getRank(String player) {
  509. PermissionUser pex = PermissionsEx.getUser(player);
  510. int size = pex.getGroupNames().length;
  511. if (size >= 2) {
  512. String primary = pex.getGroupNames()[0];
  513. String vip = pex.getGroupNames()[1];
  514. if (primary.equalsIgnoreCase("Membro")) {
  515. return !vip.equalsIgnoreCase("nenhum") ? vip : "Membro";
  516. } else {
  517. return primary;
  518. }
  519. } else {
  520. return pex.getGroupNames()[0];
  521. }
  522. }
  523.  
  524. static void access$1(Main main, boolean restart) {
  525. main.restart = restart;
  526. }
  527. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement