Code Monkey home page Code Monkey logo

areas's Introduction

Areas mod for Minetest

Dependencies

Minetest 5.0.0+ is recommended, but 0.4.16+ should work as well. Minetest 5.0.0+

Optional support for following mods:

Configuration

Open the tab Settings -> All Settings -> Mods -> areas to get a list of all possible settings.

For server owners: Check settingtypes.txt and modify your minetest.conf according to the wanted setting changes.

Tutorial

  1. Specify the corner positions of the area you would like to protect. Use one of the following commands:
  • /area_pos set and punch the two corner nodes to set them.
  • /area_pos set1/set2 and punch only the first or second corner node to set them one at a time.
  • /area_pos1/2 to set one of the positions to your current position.
  • /area_pos1/2 X Y Z to set one of the positions to the specified coordinates.
  1. Protect the selected area by running one of the following commands:
  • /set_owner <OwnerName> <AreaName> -- If you have the areas privilege.
  • /protect <AreaName> -- If you have the areas privilege or the server administrator has enabled area self-protection.

The area name is used only for informational purposes and has no functional importance.

For example: /set_owner SomePlayer Mese city

  1. You now own an area. You may now add sub-owners to it if you want to (see command /add_owner). Before using the /add_owner command you have to select the corners of the sub-area as you did in step 1.

If your markers are still around your original area and you want to grant access to your entire area you will not have to re-set them. Use /select_area to place the markers at the corners of an existing area if you've reset your markers and want to grant access to a full area.

The /add_owner command expects three arguments:

  1. The ID number of the parent area (the area that you want to add a sub-area to).
  2. The name of the player that will own the sub-area.
  3. The name of the sub-area. (can contain spaces)

For example: /add_owner 123 BobTheBuilder Diamond lighthouse

Commands

  • /protect <AreaName> -- Protects an area for yourself. (if self-protection is enabled)

  • /set_owner <OwnerName> <AreaName> -- Protects an area for a specified player. (requires the areas privilege)

  • /add_owner <ParentID> <OwnerName> <ChildName> -- Grants another player control over part (or all) of an area.

  • /rename_area <ID> <NewName> -- Renames an existing area.

  • /list_areas -- Lists all of the areas that you own, or all areas if you have the areas privilege.

  • /find_areas <Regex> -- Finds areas using a Lua regular expresion. For example, to find castles:

    /find_areas [Cc]astle
    
  • /remove_area <ID> -- Removes an area that you own. Any sub-areas of that area are made sub-areas of the removed area's parent, if it exists. If the removed area has no parent its sub-areas will have no parent.

  • /recursive_remove_areas <ID> -- Removes an area and all sub-areas of it.

  • /change_owner <ID> <NewOwner> -- Change the owner of an area.

  • /area_info -- Returns information about area configuration and usage.

  • /select_area <ID> -- Sets the area positions to those of an existing area.

  • /area_pos {set,set1,set2,get} -- Sets the area positions by punching nodes or shows the current area positions.

  • /area_pos1 [X,Y,Z|X Y Z] -- Sets area position one to your position or the one supplied.

  • /area_pos2 [X,Y,Z|X Y Z] -- Sets area position two to your position or the one supplied.

  • /areas_cleanup -- Removes all ownerless areas. Useful for cleaning after user deletion, for example using /remove_player.

  • /area_open <ID> -- Toggle open/closed the specified area for everyone.

  • /area_faction_open <ID> <faction> -- Toggle open/closed the specified area for members of the faction. Factions are created and managed by playerfactions mod.

License

Copyright (C) 2013-2017 ShadowNinja

Copyright (C) 2015-2020 various contributors

Licensed under the GNU LGPL version 2.1 or later. See LICENSE.txt and http://www.gnu.org/licenses/lgpl-2.1.txt

areas's People

Contributors

a-tour-ist avatar alek13 avatar antumdeluge avatar buckaroobanzay avatar ciarang avatar elementw avatar emojigit avatar est31 avatar fluxionary avatar kalio-42 avatar louisroyer avatar luk3yx avatar niklp09 avatar paly2 avatar panquesito7 avatar red-001 avatar shadowninja avatar smalljoker avatar sofar avatar taikedz avatar vanessae avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

areas's Issues

Crash when trying to set remote positions

Bluelobster server crashed when CWz tried to do an extremely large protection (the whole sky above y=200 I think). Maybe that wasn't a good idea, but here are the errors generated in debug.txt:

