linuxmasterrace / Townvalds

A free town plugin for Cuberite
GNU Affero General Public License v3.0
14 stars 4 forks source link

Added town permissions #77

Closed PureTryOut closed 8 years ago

PureTryOut commented 8 years ago

Town permissions are separated under resident, ally or outsider. Residents are town members, allies are nation members but not town members, outsiders are players outside the nation. The permissions are split up under build, destroy, itemuse and switch. They can all be toggled on or off individually.

I had to add the library bit.numberlua, which allowed me to use bitwise operators so I would not have to add 12 new columns to the town table in the database. This since Lua 5.1 (which Cuberite uses) does not support bitwise operators natively yet. I used the bit32 compatibility mode so switching to the Lua 5.2 native library will be easier in the future. Look here for more information.