Towny icon indicating copy to clipboard operation
Towny copied to clipboard

Suggestion: Towny protection for portals

Open OskyEdz opened this issue 4 years ago • 22 comments

Please explain your feature request to the best of your abilities: I would like to have the option to disallow outsiders/allyas/residents the use of portals in the town/plot.

With a smal portal I could have a door yes, but if I build a very large portal that I want to show the world (on both sides, in both worlds). This could possible have reasons to disallow outsiders access to the town. For example is the town is closed, public mode disable, and outsides go into my town via nether.

OskyEdz avatar Mar 15 '20 02:03 OskyEdz

Nice catch! I'll try to get this done soon.

ghost avatar Mar 15 '20 02:03 ghost

Might be hard to determine if the target portal is in a plot or not, it isn't provided in the event right?

KarlOfDuty avatar Mar 15 '20 11:03 KarlOfDuty

This is a good idea although it will likely be a bit tricky to tie it to an existing function like breaking/build/switch/item_use. Linking it to public status is an idea but I don't know if that's ideal as it is not something which can be set per-plot.

LlmDl avatar Mar 15 '20 12:03 LlmDl

Let's try to get it tied with public status for any portal in the whole town. That should cover most uses, as you would want to disallow people to backdoor your private town.

And maybe look if it possible to do it per plot later.

OskyEdz avatar Mar 15 '20 14:03 OskyEdz

IMO it should be item_use as it already has all other types of teleporting in it.

KarlOfDuty avatar Mar 15 '20 15:03 KarlOfDuty

Item_use might make the most sense, you'd need item_use to light the portal, but that would still require the plot-owner to allow all kinds of item_use just to let someone use a portal (ie, bonemeal-ing grass, dyeing signs/wools,) which is why I said it doesn't really work ideally.

LlmDl avatar Mar 15 '20 15:03 LlmDl

I coded for item use, mainly bc item switch covered too many things that are normally used

ghost avatar Mar 15 '20 15:03 ghost

As it can be limited to a single plot I think it's better than the alternatives.

KarlOfDuty avatar Mar 15 '20 15:03 KarlOfDuty

Also if we think about plots, the town should not have that many portals as they will be connected to each other. It would be sufficient with the mayor controlling use of all portals.

OskyEdz avatar Mar 15 '20 15:03 OskyEdz

Now another question should the paired nether portal be protected as well? As in no one can use it from the other side.

ghost avatar Mar 15 '20 15:03 ghost

Now another question should the paired nether portal be protected as well? As in no one can use it from the other side.

If it is possible Yes! I was thinking along the lines that the town would need a nether outpost.

OskyEdz avatar Mar 15 '20 15:03 OskyEdz

The other side would require a Town (likely an outpost) to be there to protect it.

LlmDl avatar Mar 15 '20 15:03 LlmDl

@LlmDl Yeah but should we prevent entering it?

ghost avatar Mar 15 '20 15:03 ghost

If it's not claimed (wilderness) it should be fair game as anyone could destroy it.

LlmDl avatar Mar 15 '20 15:03 LlmDl

As mayor you would have to know that this will block outsiders from using portals FROM the the town. And with that logic also make a outpost in the nether.

OskyEdz avatar Mar 15 '20 15:03 OskyEdz

I'm looking for something like "Toggle public portals"

OskyEdz avatar Mar 15 '20 15:03 OskyEdz

I think it should be blocked from the other side as well, we don't allow claiming in the nether so this would just make players get stuck in other towns.

KarlOfDuty avatar Mar 15 '20 15:03 KarlOfDuty

We're going to discuss it internally and see what fits the best and get something done for it after 0.96.0.0 is out and we begin doing suggestions again.

This is a good point Karl has just made, although it is probably not very usual to deny claiming in the nether. It should be an optional thing.

LlmDl avatar Mar 15 '20 15:03 LlmDl

The same would happen if the town just decided not to claim the other end though.

KarlOfDuty avatar Mar 15 '20 15:03 KarlOfDuty

Imo the best thing would be to check both the source plot and the destination.

KarlOfDuty avatar Mar 15 '20 15:03 KarlOfDuty

Imo the best thing would be to check both the source plot and the destination.

Yeah that’s what I’m thinking.

ghost avatar Mar 15 '20 15:03 ghost

oh for a simpler time when portals were a fixed size and a double door was all you needed.

LlmDl avatar Mar 15 '20 15:03 LlmDl