11:48:51: ERROR[main]: ERROR: An unhandled exception occurred: createSector(): pos. over limit
11:48:51: ERROR[main]: stack traceback:
11:48:51: ERROR[main]:  [C]: in function 'add_entity'
11:48:51: ERROR[main]:  ...inetest/bin/../games/bluelobster_game/mods/areas/pos.lua:209: in function 'markPos2'
11:48:51: ERROR[main]:  ...inetest/bin/../games/bluelobster_game/mods/areas/pos.lua:139: in function 'setPos2'
11:48:51: ERROR[main]:  ...inetest/bin/../games/bluelobster_game/mods/areas/pos.lua:81: in function 'func'
11:48:51: ERROR[main]:  ...chaoswormz/minetest/bin/../builtin/game/chatcommands.lua:40: in function <...chaoswormz/minetest/bin/../builtin/game/chatcommands.lua:29>
11:48:51: ERROR[main]:  /home/chaoswormz/minetest/bin/../builtin/game/register.lua:341: in function </home/chaoswormz/minetest/bin/../builtin/game/register.lua:329>

I haven't looked at the lines referenced yet, but maybe you could point me in the right direction for why it crashed?
Thanks,
deezl

Players executing `/list_areas` without the `areas` priv cause minetest-5.7.0 and multicraft-2.0.0 to lock up hard.

Server: EdenLost, running multicraft-2.0.0 will lock up hard (with 100% CPU usage for the server thread) if a regular player (ex: "1hit") issues /list_areas. The same command does not lockup when a full admin ("sysadmin") runs it (a huge list of areas is returned though, for every player).

1hit@EdgyNet:~$ sqlite3 -column ./worlds/world/auth.sqlite \
  "select a.name, up.privilege from auth a, user_privileges up \
    where (a.id = up.id) and (a.name in ('1hit', 'sysadmin')) and (up.privilege like '%area%');"
1hit      area_high_limit 
1hit      area_protect    
1hit      areas_high_limit
1hit      areas_protect   
sysadmin  areas           
sysadmin  areas_high_limit
sysadmin  pvp_areas_admin 

I granted areas priv to 1hit and retried /list_areas as 1hit, and the server no longer locked up.

I don't know why 1hit has seemingly duplicate privs of area_high_limit, area_protect vs areas_high_limit. I'll audit privs offline soon. Maybe the priv name changed, or maybe I screwed something up earlier. Players other than 1hit can lock up the server by issuing /list_areas and they only have the areas_protect priv and none of the others.

So it seems that anyone lacking areas, who issues /list_areas on multitest-2.0.0 with the latest version of this areas mod can lock up the server. I do not think that this is the same as issue #51.

Per user max areas

Feature for some users to be allowed to exceed areas.self_protection_max_areas

Add area groups

Add assigning areas to groups to enable easier faster and easier group projects setup

Please tag releases

Hi,

I would like to package areas for Debian, but you don't tag releases and I'm pretty uncomfortable packaging a random commit : could you do that?

As a bonus, when you'll tag your releases, I'll be notified there's a new version and be able to update faster.

Thanks,

Snark on #debian-games

/list_areas crashes the server if there are too many areas

If an areas-admin invokes /list_areas with around +10k areas available the server crashes with a String too long message:

2021-02-17 08:57:14: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback on_chat_message(): String too long
2021-02-17 08:57:14: ERROR[Main]: stack traceback:
2021-02-17 08:57:14: ERROR[Main]: [C]: in function 'chat_send_player'
2021-02-17 08:57:14: ERROR[Main]: ...st/minetest-5.2.0-dev-linux/bin/../builtin/game/chat.lua:71: in function <...st/minetest-5.2.0-dev-linux/bin/../builtin/game/chat.lua:48>
2021-02-17 08:57:14: ERROR[Main]: ...inetest-5.2.0-dev-linux/bin/../builtin/game/register.lua:429: in function <...inetest-5.2.0-dev-linux/bin/../builtin/game/register.lua:413>

A possible solution would be just to truncate the list to a (sane?) amount or display an error message instead.

Related: #40

/area_pos set does not work on some nodes

I was protecting an area with pipeworks:deployers in the corners. It would not work until I replaced the deployers with some standard node and put them back after protecting area.

areas data are stored outside of mod storage

Thank you for this mod. I have one concern with it and that is that the data file is a json file located at worlds/world/areas.dat.

