Fixed some things in Core to work for multiple worlds
git-svn-id: http://mc-server.googlecode.com/svn/trunk@139 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
d57753cd68
commit
ae3ac08b75
@ -136,7 +136,7 @@ function HandleKickCommand( Split, Player )
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
local World = cRoot:Get():GetWorld()
|
local World = Player:GetWorld()
|
||||||
local OtherPlayer = World:GetPlayer( Split[2] )
|
local OtherPlayer = World:GetPlayer( Split[2] )
|
||||||
if( OtherPlayer == nil ) then
|
if( OtherPlayer == nil ) then
|
||||||
Player:SendMessage( cChatColor.Green .. "Could not find player " .. Split[2] )
|
Player:SendMessage( cChatColor.Green .. "Could not find player " .. Split[2] )
|
||||||
@ -164,7 +164,7 @@ function HandleBanCommand( Split, Player )
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
local World = cRoot:Get():GetWorld()
|
local World = Player:GetWorld()
|
||||||
local OtherPlayer = World:GetPlayer( Split[2] )
|
local OtherPlayer = World:GetPlayer( Split[2] )
|
||||||
if( OtherPlayer == nil ) then
|
if( OtherPlayer == nil ) then
|
||||||
Player:SendMessage( cChatColor.Green .. "Could not find player " .. Split[2] )
|
Player:SendMessage( cChatColor.Green .. "Could not find player " .. Split[2] )
|
||||||
@ -255,7 +255,7 @@ function HandleReloadCommand( Split, Player )
|
|||||||
end
|
end
|
||||||
|
|
||||||
function HandlePlayerListCommand( Split, Player )
|
function HandlePlayerListCommand( Split, Player )
|
||||||
local World = cRoot:Get():GetWorld()
|
local World = Player:GetWorld()
|
||||||
local PlayerList = World:GetAllPlayers()
|
local PlayerList = World:GetAllPlayers()
|
||||||
|
|
||||||
local Message = cChatColor.Green .. "Connected players: (".. cChatColor.White.. #PlayerList .. cChatColor.Green .. ")"
|
local Message = cChatColor.Green .. "Connected players: (".. cChatColor.White.. #PlayerList .. cChatColor.Green .. ")"
|
||||||
@ -398,7 +398,7 @@ function HandleTPCommand( Split, Player )
|
|||||||
Player:SendMessage( cChatColor.Green .. "Usage: /tp [PlayerName]" )
|
Player:SendMessage( cChatColor.Green .. "Usage: /tp [PlayerName]" )
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
local World = cRoot:Get():GetWorld()
|
local World = Player:GetWorld()
|
||||||
local OtherPlayer = World:GetPlayer( Split[2] )
|
local OtherPlayer = World:GetPlayer( Split[2] )
|
||||||
if( OtherPlayer == nil ) then
|
if( OtherPlayer == nil ) then
|
||||||
Player:SendMessage( cChatColor.Green .. "Can't find player " .. Split[2] )
|
Player:SendMessage( cChatColor.Green .. "Can't find player " .. Split[2] )
|
||||||
@ -422,6 +422,7 @@ function HandleChangeGMCommand( Split, Player )
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
function HandleGotoWorldCommand( Split, Player )
|
function HandleGotoWorldCommand( Split, Player )
|
||||||
if( #Split ~= 2 ) then
|
if( #Split ~= 2 ) then
|
||||||
Player:SendMessage( cChatColor.Green .. "Usage: /gotoworld [WorldName]" )
|
Player:SendMessage( cChatColor.Green .. "Usage: /gotoworld [WorldName]" )
|
||||||
@ -457,7 +458,7 @@ function CorePlugin:OnBlockPlace( Block, Player )
|
|||||||
end
|
end
|
||||||
|
|
||||||
local collision = false
|
local collision = false
|
||||||
local World = cRoot:Get():GetWorld()
|
local World = Player:GetWorld()
|
||||||
local PlayerList = World:GetAllPlayers()
|
local PlayerList = World:GetAllPlayers()
|
||||||
|
|
||||||
-- check if a player occupies the placement location
|
-- check if a player occupies the placement location
|
||||||
@ -602,7 +603,6 @@ function ReloadWeb:new()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ReloadWeb:HandleRequest( Request )
|
function ReloadWeb:HandleRequest( Request )
|
||||||
local World = cRoot:Get():GetWorld()
|
|
||||||
local Content = ""
|
local Content = ""
|
||||||
|
|
||||||
if( Request.Params:get("reload") ~= "" ) then
|
if( Request.Params:get("reload") ~= "" ) then
|
||||||
@ -641,8 +641,6 @@ local function HTMLDeleteButton( name )
|
|||||||
end
|
end
|
||||||
|
|
||||||
function WhiteListWeb:HandleRequest( Request )
|
function WhiteListWeb:HandleRequest( Request )
|
||||||
local World = cRoot:Get():GetWorld()
|
|
||||||
|
|
||||||
local UpdateMessage = ""
|
local UpdateMessage = ""
|
||||||
if( Request.Params:get("whitelist-add") ~= "" ) then
|
if( Request.Params:get("whitelist-add") ~= "" ) then
|
||||||
local PlayerName = Request.Params:get("whitelist-add")
|
local PlayerName = Request.Params:get("whitelist-add")
|
||||||
|
Loading…
Reference in New Issue
Block a user