create account

STEEM.CRAFT | #6 | Added new world version history menu, world size change menu option & command execution prevention by immanuel94

View this thread on: hive.blogpeakd.comecency.com
· @immanuel94 ·
$29.41
STEEM.CRAFT | #6 | Added new world version history menu, world size change menu option & command execution prevention
<div><img src="https://files.steempeak.com/file/steempeak/immanuel94/GwkumhCb-whistorythumb1.png"/>
</div> 
<blockquote>Now, players are able to load any already stored versions of their world using the world history menu. This is great to review changes or allow the player to revert some changes if necessary.</blockquote>
<hr>

Hello, Steemians and Minecraft players,

the `steemworlds.sk` addon again gets some new features I want to show off you guys today. This time, the world history view and load menu, changeable view distance through menu, malicious command execution prevention and a function for easier maintainability have been added.

### 1. Repository
https://github.com/Abwasserrohr/STEEM.CRAFT

### 2. Index
1. Repository
2. Index
3. New features and changes
3.1 Added `getSteemWorldShortName` function
3.2 Added world size change through the menu
3.3 Added world version history view and load menu
3.4 Added prevention to execute server-based commands from worlds from Steem
4. Pull requests
5. GitHub Account
6. How to contribute


### 3.1 Added `getSteemWorldShortName` function
To improve maintainability, I added the `getSteemWorldShortName` function, it actually just takes the world and converts it to the short name as a string without "steemworlds-". This is necessary for many purposes in `steemworlds.sk`, which is why I added it.

<a href="https://files.steempeak.com/file/steempeak/immanuel94/x94naazJ-g1.png"><img src="https://files.steempeak.com/file/steempeak/immanuel94/x94naazJ-g1.png"></a>

If there is any reason that changes how the short names are made, it is easier to just do it in a function here instead of everywhere. While it is a simple function, making everything as compact and easy to maintain is a big advantage later on.

Pull request: https://github.com/Abwasserrohr/STEEM.CRAFT/pull/55

### 3.2 Added world size change through the menu
Changing the world size through a menu is very important because it is just easier to access and see. Now, by either right- or left click, the player can decide to either in- or decrease the size of his world. Here is a video that shows how it works:

https://www.youtube.com/watch?v=V0vZtO27C18

To know how the player clicked, we can pass the event to our function to then check for the click type easily:

<a href="https://files.steempeak.com/file/steempeak/immanuel94/rWfYhtji-g2.png"><img src="https://files.steempeak.com/file/steempeak/immanuel94/rWfYhtji-g2.png"></a>

I just use the event to recognize the click as the click event extends all the needed methods we need to know what happens. I simply check if the click is a right-click or not and adjusting the world size depending on that. 

There are other ways this could be done, like in a separate sub-menu, where multiple sizes are available to select, but this would just increase the size of the menu and not really help the player. This is easy to understand and also fast to access, which is why I did it this way instead of an extra sub-menu.

Pull request: https://github.com/Abwasserrohr/STEEM.CRAFT/pull/56

### 3.3 Added world version history view and load menu
Having a complete history of all save states of the world is a big advantage we have on the blockchain. Since we have it, we also use it. The players now can access all of the previous versions of a world, view the exact time and date and the block number on which the world has been saved. By clicking on it, the player can load the world from that state and view it, the creator of the world could even use it to revert some changes.

Here is a little video that shows this menu:

https://www.youtube.com/watch?v=aoPit6l83Jg

I made the menu in mind for bigger worlds which have many versions, this menu can display an unlimited amount of world versions, thanks to multiple sites.

I also added caching to the world history version loading for the menu to prevent it from loading the data unnecessarily often. It only reloads the world history if the main post of the world got a new update.

The reason behind caching is that it is slow to load the world version history because depending on the account, the whole account history of the player is looped until all world history versions are found. While the process already only loads as many transactions as needed to get all of the world history versions, it is still a process that is slow and needs caching.

Pull request: https://github.com/Abwasserrohr/STEEM.CRAFT/pull/57