The reason I'm concerned about this is because it puts a state file mixed in with config files. This makes backups/restores more difficult. It means tracking state outside of the standard mod storage database.

The state file as-is makes running minetest in docker especially confusing because now I have to pull the state file from what I would hope is a stateless minetest docker container.

To be fair, I know this mod pre-dates the addition of minetest mod storage. I know lots of mods store data in the world folder, but I'm hoping to see minetest go in the direction of the 12 factor app where state is confined to a database. This makes server administration way simpler because it means I don't have to worry about miscellaneous data files from various mods in the world folder. Instead, everything is in the mod storage db and that's all that needs to be backed up.

Sorry for the dissertation. I appreciate areas mod which has helped me run a server and keep areas from getting griefed.

area.dat (deleted) overrideen just by last new entry

hello
the area.dat file is maybe (deleted) but I think more like overridden just by last new entry made from a gamer with /protect ... .

I didn't change anything at file , it worked well, but since about one week ago,
and today I see live that this happen just after a new entry had been made.

Is there a limit in size ? 78.6 kb
entries ?
or if someone own an area (player) is deleted by the [mod] minetest_cleaner ?

Crash :-(

A user on my server caused this crash, while trying to dye some asphalt (which is not colorable) -- not in an owned area. This looks like an areas mod crash, so filing it here.

I suspect this has something to do with these various nil exceptions that have been added to Minetest/minetest_game recently.

2018-08-02 10:25:09: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnUse(): Invalid position (expected table got nil).
2018-08-02 10:25:09: ERROR[Main]: stack traceback:
2018-08-02 10:25:09: ERROR[Main]:       [C]: in function 'get_areas_for_pos'
2018-08-02 10:25:09: ERROR[Main]:       .../.minetest/worlds/Building_World/worldmods/areas/api.lua:22: in function 'getAreasAtPos'
2018-08-02 10:25:09: ERROR[Main]:       .../.minetest/worlds/Building_World/worldmods/areas/api.lua:76: in function 'canInteract'
2018-08-02 10:25:09: ERROR[Main]:       ...etest/worlds/Building_World/worldmods/areas/interact.lua:4: in function 'is_protected'
2018-08-02 10:25:09: ERROR[Main]:       ...est/worlds/Building_World/worldmods/unifieddyes/init.lua:568: in function <...est/worlds/Building_World/worldmods/unifieddyes/init.lua:563>
2018-08-02 10:25:09: ERROR[Main]: stack traceback:
2018-08-02 10:25:09: ERROR[Main]:       [C]: in function 'get_areas_for_pos'
2018-08-02 10:25:09: ERROR[Main]:       .../.minetest/worlds/Building_World/worldmods/areas/api.lua:22: in function 'getAreasAtPos'
2018-08-02 10:25:09: ERROR[Main]:       .../.minetest/worlds/Building_World/worldmods/areas/api.lua:76: in function 'canInteract'
2018-08-02 10:25:09: ERROR[Main]:       ...etest/worlds/Building_World/worldmods/areas/interact.lua:4: in function 'is_protected'
2018-08-02 10:25:09: ERROR[Main]:       ...est/worlds/Building_World/worldmods/unifieddyes/init.lua:568: in function <...est/worlds/Building_World/worldmods/unifieddyes/init.lua:563>

[Question] Protection from mobs damage

Hello,
I'm using this mod on a server running Minetest Game to protect an area. Now I'm thinking about installing mods to add mobs, but I was wondering: will this mod also protect the area from damages caused by mobs?
Thank you for the information,

GTP

Invalid float vector dimension range 'x'

Hi below log from server crash, maybe an idea what could go wrong ?

2018-01-07 13:54:51: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback on_playerReceiveFields(): Invalid float vector dimension range 'x' (expected -2.14748e+06 < x < 2.14748e+06 got 1.00001e+07).
2018-01-07 13:54:51: ERROR[Main]: stack traceback:
2018-01-07 13:54:51: ERROR[Main]: 	[C]: in function 'get_areas_for_pos'
2018-01-07 13:54:51: ERROR[Main]: 	/root/.minetest/mods/areas/api.lua:22: in function 'getAreasAtPos'
2018-01-07 13:54:51: ERROR[Main]: 	/root/.minetest/mods/areas/api.lua:76: in function 'canInteract'
2018-01-07 13:54:51: ERROR[Main]: 	/root/.minetest/mods/areas/interact.lua:4: in function 'old_is_protected'
2018-01-07 13:54:51: ERROR[Main]: 	/root/.minetest/mods/basic_machines/protect.lua:12: in function 'is_protected'
2018-01-07 13:54:51: ERROR[Main]: 	/root/.minetest/mods/basic_machines/mover.lua:2257: in function 'func'
2018-01-07 13:54:51: ERROR[Main]: 	/usr/share/minetest/builtin/profiler/instrumentation.lua:106: in function </usr/share/minetest/builtin/profiler/instrumentation.lua:100>
2018-01-07 13:54:51: ERROR[Main]: 	/usr/share/minetest/builtin/game/register.lua:412: in function </usr/share/minetest/builtin/game/register.lua:392>

server crashed: bad argument #1 to 'chat_send_player' (string expected, got userdata)

2022-08-22 16:46:37: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '' in callback item_OnPlace(): .../bin/../mods/areas/interact.lua:14: bad argument #1 to 'chat_send_player' (string expected, got userdata)
2022-08-22 16:46:37: ERROR[Main]: stack traceback:
2022-08-22 16:46:37: ERROR[Main]: 	[C]: in function 'chat_send_player'
2022-08-22 16:46:37: ERROR[Main]: 	.../bin/../mods/areas/interact.lua:14: in function 'func'
2022-08-22 16:46:37: ERROR[Main]: 	.../bin/../builtin/game/misc.lua:180: in function 'record_protection_violation'
2022-08-22 16:46:37: ERROR[Main]: 	.../bin/../mods/handholds_redo/lib/utility.lua:48: in function 'place_holds'
2022-08-22 16:46:37: ERROR[Main]: 	.../bin/../mods/handholds_redo/init.lua:21: in function <.../bin/../mods/handholds_redo/init.lua:20>

Move to minetest-mods

It would be great if you'd consider moving this mod to the minetest-mods organisation. It's a shame to see it go unmaintained.

Server Crashes due to Areas api.lua, "getAreasAtPos"

We've had a few crashes lately that seem to be caused by the same issue in Areas.

minetestserver_2014_07_14.log:04:46:30: ERROR[main]: ERROR: An unhandled exception occurred: ...inetest-0.4.9/bin/../mods/areas_2014_06_23/areas/api.lua:5: attempt to index local 'pos' (a nil value)

Here is a pastebin of the error sections from our logs:
http://pastebin.com/5N4b7rA5

If that fails, below is the same info.

Areas is a great mod. I hope this helps to improve it. ;)

