stargate-rewritten / Stargate-Bukkit

The original, and still the best, survival-friendly portal plugin.
https://sgrewritten.org/paper
GNU Lesser General Public License v3.0
29 stars 14 forks source link

API: Interact With `.gate` files. #154

Open Pheotis opened 2 years ago

Pheotis commented 2 years ago

Ability to get, add, alter, etc gate designs.

Might be worth delaying until 1.0.2.0 and lumping the features required for this in with the gate format rework / gatepack implementation.

Thorinwasher commented 2 years ago

I have some questions regarding this

EpicKnarvik97 commented 2 years ago

Getting gates can be for the purpose of checking if a given design exists. It can also be used for some kind of visualizer which displays gate designs in the chat.

If we delete a gate format using the API, we should require that no portals are using the gate format, and throw an error, or something, if it's in use. Altering the open and closed materials shouldn't be as much of a problem, but altering the frame shouldn't be allowed if the gate format is in use and gate verification is enabled.

Being able to add gate formats through the API makes it possible to simply build a Stargate, and make it into a .gate file through commands. I'm pretty sure I saw some code in the legacy SG-Command which did exactly this.

Thorinwasher commented 6 months ago

What has been implemented so far: