Code (YAML):
#
# how to make requests:
# here's a template: %address%:%port%/?pass=seeBelow?redemption=nameOfRedemption?target=usernameOfTargetedPlayer?sender=senderOfChatCommand
#
# variables for requests:
# [REQUIRED] pass: the pass (see below)
# [REQUIRED] redemption: which redemption you want to trigger
# [REQUIRED] target: the targeted player's in-game username
# [REQUIRED] sender: the person who initiated the redemption (i.e. twitch username or similar)
# [OPTIONAL] nickname: in case you want to use the nickname variable in messages and titles
#
# please replace this with something new.
# just generate a uuid online or something.
# you can generate one here: https://www.uuidgenerator.net/
pass
: replaceThis
# enable this if you want a separate pass for every player on the server.
# if this is enabled, the pass above does not matter and is completely irrelevant.
# default is false
per-player-pass
: false
# this is the port that the plugin will be using to recieve API requests.
#
# if you are on a server host, there would usually be an "additional ports" option somewhere on the control panel, most likely under the advanced tab.
# just go to that tab and click add port. then copy that port and put it here. you will be using this port to make requests. (i.e. yourserver.com:8080/?pass=whatever etc.)
port
: 8080
# keep this as false unless you know what you're doing or you've been asked to turn it on. it just outputs a lot more info to the console.
debug
: false
# the messages that will be returned
responses:
missing-arguments
: 'Error
: Missing arguments.'
invalid-arguments
: 'Error
: Invalid arguments.'
invalid-pass
: 'Error
: Invalid pass.'
no-such-redemption
: 'That is not a redemption.'
target-offline
: 'Target is offline.'
redemption-on-cooldown
: 'This redemption is still on a cooldown.
(
%s)'
redemptions-disabled-globally
: 'Redemptions are currently disabled globally.'
redemptions-disabled-for-player
: 'Redemptions are currently disabled for this player.'
# -------------------------------------
#
# OPTIONS
#
# -------------------------------------
options
:
# whether or not ChatRedemptions should remember whether or not it was enabled/disabled on every startup or reload
# default is true
keep-enabled-on-restart
: true
# if above is enabled, should it be enabled by default?
# default is false
enabled-on-startup
: false
# have some extra fun. disable cooldowns.
# default is false.
disable-cooldowns
: false
# whether redemption cooldowns should be per-player instead of global.
# default is true
per-player-cooldown
: true
# -------------------------------------
#
# REDEMPTIONS
#
# -------------------------------------
#
# here is an example for reference:
# 1creeper: <-- (the name of the redemption, this is not necessarily shown to the public)
# cooldown: 60 <-- (this is in seconds)
# message: 'You successfully spawned 1 creeper on your streamer.' <-- (what the API sends back)
# execute: <-- (what should be executed when this is redeemed)
# - [mob, creeper, 1, everyone] <-- (this will spawn 1 creeper on all online players)
# - [actionbar, "You were given 1 creeper by %sender%.", player] <-- (this will give an actionbar title to the target. "%sender%" will be replaced as defined below)
# (see below for more)
#
# variables (surround with %%):
# player: the targeted player, defined by the API request.
# sender: the server of the chat command, defined by the api response
# nickname: the nickname of the target (if defined by the API request; otherwise player)
#
#
#
# types of things you can execute
#
# spawn:
# this spawns a specific amount of a type of mob on top of (inside) the targeted player or everyone
# format: [spawn, <type of entity>, <amount>, <player or everyone>]
#
# item:
# gives or takes items from the targeted player or everyone
# format for give: [item, give, <item type>, <amount>, <player or everyone>] or [item, give, <saved item name>, <player or everyone>]
# format for take: [item, take, <item type>, <amount or all>, <player or everyone>];
#
# sound:
# plays a sound for targeted player or everyone (see list of sounds here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html)
# format: [sound, <sound>, <player or everyone>]
#
# clear:
# clears the the entire inventory or parts of the inventory of the targeted player or everyone
# format: [clear, <inventory, hotbar or hand>, <player or everyone>]
# OPTIONAL: if you want to replace all cleared items with a saved item, add the name of the saved item as an extra argument at the end. (i.e. [clear, player, hand, grass])
#
# title:
# sends a title to the targeted player or everyone (use § for color codes)
# format: [<title/subtitle/actionbar>, <text in quotes>, <player or everyone>]
#
# message:
# sends a chat message to the targeted player or everyone (use § for color codes)
# format: [message, <text in quotes>, <player or everyone>]
#
# damage:
# causes a set amount of damage to the targeted palyer or everyone
# format: [damage, <amount or kill>, <player or everyone>]
#
# stat:
# sets a statistic for a player or everyone
# format: [stat, <health or hunger>, <amount>, <player or everyone>]
#
# command:
# literally just sends the specified command from the console
# format: [command, <command (in quotes)>]
#
redemptions:
1creeper:
message
: 'Spawned 1 creeper on
%player%.'
cooldown
: 600
execute
:
-
[actionbar,
"You were generously gifted 1 creeper by §c%sender%§f.", player
]
-
[message,
"§c%player%§f was generously gifted 1 creeper by §c%sender%§f.", everyone
]
-
[spawn, creeper, 1, player
]
5creeper:
message
: 'Spawned 5 creepers on
%player%.'
cooldown
: 1200
execute
:
-
[actionbar,
"You were generously gifted 5 creepers by §c%sender%§f.", player
]
-
[message,
"§c%player%§f was generously gifted 5 creepers by §c%sender%§f.", everyone
]
-
[spawn, creeper, 5, player
]
1zombie:
message
: 'Spawned 1 zombie on
%player%.'
cooldown
: 300
execute
:
-
[actionbar,
"You were generously gifted 1 zombie by §c%sender%§f.", player
]
-
[message,
"§c%player%§f was generously gifted 1 zombie by §c%sender%§f.", everyone
]
-
[spawn, zombie, 1, player
]
5zombie:
message
: 'Spawned 5 zombies on
%player%.'
cooldown
: 1200
execute
:
-
[actionbar,
"You were generously gifted 5 zombies by §c%sender%§f.", player
]
-
[message,
"§c%player%§f was generously gifted 5 zombies by §c%sender%§f.", everyone
]
-
[spawn, zombie, 5, player
]
5skeleton:
message
: 'Spawned 5 skeletons on
%player%.'
cooldown
: 1200
execute
:
-
[actionbar,
"You were generously gifted 5 skeletons by §c%sender%§f.", player
]
-
[message,
"§c%player%§f was generously gifted 5 skeletons by §c%sender%§f.", everyone
]
-
[spawn, skeleton, 5, player
]
5cavespider:
message
: 'Spawned 5 cave spiders on
%player%.'
cooldown
: 1200
execute
:
-
[actionbar,
"You were generously gifted 5 cave spiders by §c%sender%§f.", player
]
-
[message,
"§c%player%§f was generously gifted 5 cave spiders by §c%sender%§f.", everyone
]
-
[spawn, cave_spider, 5, player
]
1irongolem:
message
: 'Spawned 1 iron golem on
%player%.'
cooldown
: 180
execute
:
-
[actionbar,
"You were generously gifted 1 iron golem by §c%sender%§f.", player
]
-
[message,
"§c%player%§f was generously gifted 1 iron golem by §c%sender%§f.", everyone
]
-
[spawn, iron_golem, 1, player
]
1hp:
message
: 'Set the health of
%player% to 1 hp.'
cooldown
: 300
execute
:
-
[actionbar, 'You were put to 1 hp by §c
%sender%§7.', player]
-
[message,
"§c%player%§f was put to 1 hp by §c%sender%§f.", everyone
]
-
[stat, health, 1, player
]
1food:
message
: 'Set the hunger of
%player% to 1 hunger.'
cooldown
: 300
execute
:
-
[actionbar, 'You were put to 1 hunger by §c
%sender%§7.', player]
-
[message,
"§c%player%§f was put to 1 hunger by §c%sender%§f.", everyone
]
-
[stat, hunger, 1, player
]
heal:
message
: 'Healed
%player%.'
cooldown
: 300
execute
:
-
[actionbar, 'You healed by §c
%sender%§7.', player]
-
[message,
"§c%player%§f was healed by §c%sender%§f.", everyone
]
-
[stat, health, 20, player
]
feed:
message
: 'Fed
%player%.'
cooldown
: 300
execute
:
-
[actionbar, 'You were fed by §c
%sender%§7.', player]
-
[message,
"§c%player%§f was fed by §c%sender%§f.", everyone
]
-
[stat, hunger, 20, player
]
permhunger:
message
: 'Gave
%player% permanent hunger effect.'
cooldown
: 1200
execute
:
-
[actionbar, 'You were given permanent hunger by §c
%sender%§7.', player]
-
[message,
"§c%player%§f was given permanent hunger by §c%sender%§f.", everyone
]
-
[command,
"effect give %player% hunger 10000 0 true"
]
permpoison:
message
: 'Gave
%player% permanent poison effect.'
cooldown
: 1200
execute
:
-
[actionbar, 'You were given permanent poison by §c
%sender%§7.', player]
-
[message,
"§c%player%§f was given permanent poison by §c%sender%§f.", everyone
]
-
[command,
"effect give %player% poison 10000 0 true"
]
scare:
message
: 'Scared
%player% by doing 1 hp.'
cooldown
: 60
execute
:
-
[actionbar, 'You were dealt 1 damage by §c
%sender%§7.', player]
-
[message,
"§c%player%§f was hit for 1 hp by §c%sender%§f.", everyone
]
-
[damage, 1, player
]
clearhand:
message
: 'Cleared the hand of
%player%.'
cooldown
: 300
execute
:
-
[actionbar, 'Your hand was taken by §c
%sender%§7.', player]
-
[message,
"§c%player%§f got their hand cleared by §c%sender%§f.", everyone
]
-
[clear, hand, player
]
clearhotbar:
message
: 'Cleared the hotbar of
%player%.'
cooldown
: 1800
execute
:
-
[actionbar, 'Your hotbar was taken by §c
%sender%§7.', player]
-
[message,
"§c%player%§f got their hotbar cleared by §c%sender%§f.", everyone
]
-
[clear, hotbar, player
]
clearinventory:
message
: 'Cleared the inventory of
%player%.'
cooldown
: 3600
execute
:
-
[actionbar, 'Your inventory was taken by §c
%sender%§7.', player]
-
[message,
"§c%player%§f got their inventory cleared by §c%sender%§f.", everyone
]
-
[clear, inventory, player
]
give2diamonds:
message
: 'Gave 2 diamonds to
%player%.'
cooldown
: 300
execute
:
-
[actionbar, 'You were gifted 2 diamonds by §c
%sender%§7.', player]
-
[message,
"§c%player%§f was given 2 diamonds by §c%sender%§f.", everyone
]
-
[item, give, diamond, 2, player
]
takediamonds:
message
: 'Took
all diamonds from
%player%.'
cooldown
: 1200
execute
:
-
[actionbar, 'Your diamonds were taken by §c
%sender%§7.', player]
-
[message,
"§c%player%§f got their diamonds taken by §c%sender%§f.", everyone
]
-
[item, take, diamond,
all, player
]
kill:
message
: 'Killed
%player%.'
cooldown
: 3600
execute
:
-
[actionbar, 'You were killed by §c
%sender%§7.', player]
-
[message,
"§c%player%§f was killed by §c%sender%§f.", everyone
]
-
[damage, kill, player
]
creepersound:
message
: 'Played a creeper sound at
%player%.'
cooldown
: 60
execute
:
-
[actionbar, 'A creeper sound was played by §c
%sender%§7.', player]
-
[message,
"§c%player%§f heard a creeper because of §c%sender%§f.", everyone
]
-
[sound, ENTITY_CREEPER_PRIMED, player
]
totemhand:
message
: 'Set hand of
%player% to totem of undying.'
cooldown
: 3600
execute
:
-
[actionbar, 'Your hand was set to totem of undying by §c
%sender%§7.', player]
-
[message,
"§fHand of §c%player%§f was set to totem of undying by §c%sender%§f.", everyone
]
-
[clear, hand, player, totem_of_undying
]
# -------------------------------------
#
# SAVED ITEMS
#
# -------------------------------------
#
# this entire section is OPTIONAL.
#
# this section may also seem advanced to inexperienced users.
# do not touch this if you are inexperienced.
#
# these should just be a raw ItemStack
saved-items:
totem_of_undying:
==
: org.bukkit.inventory.ItemStack
v
: 2730
type
: TOTEM_OF_UNDYING
amount
: 1