Here are the error sections from our server logs:

minetestserver_2014_07_14.log-PLAYER JOINED: KAYATA
minetestserver_2014_07_14.log-04:43:46: ACTION[ServerThread]: Player KAYATA moved too fast; resetting position
minetestserver_2014_07_14.log-04:45:32: ACTION[ServerThread]: srifqi uses bucket:bucket_empty, pointing at [node under=524,1,148 above=524,2,148]
minetestserver_2014_07_14.log-04:46:01: ACTION[ServerThread]: srifqi digs flowers:waterlily_675 at (525,2,146)
minetestserver_2014_07_14.log-04:46:07: ACTION[ServerThread]: Server: Player with the name "Admin" tried to connect from 149.135.3.224 but it was disallowed for the following reason: The name 'Admin' is disallowed on this server. Please choose another username and try again.
minetestserver_2014_07_14.log:04:46:30: ERROR[main]: ERROR: An unhandled exception occurred: ...inetest-0.4.9/bin/../mods/areas_2014_06_23/areas/api.lua:5: attempt to index local 'pos' (a nil value)
minetestserver_2014_07_14.log-04:46:30: ERROR[main]: stack traceback:
minetestserver_2014_07_14.log:04:46:30: ERROR[main]:    ...inetest-0.4.9/bin/../mods/areas_2014_06_23/areas/api.lua:5: in function 'getAreasAtPos'
minetestserver_2014_07_14.log-04:46:30: ERROR[main]:    ...test-0.4.9/bin/../mods/areas_2014_06_23/areas/legacy.lua:101: in function 'HasOwner'
minetestserver_2014_07_14.log-04:46:30: ERROR[main]:    ...4.9/bin/../mods/plantlife_2014_05_25/plants_lib/init.lua:448: in function 'node_is_owned'
minetestserver_2014_07_14.log-04:46:30: ERROR[main]:    ...9/bin/../mods/plantlife_2014_05_25/flowers_plus/init.lua:97: in function <...9/bin/../mods/plantlife_2014_05_25/flowers_plus/init.lua:74>
minetestserver_2014_07_14.log-
minetestserver_2014_07_14.log-In thread 7fa9fa19b780:
--
minetestserver_2014_07_15.log-15:58:08: ACTION[ServerThread]: oriol places node default:dirt at (593,21,652)
minetestserver_2014_07_15.log-15:58:08: ACTION[ServerThread]: oriol places node default:dirt at (593,21,655)
minetestserver_2014_07_15.log-15:58:08: ACTION[ServerThread]: oriol places node default:dirt at (593,21,654)
minetestserver_2014_07_15.log-15:58:10: ACTION[ServerThread]: oriol places node default:dirt at (593,21,657)
minetestserver_2014_07_15.log-15:58:10: ACTION[ServerThread]: oriol places node default:dirt at (593,21,656)
minetestserver_2014_07_15.log:15:58:15: ERROR[main]: ERROR: An unhandled exception occurred: ...inetest-0.4.9/bin/../mods/areas_2014_07_12/areas/api.lua:5: attempt to index local 'pos' (a nil value)
minetestserver_2014_07_15.log-15:58:15: ERROR[main]: stack traceback:
minetestserver_2014_07_15.log:15:58:15: ERROR[main]:    ...inetest-0.4.9/bin/../mods/areas_2014_07_12/areas/api.lua:5: in function 'getAreasAtPos'
minetestserver_2014_07_15.log-15:58:15: ERROR[main]:    ...test-0.4.9/bin/../mods/areas_2014_07_12/areas/legacy.lua:102: in function 'HasOwner'
minetestserver_2014_07_15.log-15:58:15: ERROR[main]:    ...4.9/bin/../mods/plantlife_2014_05_25/plants_lib/init.lua:448: in function 'node_is_owned'
minetestserver_2014_07_15.log-15:58:15: ERROR[main]:    ...9/bin/../mods/plantlife_2014_05_25/flowers_plus/init.lua:97: in function <...9/bin/../mods/plantlife_2014_05_25/flowers_plus/init.lua:74>
minetestserver_2014_07_15.log-
minetestserver_2014_07_15.log-In thread 7f13cf2ad780:
--
minetestserver_2014_07_17.log-09:58:46: ACTION[ServerThread]: klappspaten digs moreblocks:super_glow_glass at (463,37,686)
minetestserver_2014_07_17.log-09:59:20: ACTION[ServerThread]: Server: Player with the name "Guest5946" tried to connect from 212.215.201.82 but it was disallowed for the following reason: Guest accounts are disallowed on this server. Please choose a proper username and try again.
minetestserver_2014_07_17.log-09:59:36: ACTION[ServerThread]: fabri digs homedecor:glowlight_small_cube_yellow at (-1974,12,3004)
minetestserver_2014_07_17.log-10:00:06: ACTION[ServerThread]: citygot times out. List of players: ubuntuyou fabri klappspaten 
minetestserver_2014_07_17.log-10:01:51: ACTION[ServerThread]: player fabri crafts farming:flour
minetestserver_2014_07_17.log:10:01:55: ERROR[main]: ERROR: An unhandled exception occurred: ...inetest-0.4.9/bin/../mods/areas_2014_07_15/areas/api.lua:5: attempt to index local 'pos' (a nil value)
minetestserver_2014_07_17.log-10:01:55: ERROR[main]: stack traceback:
minetestserver_2014_07_17.log:10:01:55: ERROR[main]:    ...inetest-0.4.9/bin/../mods/areas_2014_07_15/areas/api.lua:5: in function 'getAreasAtPos'
minetestserver_2014_07_17.log-10:01:55: ERROR[main]:    ...test-0.4.9/bin/../mods/areas_2014_07_15/areas/legacy.lua:102: in function 'HasOwner'
minetestserver_2014_07_17.log-10:01:55: ERROR[main]:    ...4.9/bin/../mods/plantlife_2014_05_25/plants_lib/init.lua:448: in function 'node_is_owned'
minetestserver_2014_07_17.log-10:01:55: ERROR[main]:    ...9/bin/../mods/plantlife_2014_05_25/flowers_plus/init.lua:197: in function <...9/bin/../mods/plantlife_2014_05_25/flowers_plus/init.lua:174>
minetestserver_2014_07_17.log-
minetestserver_2014_07_17.log-In thread 7ff35b00f780:

