· 9 years ago · Nov 21, 2016, 08:58 PM
1package net.stawlker.practice.enums;
2
3public enum Table {
4 ELOS("elos", "CREATE TABLE IF NOT EXISTS `%name%` (\r\n `uuid` varchar(36) NOT NULL,\r\n `gametype` int(10) unsigned NOT NULL,\r\n `elo` int(10) NOT NULL\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;"),
5 KILLS("kills", "CREATE TABLE IF NOT EXISTS `%name%` (\r\n `uuid` varchar(36) NOT NULL,\r\n `gametype` int(10) unsigned NOT NULL,\r\n `kill` int(10) NOT NULL\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;"),
6 DEATHS("deaths", "CREATE TABLE IF NOT EXISTS `%name%` (\r\n `uuid` varchar(36) NOT NULL,\r\n `gametype` int(10) unsigned NOT NULL,\r\n `death` int(10) NOT NULL\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;"),
7 GAMEMODES("gamemodes", "CREATE TABLE IF NOT EXISTS `%name%` (\r\n `id` int(10) unsigned NOT NULL,\r\n `name` varchar(255) NOT NULL,\r\n `color` varchar(2) NOT NULL,\r\n `nodamageticks` int(2) DEFAULT 20\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;"),
8 GAMEMODES_SETTINGS("gamemodes_settings", "CREATE TABLE IF NOT EXISTS `%name%` (\r\n `gamemode` int(10) NOT NULL,\r\n `allow_build` bit(1) DEFAULT 0,\r\n `allow_fall_damage` bit(1) DEFAULT 1,\r\n `allow_kit_customization` bit(1) DEFAULT 1,\r\n `allow_natural_regeneration` bit(1) DEFAULT 1\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
9
10 private String name;
11 private String setup;
12
13 private Table(String name, int setup, String string2, String string3) {
14 this.name = name;
15 this.setup = (String)setup;
16 }
17
18 public String getName() {
19 return this.name;
20 }
21
22 public String getSetup() {
23 return this.setup;
24 }
25}