Added a /toggledownfall command that toggles the weather.
changed back the stop.lua git-svn-id: http://mc-server.googlecode.com/svn/trunk@1312 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
9eff51d831
commit
aae46468c7
@ -32,6 +32,7 @@ function Initialize(Plugin)
|
||||
PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHUNK_GENERATING)
|
||||
PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_MOVING)
|
||||
|
||||
PluginManager:BindCommand("/toggledownfall", "core.toggledownfall", HandleToggleDownfallCommand, " - Toggles the weather");
|
||||
PluginManager:BindCommand("/back", "core.back", HandleBackCommand, " - Return to your last position");
|
||||
PluginManager:BindCommand("/save-all", "core.save-all", HandleSaveAllCommand, " - Saves all your worlds");
|
||||
PluginManager:BindCommand("/help", "core.help", HandleHelpCommand, " [Page] - Show available commands");
|
||||
|
@ -1,8 +1,6 @@
|
||||
function HandleStopCommand( Split, Player )
|
||||
Server = cRoot:Get():GetServer()
|
||||
PluginManager = cRoot:Get():GetPluginManager()
|
||||
Server:SendMessage( cChatColor.Green .. "Stopping the server..." )
|
||||
PluginManager:ExecuteConsoleCommand("stop")
|
||||
--cRoot:Get():ServerCommand("stop")
|
||||
cRoot:Get():ServerCommand("stop")
|
||||
return true
|
||||
end
|
10
MCServer/Plugins/Core/weather.lua
Normal file
10
MCServer/Plugins/Core/weather.lua
Normal file
@ -0,0 +1,10 @@
|
||||
function HandleToggleDownfallCommand( Split, Player )
|
||||
World = Player:GetWorld()
|
||||
if World:GetWeather() == 0 then
|
||||
World:SetWeather(1)
|
||||
else
|
||||
World:SetWeather(0)
|
||||
end
|
||||
Player:SendMessage( cChatColor.Green .. "Weather toggled")
|
||||
return true
|
||||
end
|
Loading…
Reference in New Issue
Block a user