sometimes crash occur

I dont know any detailed information, howto reproduce, I have only this crashlog:

18:12:55: ERROR[main]: ERROR: An unhandled exception occurred: /home/bukkit/minetest/bin/../mods/areas/api.lua:5: attempt to index local 'pos' (a nil value)
18:12:55: ERROR[main]: stack traceback:
18:12:55: ERROR[main]:  /home/bukkit/minetest/bin/../mods/areas/api.lua:5: in function 'getAreasAtPos'
18:12:55: ERROR[main]:  /home/bukkit/minetest/bin/../mods/areas/api.lua:23: in function 'canInteract'
18:12:55: ERROR[main]:  /home/bukkit/minetest/bin/../mods/areas/interact.lua:4: in function 'is_protected'
18:12:55: ERROR[main]:  ...kit/minetest/bin/../mods/plantlife/flowers_plus/init.lua:97: in function <...kit/minetest/bin/../mods/plantlife/flowers_plus/init.lua:74>

Add a hook to change the criteria for what to count for the player area limit

Currently there's a very simple hard-coded criterion in

chatcommands.lua:402:                   if area.owner == name then
internal.lua:241:               if area.owner == name then

As far as I can tell, those places count the number of owned areas, to check whether players exceed the maximum number of allowed areas.

I'm trying to maintain a mod that changes those lines to add additional criteria. It's duplicate code there, and here. Could we factor out those criteria into a function areas:isLiableLandlordOf(landlordCandidateName, area)?
That way, the function could easily be changed from the outside.

