summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--MCServer/Plugins/APIDump/APIDesc.lua10
-rw-r--r--MCServer/Plugins/MagicCarpet/plugin.lua7
-rw-r--r--src/Bindings/PluginLua.cpp2
-rw-r--r--src/BlockID.h7
-rw-r--r--src/ChatColor.cpp7
-rw-r--r--src/ChatColor.h17
-rw-r--r--src/Entities/Player.cpp2
-rw-r--r--src/GroupManager.cpp6
-rw-r--r--src/World.h2
10 files changed, 28 insertions, 33 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 99110ac90..dbcc93c7e 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -17,5 +17,6 @@ Sofapriester
mborland
SamJBarney
worktycho
+Sxw1212
Please add yourself to this list if you contribute to MCServer.
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 5bc4a5f39..d69dd14cd 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -1,4 +1,3 @@
-
-- APIDesc.lua
-- Contains the API objects' descriptions
@@ -308,18 +307,15 @@ g_APIDesc =
A wrapper class for constants representing colors or effects.
]],
- Functions =
- {
- MakeColor = { Params = "ColorCodeConstant", Return = "string", Notes = "Creates the complete color-code-sequence from the color or effect constant" },
- },
+ Functions = {},
Constants =
{
Black = { Notes = "" },
Blue = { Notes = "" },
Bold = { Notes = "" },
- Color = { Notes = "The first character of the color-code-sequence, §" },
+ Color = { Notes = "The first character of the color-code-sequence, �" },
DarkPurple = { Notes = "" },
- Delimiter = { Notes = "The first character of the color-code-sequence, §" },
+ Delimiter = { Notes = "The first character of the color-code-sequence, �" },
Gold = { Notes = "" },
Gray = { Notes = "" },
Green = { Notes = "" },
diff --git a/MCServer/Plugins/MagicCarpet/plugin.lua b/MCServer/Plugins/MagicCarpet/plugin.lua
index 81eb02a9c..b05816e48 100644
--- a/MCServer/Plugins/MagicCarpet/plugin.lua
+++ b/MCServer/Plugins/MagicCarpet/plugin.lua
@@ -1,4 +1,5 @@
local Carpets = {}
+local PLUGIN
function Initialize( Plugin )
Plugin:SetName( "MagicCarpet" )
@@ -9,7 +10,9 @@ function Initialize( Plugin )
local PluginManager = cPluginManager:Get()
PluginManager:BindCommand("/mc", "magiccarpet", HandleCarpetCommand, " - Spawns a magical carpet");
-
+
+ PLUGIN = Plugin
+
LOG( "Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion() )
return true
end
@@ -75,4 +78,4 @@ function OnPlayerMoving(Player)
end
Carpet:moveTo( cLocation:new( Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() ) )
end
-end \ No newline at end of file
+end
diff --git a/src/Bindings/PluginLua.cpp b/src/Bindings/PluginLua.cpp
index 0d17c9ce2..0e5a66cd6 100644
--- a/src/Bindings/PluginLua.cpp
+++ b/src/Bindings/PluginLua.cpp
@@ -386,7 +386,7 @@ bool cPluginLua::OnExploded(cWorld & a_World, double a_ExplosionSize, bool a_Can
{
case esOther: m_LuaState.Call((int)(**itr), &a_World, a_ExplosionSize, a_CanCauseFire, a_X, a_Y, a_Z, a_Source, a_SourceData, cLuaState::Return, res); break;
case esPrimedTNT: m_LuaState.Call((int)(**itr), &a_World, a_ExplosionSize, a_CanCauseFire, a_X, a_Y, a_Z, a_Source, (cTNTEntity *)a_SourceData, cLuaState::Return, res); break;
- case esCreeper: m_LuaState.Call((int)(**itr), &a_World, a_ExplosionSize, a_CanCauseFire, a_X, a_Y, a_Z, a_Source, (cCreeper *)a_SourceData, cLuaState::Return, res); break;
+ case esMonster: m_LuaState.Call((int)(**itr), &a_World, a_ExplosionSize, a_CanCauseFire, a_X, a_Y, a_Z, a_Source, (cMonster *)a_SourceData, cLuaState::Return, res); break;
case esBed: m_LuaState.Call((int)(**itr), &a_World, a_ExplosionSize, a_CanCauseFire, a_X, a_Y, a_Z, a_Source, (Vector3i *)a_SourceData, cLuaState::Return, res); break;
case esEnderCrystal: m_LuaState.Call((int)(**itr), &a_World, a_ExplosionSize, a_CanCauseFire, a_X, a_Y, a_Z, a_Source, (Vector3i *)a_SourceData, cLuaState::Return, res); break;
case esGhastFireball: m_LuaState.Call((int)(**itr), &a_World, a_ExplosionSize, a_CanCauseFire, a_X, a_Y, a_Z, a_Source, a_SourceData, cLuaState::Return, res); break;
diff --git a/src/BlockID.h b/src/BlockID.h
index 9742e9745..288719ccf 100644
--- a/src/BlockID.h
+++ b/src/BlockID.h
@@ -833,14 +833,17 @@ enum eExplosionSource
{
esOther,
esPrimedTNT,
- esCreeper,
+ esMonster,
esBed,
esEnderCrystal,
esGhastFireball,
esWitherSkullBlack,
esWitherSkullBlue,
esWitherBirth,
- esPlugin
+ esPlugin,
+
+ // Obsolete constants, kept for compatibility, will be removed after some time:
+ esCreeper = esMonster,
} ;
// tolua_end
diff --git a/src/ChatColor.cpp b/src/ChatColor.cpp
index 2b223ee76..72a0a6928 100644
--- a/src/ChatColor.cpp
+++ b/src/ChatColor.cpp
@@ -1,4 +1,3 @@
-
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "ChatColor.h"
@@ -29,11 +28,5 @@ const std::string cChatColor::Underlined = cChatColor::Color + "n";
const std::string cChatColor::Italic = cChatColor::Color + "o";
const std::string cChatColor::Plain = cChatColor::Color + "r";
-const std::string cChatColor::MakeColor( char a_Color )
-{
- return cChatColor::Color + a_Color;
-}
-
-
diff --git a/src/ChatColor.h b/src/ChatColor.h
index 85b10f400..643c4d5d8 100644
--- a/src/ChatColor.h
+++ b/src/ChatColor.h
@@ -29,15 +29,14 @@ public:
static const std::string Yellow;
static const std::string White;
- // Styles ( source: http://wiki.vg/Chat )
- static const std::string Random;
- static const std::string Bold;
- static const std::string Strikethrough;
- static const std::string Underlined;
- static const std::string Italic;
- static const std::string Plain;
-
- static const std::string MakeColor( char a_Color );
+ // Styles ( source: http://wiki.vg/Chat )
+ static const std::string Random;
+ static const std::string Bold;
+ static const std::string Strikethrough;
+ static const std::string Underlined;
+ static const std::string Italic;
+ static const std::string Plain;
+
};
// tolua_end
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 948a259ff..b923a094e 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1294,7 +1294,7 @@ AString cPlayer::GetColor(void) const
{
if ( m_Color != '-' )
{
- return cChatColor::MakeColor( m_Color );
+ return cChatColor::Color + m_Color;
}
if ( m_Groups.size() < 1 )
diff --git a/src/GroupManager.cpp b/src/GroupManager.cpp
index 1ffe3812f..792acc2c3 100644
--- a/src/GroupManager.cpp
+++ b/src/GroupManager.cpp
@@ -79,11 +79,11 @@ cGroupManager::cGroupManager()
Group->SetName( KeyName );
char Color = IniFile.GetValue( KeyName, "Color", "-" )[0];
if( Color != '-' )
- Group->SetColor( cChatColor::MakeColor(Color) );
+ Group->SetColor( cChatColor::Color + Color );
else
Group->SetColor( cChatColor::White );
- std::string Commands = IniFile.GetValue( KeyName, "Commands", "" );
+ AString Commands = IniFile.GetValue( KeyName, "Commands", "" );
if( Commands.size() > 0 )
{
AStringVector Split = StringSplit( Commands, "," );
@@ -93,7 +93,7 @@ cGroupManager::cGroupManager()
}
}
- std::string Permissions = IniFile.GetValue( KeyName, "Permissions", "" );
+ AString Permissions = IniFile.GetValue( KeyName, "Permissions", "" );
if( Permissions.size() > 0 )
{
AStringVector Split = StringSplit( Permissions, "," );
diff --git a/src/World.h b/src/World.h
index 4f9bf67e7..c067252d9 100644
--- a/src/World.h
+++ b/src/World.h
@@ -420,7 +420,7 @@ public:
a_SourceData exact type depends on the a_Source:
| esOther | void * |
| esPrimedTNT | cTNTEntity * |
- | esCreeper | cCreeper * |
+ | esMonster | cMonster * |
| esBed | cVector3i * |
| esEnderCrystal | Vector3i * |
| esGhastFireball | cGhastFireball * |