diff options
author | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-28 00:05:50 +0100 |
---|---|---|
committer | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-28 00:05:50 +0100 |
commit | ae3ac08b75a5f13d29ffb2c2f897a88e491230f6 (patch) | |
tree | 0132df983fa082d56906f0ab62fe5e82add0780b | |
parent | Users file was pretty messed up with mixed unix and windows line endings. The ini failed to parse correctly under cygwin. (diff) | |
download | cuberite-ae3ac08b75a5f13d29ffb2c2f897a88e491230f6.tar cuberite-ae3ac08b75a5f13d29ffb2c2f897a88e491230f6.tar.gz cuberite-ae3ac08b75a5f13d29ffb2c2f897a88e491230f6.tar.bz2 cuberite-ae3ac08b75a5f13d29ffb2c2f897a88e491230f6.tar.lz cuberite-ae3ac08b75a5f13d29ffb2c2f897a88e491230f6.tar.xz cuberite-ae3ac08b75a5f13d29ffb2c2f897a88e491230f6.tar.zst cuberite-ae3ac08b75a5f13d29ffb2c2f897a88e491230f6.zip |
Diffstat (limited to '')
-rw-r--r-- | Plugins/Core.lua | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Plugins/Core.lua b/Plugins/Core.lua index 517b48394..cd87182bf 100644 --- a/Plugins/Core.lua +++ b/Plugins/Core.lua @@ -136,7 +136,7 @@ function HandleKickCommand( Split, Player ) return true
end
- local World = cRoot:Get():GetWorld()
+ local World = Player:GetWorld()
local OtherPlayer = World:GetPlayer( Split[2] )
if( OtherPlayer == nil ) then
Player:SendMessage( cChatColor.Green .. "Could not find player " .. Split[2] )
@@ -164,7 +164,7 @@ function HandleBanCommand( Split, Player ) return true
end
- local World = cRoot:Get():GetWorld()
+ local World = Player:GetWorld()
local OtherPlayer = World:GetPlayer( Split[2] )
if( OtherPlayer == nil ) then
Player:SendMessage( cChatColor.Green .. "Could not find player " .. Split[2] )
@@ -255,7 +255,7 @@ function HandleReloadCommand( Split, Player ) end
function HandlePlayerListCommand( Split, Player )
- local World = cRoot:Get():GetWorld()
+ local World = Player:GetWorld()
local PlayerList = World:GetAllPlayers()
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]" )
return true
end
- local World = cRoot:Get():GetWorld()
+ local World = Player:GetWorld()
local OtherPlayer = World:GetPlayer( Split[2] )
if( OtherPlayer == nil ) then
Player:SendMessage( cChatColor.Green .. "Can't find player " .. Split[2] )
@@ -422,6 +422,7 @@ function HandleChangeGMCommand( Split, Player ) return true
end
+
function HandleGotoWorldCommand( Split, Player )
if( #Split ~= 2 ) then
Player:SendMessage( cChatColor.Green .. "Usage: /gotoworld [WorldName]" )
@@ -457,7 +458,7 @@ function CorePlugin:OnBlockPlace( Block, Player ) end
local collision = false
- local World = cRoot:Get():GetWorld()
+ local World = Player:GetWorld()
local PlayerList = World:GetAllPlayers()
-- check if a player occupies the placement location
@@ -602,7 +603,6 @@ function ReloadWeb:new() end
function ReloadWeb:HandleRequest( Request )
- local World = cRoot:Get():GetWorld()
local Content = ""
if( Request.Params:get("reload") ~= "" ) then
@@ -641,8 +641,6 @@ local function HTMLDeleteButton( name ) end
function WhiteListWeb:HandleRequest( Request )
- local World = cRoot:Get():GetWorld()
-
local UpdateMessage = ""
if( Request.Params:get("whitelist-add") ~= "" ) then
local PlayerName = Request.Params:get("whitelist-add")
|