mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Add ability to define cooldowns for actions (#437)
This commit is contained in:
1 parent
fb052340c0
commit
fc8d3b0098
52 files changed
+1140
-619
No files matched your search
@@ -24,7 +24,6 @@ CREATE TABLE IF NOT EXISTS `%players_table%`
|
||||
`respawn_position` integer DEFAULT NULL,
|
||||
`home_slots` integer NOT NULL DEFAULT 0,
|
||||
`ignoring_requests` boolean NOT NULL DEFAULT FALSE,
|
||||
`rtp_cooldown` datetime NOT NULL DEFAULT 0,
|
||||
|
||||
PRIMARY KEY (`uuid`),
|
||||
FOREIGN KEY (`last_position`) REFERENCES `%positions_table%` (`id`) ON DELETE SET NULL ON UPDATE NO ACTION,
|
||||
@@ -32,6 +31,19 @@ CREATE TABLE IF NOT EXISTS `%players_table%`
|
||||
FOREIGN KEY (`respawn_position`) REFERENCES `%positions_table%` (`id`) ON DELETE SET NULL ON UPDATE NO ACTION
|
||||
);
|
||||
|
||||
/* Create the cooldowns table if it does not exist */
|
||||
CREATE TABLE IF NOT EXISTS `%cooldowns_table%`
|
||||
(
|
||||
`id` integer NOT NULL,
|
||||
`player_uuid` char(36) NOT NULL UNIQUE,
|
||||
`type` integer NOT NULL,
|
||||
`start_timestamp` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`end_timestamp` datetime NOT NULL,
|
||||
|
||||
PRIMARY KEY (`id`),
|
||||
FOREIGN KEY (`player_uuid`) REFERENCES `%players_table%` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
/* Create the current cross-server teleports table if it does not exist */
|
||||
CREATE TABLE IF NOT EXISTS `%teleports_table%`
|
||||
(
|
||||
|
||||
Reference in new issue
Block a user