Advertisement
Guest User

Untitled

a guest
Nov 19th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.19 KB | None | 0 0
  1. package eu.regium.lobby.file;
  2.  
  3. import eu.regium.lobby.Lobby;
  4. import eu.regium.lobby.util.Utils;
  5. import lombok.AllArgsConstructor;
  6. import org.bukkit.command.CommandSender;
  7. import org.bukkit.entity.Player;
  8.  
  9. /**
  10. * Created by trikeyyy on 15.11.2016.
  11. * Date: 15.11.2016
  12. * Time: 18:30
  13. */
  14. public class LobbyConfig {
  15.  
  16. public static class Files {
  17. // public static ConfigManager.ConfigFile CONFIG;
  18. // public static ConfigManager.ConfigFile MESSAGES;
  19. // public static ConfigManager.ConfigFile LOCATIONS;
  20. public static ConfigManager.ConfigFile DATABASE;
  21.  
  22. public Files() {
  23. // Files.CONFIG = ConfigManager.get(Lobby.getInstance(), "config.yml");
  24. // Files.MESSAGES = ConfigManager.get(Lobby.getInstance(), "messages.yml");
  25. // Files.LOCATIONS = ConfigManager.get(Lobby.getInstance(), "locations.yml");
  26. Files.DATABASE = ConfigManager.get(Lobby.getInstance(), "database.yml");
  27. }
  28. }
  29.  
  30. public static class Cache {
  31.  
  32. }
  33.  
  34. @AllArgsConstructor
  35. public enum Message {
  36. // public static String PREFIX = (String) Files.MESSAGES.addDefaultAndGetCurrentValue("prefix", "&f[&bLobby&f] ");
  37. // public static String ADMIN_MODE_ACTIVATE = (String) Files.MESSAGES.addDefaultAndGetCurrentValue("admin.activate", "\n&dADMIN MODE ACTIVATED!\n&4Pass auf, dass du nichts zerstörst!\n");
  38. // public static String ADMIN_MODE_DEACTIVATE = (String) Files.MESSAGES.addDefaultAndGetCurrentValue("admin.deactivate", "\n&dADMIN MODE DEACTIVATED!\n");
  39. // public static String SUIT_REMOVE = (String) Files.MESSAGES.addDefaultAndGetCurrentValue("suit.remove", PREFIX + "&cDein Anzug wurde entfernt!");
  40. // public static String SUIT_ALREADY = (String) Files.MESSAGES.addDefaultAndGetCurrentValue("suit.already", PREFIX + "&cDu hast bereits einen Anzug!");
  41. // PREFIX(Files.MESSAGES.addDefaultAndGetCurrentValue("prefix", "&f[&bLobby&f] ").toString()),
  42. // ADMIN_MODE_ACTIVATE(Files.MESSAGES.addDefaultAndGetCurrentValue("admin.activate", "\n&dADMIN MODE ACTIVATED!\n&4Pass auf, dass du nichts zerstörst!\n\n").toString()),
  43. // ADMIN_MODE_DEACTIVATE(Files.MESSAGES.addDefaultAndGetCurrentValue("admin.deactivate", "\n&dADMIN MODE DEACTIVATED!\n\n").toString()),
  44. // SUIT_REMOVE(Files.MESSAGES.addDefaultAndGetCurrentValue("suit.remove", PREFIX + "&cDein Anzug wurde entfernt!").toString()),
  45. // SUIT_ALREADY_WORN(Files.MESSAGES.addDefaultAndGetCurrentValue("suit.already", PREFIX + "&cDu hast bereits einen Anzug!").toString());
  46. ;
  47.  
  48.  
  49. private String message;
  50.  
  51. public void send(Player player) {
  52. player.sendMessage(Utils.color(message));
  53. }
  54.  
  55. public void send(CommandSender sender) {
  56. sender.sendMessage(message);
  57. }
  58. }
  59.  
  60. public static class Locations {
  61. // public static Location SPAWN = (Location) Files.LOCATIONS.addDefaultAndGetCurrentValue("spawn",
  62. // new Location(Bukkit.getWorld("world"), 0, 0, 0, 0, 0));
  63. //
  64. // public static Location SPAWN_WIZARDDM = (Location) Files.LOCATIONS.addDefaultAndGetCurrentValue("spawn.wizarddm",
  65. // new Location(Bukkit.getWorld("world"), 0, 0, 0, 0, 0));
  66. //
  67. // public static Location SPAWN_PET_SPAWN = (Location) Files.LOCATIONS.addDefaultAndGetCurrentValue("spawn.petspawn",
  68. // new Location(Bukkit.getWorld("world"), 0, 0, 0, 0, 0));
  69. //
  70. // public static Location SPAWN_PET_PLAYER_SPAWN = (Location) Files.LOCATIONS.addDefaultAndGetCurrentValue("spawn.petspawn.player",
  71. // new Location(Bukkit.getWorld("world"), 0, 0, 0, 0, 0));
  72. }
  73.  
  74. public static class Database {
  75. public static String ADDRESS = (String) Files.DATABASE.addDefaultAndGetCurrentValue("database.address", "localhost:3306");
  76. public static String SCHEMA = (String) Files.DATABASE.addDefaultAndGetCurrentValue("database.schema", "database");
  77. public static String USERNAME = (String) Files.DATABASE.addDefaultAndGetCurrentValue("database.username", "username");
  78. public static String PASSWORD = (String) Files.DATABASE.addDefaultAndGetCurrentValue("database.password", "password");
  79. }
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement