Cuberite Forum
get every sign in the world - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html)
+--- Thread: get every sign in the world (/thread-2403.html)

Pages: 1 2 3


RE: get every sign in the world - xoft - 03-19-2016

Your for-loops look weird. Using the same variable name for inner loop as for the outer loop is very confusing. I have to say I am quite unable to actually follow this piece of code.


RE: get every sign in the world - danny9484 - 03-21-2016

the name variable had actually no use it was just something I forgot to remove after testing

I've updated it a little bit cleanup maybe better understandable now? xD


RE: get every sign in the world - xoft - 03-21-2016

Why is there a list of playernames? Is it possible for two players to "claim" the same block?
I'd personally have used a different index ordering, specifying the world name first, but that's a matter of taste.

You should definitely not use a player name, though - accounts can be renamed nowadays, you should use the UUID instead - that is guaranteed to stay the same.


RE: get every sign in the world - danny9484 - 03-21-2016

oh didn't knew you can change your name ok I will use UUID instead

yes multiple players can claim the same block you can define friends

Next problem I have, I want to prevent that Players that don't have permission can't open the gate. no matter what I do the gate is a little time open on the client / they can go through I think that's known. However I tried to teleport the Player away but I noticed Teleports aren't working over short length? on another Client I see that the Player is teleported but in a second he is back at the same position. So can it somehow work or do I need another idea? or is it possible to create a knockback kinda like explosions do?


RE: get every sign in the world - danny9484 - 03-21-2016

I got it working with freeze and unfreeze but im not sure if it's safe because im calling both in the same function / in 1 tick. maybe if the player has lag he could glitch through?