database.sk

Created by TryhardTree

Other available versions. Ordered by newest to oldest versions:

Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.

command /database [<text>] [<text>]:
 aliases: /dtb, /db
 trigger:
  if arg-1 is set:
   if arg-1 is "info":
    if player doesn't have permission "database.info" or "database.all":
     send "&e&lDATABASE &7| &cError: You do not have the permission to execute this command!"
     play sound "minecraft:block.note_block.guitar" at volume 1 at pitch 1 to player
    else if player has permission "database.info" or "database.all":
     send " "
     send "&e&lDATABASE &7(v1.1) &aby TryhardTree"
     send "&7Commands: /database, /dtb, /db"
     send " "
     send "&e- /database info ; Sends you a message with all informations about every Database command (This message)!"
     send " "
     send "&a- /database add <id> ; Adds your hand item to the database with the ID of what you gave as the <id>!"
     send " "
     send "&c- /database remove <id> ; Removes an item from the database with the ID of what you gave as the <id>!"
     send " "
     send "&e- /database give <id> ; Gives an item from the database with the ID of what you gave as the <id>!"
     send " "
     send "&7&n&lIf you want to use the items in a script, then follow these Steps&7:"
     send "&f&l1. &bAdd the item to your database."
     send "&f&l2. &bGo into your script which you want to use the variable in."
     send "&f&l3. &bUse the variable '' {database::>>id<<} '' , though replace the >>id<< with the id of your item."
     send " "
     send "&b&lNOTE &7| &eIf an ID doesn't exist, it will still show the debug information!"
     send " "
     stop
   else if arg-1 is not "info" or "add" or "remove" or "give":
    send "&e&lDATABASE &7| &cError: Please use known arguments! (/database info)"
    play sound "minecraft:block.note_block.guitar" at volume 1 at pitch 1 to player
   if arg-2 is set:
    if arg-1 is "add":
     if player doesn't have permission "database.add" or "database.all":
      send "&e&lDATABASE &7| &cError: You do not have the permission to execute this command!"
      play sound "minecraft:block.note_block.guitar" at volume 1 at pitch 1 to player
     else if player has permission "database.add" or "database.all":
      if player's tool is air:
       send "&e&lDATABASE &7| &cYou can't save air as an item!"
       play sound "minecraft:block.note_block.guitar" at volume 1 at pitch 1 to player
      else if player's tool is not air:
       set {database::%arg-2%} to player's tool
       send "&e&lDATABASE &7| &aAdded your hand item to the Database with the id of '&e%arg-2%&a'!"
       play sound "minecraft:block.note_block.pling" at volume 1 at pitch 1 to player
    if arg-1 is "remove":
     if player doesn't have permission "database.remove" or "database.all":
      send "&e&lDATABASE &7| &cError: You do not have the permission to execute this command!"
      play sound "minecraft:block.note_block.guitar" at volume 1 at pitch 1 to player
     else if player has permission "database.remove" or "database.all":
      clear {database::%arg-2%}
      send "&e&lDATABASE &7| &aRemoved the item from the Database with the id of '&e%arg-2%&c'!"
      play sound "minecraft:block.note_block.pling" at volume 1 at pitch 1 to player
    if arg-1 is "give":
     if player doesn't have permission "database.give" or "database.all":
      send "&e&lDATABASE &7| &cError: You do not have the permission to execute this command!"
      play sound "minecraft:block.note_block.guitar" at volume 1 at pitch 1 to player
     if player has permission "database.give" or "database.all":
      give {database::%arg-2%} to player
      send "&e&lDATABASE &7| &aGave you the item from the Database with the id of '&e%arg-2%&a'!"
      play sound "minecraft:block.note_block.pling" at volume 1 at pitch 1 to player
    else if arg-1 is not "info" or "add" or "remove" or "give":
     send "&e&lDATABASE &7| &cError: Please use known arguments! (/database info)"
     play sound "minecraft:block.note_block.guitar" at volume 1 at pitch 1 to player
 
   if arg-2 isn't set:
    send "&e&lDATABASE &7| &cError: Please fill out every argument in the command! (/database info)"
    play sound "minecraft:block.note_block.guitar" at volume 1 at pitch 1 to player
  if arg-1 isn't set:
   send "&e&lDATABASE &7| &cError: Please fill out every argument in the command! (/database info)"
   play sound "minecraft:block.note_block.guitar" at volume 1 at pitch 1 to player