Random Chitchat 2012-2016
I wrote a simple RCON server into MCServer, but it cannot really do much now:
- Commands write output directly to console, there's no framework to redirect the output to RCON
- "stop" command waits for an enter keypress on the console, making RCON-shutdown impossible

I need to change the way commands' output is handled. The command handlers will receive a Callback method which they'll use to output; then RCON can have a different callback from the console. This will be quite a chore to write Lua-aware.
Thanks given by:
If someone wants to make players change gamemode depending on worlds gamemode and clear inventory when going from creative to survival here is my gotoworld.lua


Attached Files
.lua   gotoworld.lua (Size: 964 bytes / Downloads: 270)
Thanks given by:
Fuc**** pickups! I have the bug again Sad.
Please try to fix it. There is a zip with my world and my json. I don't know why but in my json I have gamemode: -1 ID: -1 and things like that. Hope it will help to fix the error. Rename the json to your username. You will spawn in front of some pickups that you can't get.

Good Smile, now I know how to fix the bug. To fix the bug you only have to change gamemode to 0 in json file.
I changed "gamemode" : -1 to "gamemode" : 0 and now I can get pickups!
Hope you will fix it.


Attached Files
.zip   irresponsivepickups.zip (Size: 973.38 KB / Downloads: 262)
Thanks given by:
I thing know I know what is the cause of the error.
Latest time I happened it happened doing this:
-Going from survival world to creative world (Gamemode = 0 + 1 = 1)
-Set (in creative world) gamemode to survival (Gamemode = 1 - 1 = 0)
-Go from creative world to survival world (Gamemode = 0 -1 = -1)
-I can't get pickups.

So I think the bug is because when changing gamemode in MCServer, if changing to creative Gamemode in json is set to +1 and if changing to survival is set to -1.
But, what happens if changing 2 times to survival? (1 - 2= -1)
The error can be fixed setting Gamemode to 0 or 1 in json but this error shouldn't happen. Please try to fix it.
Thanks given by:
I'll have a look at your world over the weekend.

As for the gamemode in the player json file, "-1" means "inherit from the world", so if the world is in creative mode, the player has creative mode; if the world is in survival, the player is in survival. That's the gmNotSet flag.

There is no arithmetic on the gamemode, it is set to constants; survival = 0, creative = 1. Setting is done directly, not by addition.
Thanks given by:
I think you packed the wrong world. The json file says "world: survival", but the zip has only a "world" in it.
Thanks given by:
(06-29-2013, 09:12 PM)xoft Wrote: I think you packed the wrong world. The json file says "world: survival", but the zip has only a "world" in it.
It's because I renamed world to survival. Just rename world to survival and have a look.
Thanks given by:
If you renamed world to survival, it won't be stored in the "world" folder anymore, but rather in a "survival" folder. The world that's in the zip has no pickups and chunks are generating around me as I login with that JSON, which means it's not the world that the JSON has been taken in. And the pickups I dug up do work.
Thanks given by:
Fun fact #43: If you manage to make a syntax error in the Core plugin and reload the server, there's no way to reload the server again anymore, because the "reload" command is implemented in the Core plugin (which has not been loaded due to having a syntax error).

Fun fact #44: Same circumstances - syntax error in the Core plugin, server reloaded. Type an unknown command, you get "Unknown command, type 'help' for all commands". You type help, and get the same error message, because the help command is implemented in the Core plugin, currently unloaded.

Why do I have to find these out the hard way?Tongue

I have implemented the RCON capability, now console commands send their output to the RCON client. I had to change the command handlers in order to do so, they must no longer use the LOG function, but instead return the output as the second return value. The Core's console commands have been rewritten to support this new feature.

We're still short of some commands that MC RCON clients expect, I'm hereby appealing to the capable plugin developers to implement the rest of the commands, preferably as patches to the Core plugin's console.lua file. To get you inspired, here's a GUI RCON client: https://code.google.com/p/rcon-client/ and the list of vanilla's commands: http://www.minecraftwiki.net/wiki/Command
To get you started, I've already implemented the "list", "banlist" and "banlist ips" commands, so you have a working example.
Thanks given by:
xoft Wrote:If you manage to make a syntax error in the Core plugin and reload the server, there's no way to reload the server again anymore, because the "reload" command is implemented in the Core plugin (which has not been loaded due to having a syntax error).

Same circumstances - syntax error in the Core plugin, server reloaded. Type an unknown command, you get "Unknown command, type 'help' for all commands". You type help, and get the same error message, because the help command is implemented in the Core plugin, currently unloaded.
Maybe its smart to add the reload/help command hardcoded in the server or as an external plugin?

Also should I change the place where the settings for the core plugins are saved? Now the core plugin saves it in the Settings.ini that MCServer creates. I was thinking about using a core.ini.
Thanks given by:




Users browsing this thread: 18 Guest(s)