Cuberite Forum
SignLock - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Releases (https://forum.cuberite.org/forum-2.html)
+--- Thread: SignLock (/thread-868.html)

Pages: 1 2 3 4 5


RE: SignLock - NiLSPACE - 01-30-2014

Yea I'll have to check the length of a playername first before setting it on the sign. But sadly for now I have no idea how to make it work with your name Sad


RE: SignLock - Antonio - 01-30-2014

Ok at least there is 15 character limit for now. Maybe in the future someone can make pull request for it to work with 15+ characters (by only displaying 15 or shortening the name). You could put that on ToDo list because i know lots of players with 15+ character username.


RE: SignLock - xoft - 01-30-2014

I think this should be implemented inside MCServer - otherwise anyone can edit a sign with text longer than 15 chars and do the same crash for all players, no need to involve this plugin.

This is strange, because I remember the other day making a sign with extremely long text, it just overflowed the sign, but the client didn't crash. They must have changed it since then.


RE: SignLock - Antonio - 01-30-2014

Ah, yes. Then this should also be implemented inside MCServer. I'm using 1.7.4 client btw.


RE: SignLock - xoft - 01-30-2014

How did you get your name onto the sign? The client seems to limit the sign text to 15 chars on its own, I seem unable to enter any more.


RE: SignLock - NiLSPACE - 01-30-2014

His username is longer then 15 chars. With this plugin if you set the first line of a sign to "[SL]" and leave the second line empty it will set that line to your name.


RE: SignLock - Antonio - 01-30-2014

Yes, he limited this in MCS with this commit: https://github.com/mc-server/MCServer/commit/04107fa85d142e31576042cff5677a36e392f9f4

From the plugin part there should be shortened name or some other type of workaround. Should not exceed 15 char limit.

How about using two lines for the username?


RE: SignLock - NiLSPACE - 01-30-2014

I did think about using two lines, but the layout is like this:
Code:
[SL]
Player1
Player2
Player3
I'll propably have to rewrite it to work. I might do it in the weekend.


RE: SignLock - xoft - 01-30-2014

I *think* you could use abbreviated names in the plugin - after all, the server has a "FindAndDoWithPlayer()" function that performs partial playername matches.

No need to change the plugin as for the 15-char limit, I've limited the server's sign-sending code, so that it doesn't send long sign lines to 1.7 clients. The previous clients that support longer lines will still get longer lines. The plugin can store long lines so that it has the exact playername.


RE: SignLock - Antonio - 01-31-2014

Found a bug. The sign shows my name and [SL] properly when i do not use a chest. But when i write [SL] in front of a chest it doesn't work at all. I guess it doesn't lock the chest either. If you can rewrite it on weekends like you said, it would be great Smile

[Image: HHW9uiZ.png]

Also found some errors, i don't know if this is related to the plugin:

16:45:19] LUA: Plugins/Core/onlogin.lua:10: attempt to call method 'SendMessage' (a nil value)
[16:45:19] Stack trace:
[16:45:19] [C](-1): SendMessage
[16:45:19] Plugins/Core/onlogin.lua(10): (no name)
[16:45:19] Stack trace end
[16:45:19] Error in plugin Core calling function <callback>()
[16:45:19] Player Lucifer has joined the game.
[16:45:31] [Lucifer]: yo
[16:45:40] LUA: 2 - Plugins/Core/functions.lua:144: attempt to index global 'OtherPlayer' (a nil value)