DaPigGuy / PiggyFactions

A modern open source factions plugin for PocketMine-MP
https://rtdx.aericio.net/en/latest/plugins/piggyfactions/
Apache License 2.0
52 stars 30 forks source link

Problem of claim in protected areas #105

Closed CapybaraPin closed 2 years ago

CapybaraPin commented 2 years ago

Hello, I have encountered a bug that can be quite annoying especially for protected areas like spawn.

- Problem encountered:

It is possible to claim on the areas of a spawn (or the area stops at layer 255) for example. So the player doesn't have to go to layer 256 anymore and he can claim over the spawn. This is quite annoying.

- What should happen normally:

To solve this problem, when an area is at layer 255, it should be automatically impossible to make claims on it.

- Steps to Reproduce the Issue:

Simply move to the top of the 255 layer and do /f claim

- Server info:

[Server thread/INFO]: [PiggyFactions] Showing debug info...
-- PLUGIN INFO --
NAME: PiggyFactions
VERSION: 1.2.0
VIA: BUILD #136
DATABASE: mysql
ECONOMY: DISABLED
FORMS: ENABLED
-- PMMP INFO --
NAME: PocketMine-MP
VERSION: 3.25.4
GIT COMMIT: 7306a2d939105d8d91b4180de9aec42a31d9570f
-- MC INFO --
VERSION: 1.17.40
PROTOCOL: 471
-- SYSTEM INFO --
OS TYPE: Linux, linux
OS VERSION: #1 SMP Debian 4.19.194-3 (2021-07-18)
PHP VERSION: 8.0.12
-- PLUGINS --
WorldGuard v1.1.95, PiggyFactions v1.2.0, 
Aericio commented 2 years ago

Just to confirm, you're saying to disable claiming if the user is at y=255?

CapybaraPin commented 2 years ago

That's it indeed, to avoid that it can claim over the protected areas.

Aericio commented 2 years ago

Are "protected areas" referring to WorldGuard?

CapybaraPin commented 2 years ago

Yes

CapybaraPin commented 2 years ago

@Aericio Is there a solution to the problem?

Aericio commented 2 years ago

Yes, but I don't have time right now.

Aericio commented 2 years ago

Also, couldn't you just like, make the area one level higher on WorldGuard?

DaPigGuy commented 2 years ago

You can create a faction with the safezone flag & claim over the spawn area.