Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add steemworlds addon #2

Merged
merged 5 commits into from May 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
@@ -1,5 +1,5 @@
# STEEM.SK
STEEM.SK is a script for Bukkit/Spigot, which allows players to interact with the STEEM Blockchain within Minecraft.
# STEEM.CRAFT
STEEM.CRAFT is a script for Bukkit/Spigot, which allows players to interact with the STEEM Blockchain within Minecraft.
Server owners can create custom transactions with the Steem Blockchain and get data from Steem Nodes.

### Core dependencies
Expand Down
21 changes: 13 additions & 8 deletions STEEM.CRAFT/addons/steemconnect.sk
@@ -1,6 +1,6 @@
#
# ==============
# steemconnect.sk
# steemconnect.sk v0.0.1
# ==============
# steemconnect.sk is part of the STEEM.CRAFT addons.
# ==============
Expand Down Expand Up @@ -37,18 +37,23 @@ command /steemconnect [<text>]:
message "%getChatPrefix()% Usage: /steemconnect <steem account>"
stop

#
# > Some players might not use only lowercase letters. Convert the
# > text to lower case only to prevent such mistakes.
set {_steemaccount} to arg-1.toLowerCase()

#
# > If the account name doesn't exist, tell the player
# > about this and add a usage for support.
else if getAccount(arg-1) is not set:
message "%getChatPrefix()% Steem account %arg-1% not found."
if getAccount({_steemaccount}) is not set:
message "%getChatPrefix()% Steem account %{_steemaccount}% not found."
message "%getChatPrefix()% Usage: /steemconnect <steem account>"
stop

#
# > If the account doesn't have the uuid saved in the profile, send a link
# > which sets the player's uuid to the profile of the steem account.
if validateSyncedSteemAccountUUID(player,arg-1) is false:
if validateSyncedSteemAccountUUID(player,{_steemaccount}) is false:

#
# > Create a new ComponentBuilder to make clickable and hoverable text.
Expand All @@ -67,13 +72,13 @@ command /steemconnect [<text>]:
#
# > The function currently doesn't work correctly, use backup command above.
# > player.sendMessage({_builder}.create())
message "%getChatPrefix()% Once you're done: /steemconnect %arg-1%"
message "%getChatPrefix()% Once you're done: /steemconnect %{_steemaccount}%"
stop

#
# > If the account doesn't have the server account authorized, send a link
# > which authorizes the server account.
if validateSyncedSteemAccountAuths(player,arg-1) is false:
if validateSyncedSteemAccountAuths(player,{_steemaccount}) is false:

#
# > Create a new ComponentBuilder to make clickable and hoverable text.
Expand All @@ -91,10 +96,10 @@ command /steemconnect [<text>]:
#
# > The function currently doesn't work correctly, use backup command above.
# > player.sendMessage({_builder}.create())
message "%getChatPrefix()% Once you're done: /steemconnect %arg-1%"
message "%getChatPrefix()% Once you're done: /steemconnect %{_steemaccount}%"
stop

#
# > If the event has not been stopped yet, the account is synced.
setSyncedAccount(player,arg-1)
setSyncedAccount(player,{_steemaccount})
message "%getChatPrefix()% Your account has been successfully connected."