Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-----------------------------------------------
- #SELCT SERVER (FOR BEDWARS) + GET ONLINE PLAYERS
- #-----------------------------------------------
- script options:
- $ db url jdbc:mysql://mysql.mc-host24.de:3306/db_41537
- $ db username db_41537
- $ db password 8c58d8641e
- $ use permissions
- options:
- Prefix:&8ยป &eCloud &8โ
- on load:
- broadcast "{@Prefix} &7Alle BEDWARS Server wurden neu geladen."
- update "CREATE TABLE IF NOT EXISTS `bedwars` ( `id` INT NULL DEFAULT NULL AUTO_INCREMENT , `server` VARCHAR(30) NOT NULL , `mode` VARCHAR(30) NOT NULL , `players` VARCHAR(30) NOT NULL , `online` VARCHAR(30) NOT NULL , UNIQUE (`id`)) ENGINE = InnoDB;"
- command /serverjoin:
- permission: cloud.use
- permission message: {@Prefix} &cDu hast keinen Zugriff auf die Cloud!
- trigger:
- send "{@Prefix} &cYou can join a round, with the teleporter."
- command /fwgfviwf:
- trigger:
- send "{@Prefix} &cThis server is currently offline."
- command /cloud [<text>] [<text>] [<text>]:
- permission: cloud.use
- usage: &7/cloud help
- permission message: {@Prefix} &cDu hast keinen Zugriff auf die Cloud!
- trigger:
- if player is op:
- send "{@Prefix} &4Du kannst die Cloud nicht mit OP &4benutzen!"
- stop trigger
- if arg-1 is not set:
- send ""
- send "{@Prefix} &7Commands:"
- send "{@Prefix} "
- send "{@Prefix} &7/cloud list [<Modus>]"
- send "{@Prefix} &7/cloud create [<Modus>] [<Name>]"
- send "{@Prefix} &7/cloud remove [<Modus>] [<Name>]"
- send "{@Prefix} &7/cloud stop [<Modus>] [<Name>]"
- send "{@Prefix} &7/cloud start [<Modus>] [<Name>]"
- send ""
- stop
- if arg-1 is not "create" or "remove" or "stop" or "start" or "reload" or "list":
- send ""
- send "{@Prefix} &7Commands:"
- send "{@Prefix} "
- send "{@Prefix} &7/cloud list [<Modus>]"
- send "{@Prefix} &7/cloud create [<Modus>] [<Name>]"
- send "{@Prefix} &7/cloud remove [<Modus>] [<Name>]"
- send "{@Prefix} &7/cloud stop [<Modus>] [<Name>]"
- send "{@Prefix} &7/cloud start [<Modus>] [<Name>]"
- send "{@Prefix} &7/cloud reload [<Modus>] [<Name>]"
- send ""
- if arg 1 is "create":
- if arg 2 is set:
- if arg 3 is set:
- send "{@Prefix} &7Create a new Server... &8(&6%arg-2%&8) &8(&6%arg-3%&8)"
- wait 2 seconds
- set {_servermode} to arg 2
- set {_servername} to arg 3
- set {_players} to "0"
- set {_online} to "true"
- update "INSERT INTO `bedwars` (`server`, `mode`, `players`, `online`) VALUES ('%{_servername}%', '%{_servermode}%', '%{_players}%', '%{_online}%')"
- send "{@Prefix} &7Server &8(&6%{_servername}%&8) &7are now registered."
- else:
- send "{@Prefix} &cTry this command: /cloud"
- if arg 1 is "remove":
- if arg 2 is "1x1":
- if arg 3 is set:
- update "DELETE FROM `bedwars` WHERE `bedwars`.`server` = '%arg-3%'"
- send "{@Prefix} &cYou have successfully deleted this server"
- if arg-1 is "list":
- if arg 2 is not "1x1":
- send "{@Prefix} &cCurrently, there are only 1x1!"
- else if arg-2 is "1x1":
- set {_servern::*} to objects in column "server" from result of query "SELECT * FROM `bedwars`"
- set {_onlinen::*} to objects in column "online" from result of query "SELECT * FROM `bedwars`"
- set {_players::*} to objects in column "players" from result of query "SELECT * FROM `bedwars`"
- set {_slot} to 10
- set {_offlineslot} to 28
- open chest with 5 rows named "&b&lCloud" to player
- format slot 0 of player with black stained glass pane named " " to be unstealable
- format slot 1 of player with black stained glass pane named " " to be unstealable
- format slot 2 of player with black stained glass pane named " " to be unstealable
- format slot 3 of player with black stained glass pane named " " to be unstealable
- format slot 4 of player with black stained glass pane named " " to be unstealable
- format slot 5 of player with black stained glass pane named " " to be unstealable
- format slot 6 of player with black stained glass pane named " " to be unstealable
- format slot 7 of player with black stained glass pane named " " to be unstealable
- format slot 8 of player with black stained glass pane named " " to be unstealable
- format slot 9 of player with black stained glass pane named " " to be unstealable
- format slot 17 of player with black stained glass pane named " " to be unstealable
- format slot 18 of player with black stained glass pane named " " to be unstealable
- format slot 19 of player with black stained glass pane named " " to be unstealable
- format slot 20 of player with black stained glass pane named " " to be unstealable
- format slot 21 of player with black stained glass pane named " " to be unstealable
- format slot 22 of player with black stained glass pane named " " to be unstealable
- format slot 23 of player with black stained glass pane named " " to be unstealable
- format slot 24 of player with black stained glass pane named " " to be unstealable
- format slot 25 of player with black stained glass pane named " " to be unstealable
- format slot 26 of player with black stained glass pane named " " to be unstealable
- format slot 27 of player with black stained glass pane named " " to be unstealable
- format slot 35 of player with black stained glass pane named " " to be unstealable
- format slot 36 of player with black stained glass pane named " " to be unstealable
- format slot 37 of player with black stained glass pane named " " to be unstealable
- format slot 38 of player with black stained glass pane named " " to be unstealable
- format slot 39 of player with black stained glass pane named " " to be unstealable
- format slot 40 of player with black stained glass pane named " " to be unstealable
- format slot 41 of player with black stained glass pane named " " to be unstealable
- format slot 42 of player with black stained glass pane named " " to be unstealable
- format slot 43 of player with black stained glass pane named " " to be unstealable
- format slot 44 of player with black stained glass pane named " " to be unstealable
- format slot 10 of player with blue stained clay named "&cCurrently, no server is online!" to be unstealable
- format slot 28 of player with blue stained clay named "&cCurrently, no server is offline!" to be unstealable
- loop {_servern::*}:
- loop {_onlinen::*}:
- if loop-value-2 is "true":
- loop {_players::*}:
- if {_done.%loop-index-1%} is not set:
- if {_done.%loop-index-2%} is not set:
- if {_done.%loop-index-3%} is not set:
- format slot {_slot} of player with lime stained clay named "&bBedwars" with lore "&7Server: &b%loop-value-1%||&7Online: &aonline||&7Mode: &a1x1||&7Spieler: &a%loop-value-3%" to run [execute player command "serverjoin"]
- add 1 to {_slot}
- set {_done.%loop-index-1%} to true
- set {_done.%loop-index-2%} to true
- set {_done.%loop-index-3%} to true
- else if loop-value-2 is "false":
- loop {_players::*}:
- if {_done.%loop-index-1%} is not set:
- if {_done.%loop-index-2%} is not set:
- if {_done.%loop-index-3%} is not set:
- format slot {_offlineslot} of player with red stained clay named "&bBedwars" with lore "&7Server: &b%loop-value-1%||&7Online: &coffline||&7Mode: &a1x1||&7Spieler: &a%loop-value-3%" to run [execute player command "fwgfviwf"]
- add 1 to {_offlineslot}
- set {_done.%loop-index-1%} to true
- set {_done.%loop-index-2%} to true
- set {_done.%loop-index-3%} to true
- else if arg 2 is not set:
- send "{@Prefix} &cYou forgot something. &8(&61x1&8)"
- if arg 1 is "start":
- if arg 2 is set:
- if arg 3 is set:
- set {_online} to "true"
- send "{@Prefix} &7Starting..."
- update "UPDATE bedwars SET `online` = '%{_online}%' WHERE server = '%arg-3%'"
- update "INSERT INTO `bedwars` (`online`) VALUES ('%{_online}%')"
- send "{@Prefix} &7This server are now online! &8(&6%arg 3%&8)"
- stop
- else:
- send "{@Prefix} &cThis server doesn't exist."
- stop
- else if arg 2 is not set:
- send "{@Prefix} &cYou forgot something. &8(&61x1&8)"
- if arg 1 is "stop":
- if arg 2 is set:
- if arg 3 is set:
- set {_online} to "false"
- send "{@Prefix} &cThe cloud now stop this server.. &8(&6%arg-3%&8)"
- update "UPDATE bedwars SET `online` = '%{_online}%' WHERE server = '%arg-3%'"
- update "INSERT INTO `bedwars` (`online`) VALUES ('%{_online}%')"
- send "{@Prefix} &7You stoped this server! &8(&6%arg 3%&8)"
- stop
- else:
- send "{@Prefix} &cThis server doesn't exist."
- stop
- else if arg 2 is not set:
- send "{@Prefix} &cYou forgot something. &8(&61x1&8)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement