Give players fly priv when creative is enabled #1865
No reviewers
Labels
No Label
#P1 CRITICAL
#P2: HIGH
#P3: elevated
#P4 priority: medium
#P6: low
#Review
annoying
API
bug
code quality
combat
commands
compatibility
configurability
contribution inside
controls
core feature
creative mode
delayed for engine release
documentation
duplicate
enhancement
environment
feature request
gameplay
graphics
ground content conflict
GUI/HUD
help wanted
incomplete feature
invalid / won't fix
items
looking for contributor
mapgen
meta
mineclone2+
Minecraft >= 1.13
Minecraft >= 1.17
missing feature
mobile
mobs
mod support
model needed
multiplayer
Needs adoption
needs discussion
needs engine change
needs more information
needs research
nodes
non-mob entities
performance
player
possible close
redstone
release notes
schematics
Skyblock
sounds
Testing / Retest
tools
translation
unconfirmed
mcl5
mcla
Media missing
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#1865
Loading…
Reference in New Issue
No description provided.
Delete Branch "NO11/MineClone2:privs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -6,0 +8,4 @@
local name = player:get_player_name()
local meta = player:get_meta()
if meta:get_int("fly_changed") == 1 then return end
use
last_login
parameter to check new players.used on_newplayer now.
oh much better!
Oh NO now i remember why i didnt use on_newplayer. Imagine: a server owner turns the server back to survival...
Sry i forgot what my own code does. It wasnt a check for new players, it was a check wether the server owner or someone else changed the privs of the player when creative is disabled again when the player joins.
When the the sever owner grants fly to the player maunally, the priv will not be changed on rejoin when creative isnt enabled.
So can i change it back? Do you understand it?
just change it then :p. this PR is still in the works. Though, i appreciate explaining why 👍.
@ -6,0 +16,4 @@
end
minetest.set_player_privs(name, {
fly = fly,
})
This will remove all of new players'
default_privs
(checkminetest.conf.example
for the setting).Test code:
Chatlog:
hmmm. I know this is oudated but i dont think set_player_privs changed https://dev.minetest.net/minetest.set_player_privs
this is not "outdated" despite what gitea tells you. the code is still the same, see lines 17-19.
or, if i misunderstood; yes, dev.minetest.net is probably outdated, but in this case it's correct (which you can verify it yourself by running the test code). i use the nightly
lua_api.txt
on gitlab and unfortunately the description is rather sparse.What this means is that if i had
interact
priv as specified bydefault_privs
, i will lose the priv once the call is made. my suggestion to fix this:@iliekprogrammar for me it works also without your fix:
You're right, sorry.
why cant gitea allow me to self-request a review???
I aggree with @iliekprogrammar and whould like to test before merge
@iliekprogrammar why did you close the pr??
what the heck? i press escape and things magically happen?
gitea is so bad...
LGTM and tests went well. (if only we had something like mineunit tho. but i digress)