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

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.

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.

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:

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

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:

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.

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

STEEM.CRAFT IS NOT A OFFICIAL MINECRAFT PRODUCT.
NOT APPROVED BY OR ASSOCIATED WITH MOJANG.

H2
H3
H4
3 columns
2 columns
1 column
9 Comments
Ecency