### 3.4 Added prevention to execute server-based commands from worlds from Steem
Since anyone can use STEEM.CRAFT, it is also possible to add command blocks and other entities, like command block minecarts to the steemworld and then save it. This allows the creator to share worlds with custom commands which also potentially contain malicious commands that can harm other players or the server.

To prevent this from happening, the commands that have been executed by command blocks or entities in steem based worlds are disabled. While it is a disadvantage to not have these command blocks, Minecraft has redstone and other useful tools to create fun worlds. Also, a white list to allow some commands to be run is possible for the future.

<a href="https://files.steempeak.com/file/steempeak/immanuel94/6yUOPJCy-g3.png"><img src="https://files.steempeak.com/file/steempeak/immanuel94/6yUOPJCy-g3.png"></a>

Using the `org.bukkit.event.server.ServerCommandEvent` event trigger, all commands in the steem worlds can easily be canceled to prevent any harmful actions against servers.

Pull request: https://github.com/Abwasserrohr/STEEM.CRAFT/pull/58

### 4. Pull requests
https://github.com/Abwasserrohr/STEEM.CRAFT/pull/55
https://github.com/Abwasserrohr/STEEM.CRAFT/pull/56
https://github.com/Abwasserrohr/STEEM.CRAFT/pull/57
https://github.com/Abwasserrohr/STEEM.CRAFT/pull/58

---

### 5. GitHub Account
https://github.com/Abwasserrohr

---

### 6. How to contribute
If you want to contribute to STEEM.CRAFT, contact me here in the comments or on Discord. Please contact me directly, I'm the sewage pipe on Discord. I look forward to meeting people who want to get in touch with Skript and Minecraft.
Of course, you can also start forking STEEM.CRAFT, creating pull requests and improve it without contacting me.

Discord: https://discord.gg/FRuK5BC

---

Thank you for reading my contribution post. 

With the new version history menu, players can now view and revert to older versions of the world, which uses the advantages we have on Steem without adding an extra layer of storage for the servers itself.

Decentralized worlds can be shared without any real limitation, which allows anyone to mess with anything that is possible in Minecraft. Yes, that is awesome but the server operator has to be protected against malicious commands that could harm the server, which is a very important step forward to make `steemworlds.sk` usable. Without these small protections, abusers could kill the reputation of it very fast.

Changing the size of the world is necessary to create bigger structures. Using a menu for it instead of commands increases the usability for users, which is why I added it. If everything is easily accessible through it, players need no specialized help menu, as all the options are viewable right away in the menu.

If you have new ideas, feedback or bugs you have found, tell me here in the comments, I really appreciate it. :)

Have a great week,

@immanuel94


<sub>STEEM.CRAFT IS NOT A OFFICIAL MINECRAFT PRODUCT. 
NOT APPROVED BY OR ASSOCIATED WITH MOJANG.</sub>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 277 others
properties (23)
authorimmanuel94
permlinksteem-craft-or-6-or-added-new-world-version-history-menu-world-size-change-menu-option-and-command-execution-prevention
categoryutopian-io
json_metadata{"app":"steempeak/1.13.6","format":"markdown","tags":["utopian-io","development","minecraft","skript","palnet"],"users":["immanuel94"],"links":["https://github.com/Abwasserrohr/STEEM.CRAFT","https://files.steempeak.com/file/steempeak/immanuel94/x94naazJ-g1.png","https://github.com/Abwasserrohr/STEEM.CRAFT/pull/55","https://files.steempeak.com/file/steempeak/immanuel94/rWfYhtji-g2.png","https://github.com/Abwasserrohr/STEEM.CRAFT/pull/56","https://github.com/Abwasserrohr/STEEM.CRAFT/pull/57","https://files.steempeak.com/file/steempeak/immanuel94/6yUOPJCy-g3.png","https://github.com/Abwasserrohr/STEEM.CRAFT/pull/58","https://github.com/Abwasserrohr/STEEM.CRAFT/pull/55","https://github.com/Abwasserrohr/STEEM.CRAFT/pull/56"],"image":["https://files.steempeak.com/file/steempeak/immanuel94/GwkumhCb-whistorythumb1.png","https://files.steempeak.com/file/steempeak/immanuel94/x94naazJ-g1.png","https://files.steempeak.com/file/steempeak/immanuel94/rWfYhtji-g2.png","https://files.steempeak.com/file/steempeak/immanuel94/6yUOPJCy-g3.png"]}
created2019-07-10 12:42:06
last_update2019-07-10 12:42:06
depth0
children9
last_payout2019-07-17 12:42:06
cashout_time1969-12-31 23:59:59
total_payout_value22.104 HBD
curator_payout_value7.306 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length7,555
author_reputation212,637,383,853,137
root_title"STEEM.CRAFT | #6 | Added new world version history menu, world size change menu option & command execution prevention"
beneficiaries
0.
accountutopian.pay
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id88,112,916
net_rshares82,838,556,266,058
author_curate_reward""
vote details (341)
@emrebeyler ·
$6.61
Great contribution as usual. These're good updates, indeed.  Kind of getting used to understand the "Skript" better because of you. :)


