Cuberite Forum
How to get world description? - 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: How to get world description? (/thread-417.html)



How to get world description? - geser - 04-01-2012

Are there any ways to get descriptor or name of the world where player is situated? I found C++ method:
const AString & GetDescription(void) const {return m_Description; }
, but there is no lua interface for it and it has comment:
// FIXME: This should not be in cWorld
Why it is not in lua API and why this should not be in cWorld?

It is necessary for the implementation of Boo's plugin idea:
https://forum.cuberite.org/showthread.php?tid=408


RE: How to get world description? - FakeTruth - 04-02-2012

That's actually the server discription, which has nothing to do with the world, that's why it should not be in cWorld
It gives you this string, from settings.ini
Code:
[Server]
Description=MCServer - Slightly more custom!

What you're looking for is cWorld::GetName()


RE: How to get world description? - geser - 04-02-2012

Thanks. Everything works well.