make selected area more visible

It would be so handy if you could actually see the area like the way worldEdit or postool work, and not just position 1 and 2

Feature: Allow area owner to execute move_area command

Currently is requires administrative privileges, could it be also allowed for area owners?

Currently it is hard to change / move area without administrative privileges if area contains subareas (one cannot just remove and recreate parent).

This would allow easier area fine tuning / adjustment after area has been already created.

Hide Area Description

Hi,

it would be quite helpful, if on mobile (phone) the Area Description can be hidden, as it's (when the Area Name, or the Area Owner's Name, 'is long enough') overlappin' the Inventory preview of the Slots (8 Slots, not this 'Mod' with the '16' shown).

Maybe a button on the very left-bottom side(?), so it can be toggled?

Regards,
Johannes

/list_areas creates a long list that scrolls off the chat buffer

As an admin, using the /list_areas command will give me a long list of all the areas on the server, which, after a certain number of areas, will scroll off the chat buffer, leaving me unable to get information on those areas. I would like an option to add an area number or range of areas, like /list_areas 25-74 or /list_areas 98.

Protection against entity placement

Protecting areas from players being able to place entities in them should be something that this mod includes.

Note: This should include protection against the placement of entities from APercy's mods. I was told this was gonna be tricky.

AREAS deletable by anyone

Using remove areas or recrusive remove areas, it dosent require privileges which is why a player on my server greifed spawn and deleted all areas.
I suggest setting a privilege to do that. As the player that did it only had fast and the default privellges.

HUD area list text height is computed for the server

The hack that I used to guess the text height for the area list display on the HUD is computed based on the server's font_size setting. This works fine in singleplayer but it will break in multiplayer if a client has a different font_size setting than the server.

The ideal solution for this would be support for bottom-alignment (and right-alignment, for completeness) of text in the core.

Add the ability to change protection settings

There should be a way to change what kind of protection you get. Currently, if someone puts a light switch in a protected area, nobody else can use the light switch, but if they place a mesecons lever or button, others can use it. Players should be able to change protection settings, like:

  • if people can use things that involve use by right-clicking(like light switches or mesecons, but not including chests or storage blocks),
  • if people can place/break blocks(already implemented with the open/close area feature),
  • if people can access block inventories(chests or other storage blocks),
  • if people can place entities(I will make another issue about placing entities in protected areas).

This could be done by adding the ability to edit "flags" or settings, perhaps though a command like /area_settings [area ID].

This would be useful in allowing people to choose what kind of protections they want, and should also enhance protection experience.

There are 0 hard problems in computer science: off-by-1 errors

/area_info: "You can protect areas spanning up to 64x128x64."
/list_areas: (-32,-64,-32) (32,64,32)
markers:land_title_register: "It spans 65x65 = 4225 m^2. Height: 129 m."

Now, I can see how this might be deliberate to make mental maths easier, but one of those two statements is wrong - either the spanning is 65x129x65 (perhaps written as +/-32,+/-64,+/-32) or the protection should be one less.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.