***

Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/3/1-2-2-2-2-1-1-).

---- 
Need help? Chat with us on [Discord](https://discord.gg/uTyJkNm).

[[utopian-moderator]](https://join.utopian.io/)
👍  , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authoremrebeyler
permlinkpug5uu
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/1-2-2-2-2-1-1-","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2019-07-10 22:16:06
last_update2019-07-10 22:16:06
depth1
children2
last_payout2019-07-17 22:16:06
cashout_time1969-12-31 23:59:59
total_payout_value5.072 HBD
curator_payout_value1.535 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length590
author_reputation448,535,049,068,622
root_title"STEEM.CRAFT | #6 | Added new world version history menu, world size change menu option & command execution prevention"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id88,130,774
net_rshares18,494,331,535,313
author_curate_reward""
vote details (25)
@immanuel94 ·
Thank you for reviewing my contribution post. =)
properties (22)
authorimmanuel94
permlinkpug6el
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2019-07-10 22:27:57
last_update2019-07-10 22:27:57
depth2
children0
last_payout2019-07-17 22:27:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length48
author_reputation212,637,383,853,137
root_title"STEEM.CRAFT | #6 | Added new world version history menu, world size change menu option & command execution prevention"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id88,131,063
net_rshares0
@utopian-io ·
Thank you for your review, @emrebeyler! Keep up the good work!
properties (22)
authorutopian-io
permlinkre-pug5uu-20190713t101131z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-07-13 10:11:33
last_update2019-07-13 10:11:33
depth2
children0
last_payout2019-07-20 10:11:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length62
author_reputation152,955,367,999,756
root_title"STEEM.CRAFT | #6 | Added new world version history menu, world size change menu option & command execution prevention"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id88,238,895
net_rshares0
@flyerchen ·
$0.15
Das sind echt mal coole Funktionen. So kann man leichter Backups laden und die einzelnen Bereiche in ihrer Größe passgenau angpassen.
👍  , , , , , , , , , , ,
properties (23)
authorflyerchen
permlinkre-immanuel94-b3d04ea6-e1b7-4c63-a99c-6b8198112bfe
categoryutopian-io
json_metadata{"tags":["steemcraft","skyroad","palnet"],"app":"STEEM.SK/0.1","format":"markdown"}
created2019-07-10 17:18:06
last_update2019-07-10 17:18:06
depth1
children0
last_payout2019-07-17 17:18:06
cashout_time1969-12-31 23:59:59
total_payout_value0.092 HBD
curator_payout_value0.060 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length133
author_reputation5,540,128,662,943
root_title"STEEM.CRAFT | #6 | Added new world version history menu, world size change menu option & command execution prevention"
beneficiaries
0.
accountskyroad
weight5,000
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id88,122,567
net_rshares676,958,159,511
author_curate_reward""
vote details (12)
@iski007 ·
$0.07
text das sieht ganz schön nützlich aus aber auch kompliziert
👍  , , , , , , , , , , , ,
properties (23)
authoriski007
permlinkre-immanuel94-18b4557f-16e9-4fb2-a28b-071efae1695b
categoryutopian-io
json_metadata{"tags":["steemcraft","skyroad","palnet"],"app":"STEEM.SK/0.1","format":"markdown"}
created2019-07-10 21:27:09
last_update2019-07-10 21:27:09
depth1
children0
last_payout2019-07-17 21:27:09
cashout_time1969-12-31 23:59:59
total_payout_value0.041 HBD
curator_payout_value0.026 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length60
author_reputation4,760,264,858
root_title"STEEM.CRAFT | #6 | Added new world version history menu, world size change menu option & command execution prevention"
beneficiaries
0.
accountskyroad
weight5,000
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id88,129,534
net_rshares304,656,951,343
author_curate_reward""
vote details (13)
@jongartv ·
$0.10
properties (23)
authorjongartv
permlinkre-immanuel94-90eaa16b-ecdd-4356-a16f-e92b3c247edc
categoryutopian-io
json_metadata{"tags":["steemcraft","skyroad","palnet"],"app":"STEEM.CRAFT/0.1","format":"markdown"}
created2019-07-12 10:22:15
last_update2019-07-12 10:22:15
depth1
children0
last_payout2019-07-19 10:22:15
cashout_time1969-12-31 23:59:59
total_payout_value0.058 HBD
curator_payout_value0.037 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length30
author_reputation4,965,680,100,622
root_title"STEEM.CRAFT | #6 | Added new world version history menu, world size change menu option & command execution prevention"
beneficiaries
0.
accountskyroad
weight5,000
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id88,195,561
net_rshares441,321,691,697
author_curate_reward""
vote details (14)
@solerohot2018 ·
$0.10
properties (23)
authorsolerohot2018
permlinkre-immanuel94-1ef002bf-87dc-433b-9fe5-65bfb1d631f4
categoryutopian-io
json_metadata{"tags":["steemcraft","skyroad","palnet"],"app":"STEEM.SK/0.1","format":"markdown"}
created2019-07-10 17:18:51
last_update2019-07-10 17:18:51
depth1
children0
last_payout2019-07-17 17:18:51
cashout_time1969-12-31 23:59:59
total_payout_value0.060 HBD
curator_payout_value0.039 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length16
author_reputation492,192,235,857
root_title"STEEM.CRAFT | #6 | Added new world version history menu, world size change menu option & command execution prevention"
beneficiaries
0.
accountskyroad
weight5,000
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id88,122,595
net_rshares439,589,744,602
author_curate_reward""
vote details (13)
@steem-ua ·
#### Hi @immanuel94!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your **UA** account score is currently 3.394 which ranks you at **#7224** across all Steem accounts.
Your rank has dropped 81 places in the last three days (old rank 7143).

In our last Algorithmic Curation Round, consisting of 193 contributions, your post is ranked at **#159**.
##### Evaluation of your UA score:

* You're on the right track, try to gather more followers.
* The readers appreciate your great work!
* Try to work on user engagement: the more people that interact with you via the comments, the higher your UA score!


**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
properties (22)
authorsteem-ua
permlinkre-steem-craft-or-6-or-added-new-world-version-history-menu-world-size-change-menu-option-and-command-execution-prevention-20190710t211537z
categoryutopian-io
json_metadata"{"app": "beem/0.20.19"}"
created2019-07-10 21:15:39
last_update2019-07-10 21:15:39
depth1
children0
last_payout2019-07-17 21:15:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length741
author_reputation23,214,230,978,060
root_title"STEEM.CRAFT | #6 | Added new world version history menu, world size change menu option & command execution prevention"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id88,129,237
net_rshares0
@utopian-io ·
Hey, @immanuel94!

**Thanks for contributing on Utopian**.
We’re already looking forward to your next contribution!

**Get higher incentives and support Utopian.io!**
 Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via [SteemPlus](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)).

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
properties (22)
authorutopian-io
permlinkre-steem-craft-or-6-or-added-new-world-version-history-menu-world-size-change-menu-option-and-command-execution-prevention-20190711t055646z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-07-11 05:56:48
last_update2019-07-11 05:56:48
depth1
children0
last_payout2019-07-18 05:56:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length592
author_reputation152,955,367,999,756
root_title"STEEM.CRAFT | #6 | Added new world version history menu, world size change menu option & command execution prevention"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id88,143,723
net_rshares0