commit
74204aed6c
@ -188,12 +188,11 @@ void cCommandBlockEntity::SaveToJson(Json::Value & a_Value)
|
|||||||
|
|
||||||
void cCommandBlockEntity::Execute()
|
void cCommandBlockEntity::Execute()
|
||||||
{
|
{
|
||||||
if (m_World != NULL)
|
ASSERT(m_World != NULL); // Execute should not be called before the command block is attached to a world
|
||||||
|
|
||||||
|
if (!m_World->AreCommandBlocksEnabled())
|
||||||
{
|
{
|
||||||
if (!m_World->AreCommandBlocksEnabled())
|
return;
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class CommandBlockOutCb :
|
class CommandBlockOutCb :
|
||||||
|
@ -158,7 +158,8 @@ cMojangAPI::cMojangAPI(void) :
|
|||||||
m_NameToUUIDServer(DEFAULT_NAME_TO_UUID_SERVER),
|
m_NameToUUIDServer(DEFAULT_NAME_TO_UUID_SERVER),
|
||||||
m_NameToUUIDAddress(DEFAULT_NAME_TO_UUID_ADDRESS),
|
m_NameToUUIDAddress(DEFAULT_NAME_TO_UUID_ADDRESS),
|
||||||
m_UUIDToProfileServer(DEFAULT_UUID_TO_PROFILE_SERVER),
|
m_UUIDToProfileServer(DEFAULT_UUID_TO_PROFILE_SERVER),
|
||||||
m_UUIDToProfileAddress(DEFAULT_UUID_TO_PROFILE_ADDRESS)
|
m_UUIDToProfileAddress(DEFAULT_UUID_TO_PROFILE_ADDRESS),
|
||||||
|
m_RankMgr(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -477,8 +477,8 @@ AString cRankManager::GetPlayerRankName(const AString & a_PlayerUUID)
|
|||||||
{
|
{
|
||||||
SQLite::Statement stmt(m_DB, "SELECT Rank.Name FROM Rank LEFT JOIN PlayerRank ON Rank.RankID = PlayerRank.RankID WHERE PlayerRank.PlayerUUID = ?");
|
SQLite::Statement stmt(m_DB, "SELECT Rank.Name FROM Rank LEFT JOIN PlayerRank ON Rank.RankID = PlayerRank.RankID WHERE PlayerRank.PlayerUUID = ?");
|
||||||
stmt.bind(1, a_PlayerUUID);
|
stmt.bind(1, a_PlayerUUID);
|
||||||
stmt.executeStep();
|
// executeStep returns false on no data
|
||||||
if (stmt.isDone())
|
if (!stmt.executeStep())
|
||||||
{
|
{
|
||||||
// No data returned from the DB
|
// No data returned from the DB
|
||||||
return AString();
|
return AString();
|
||||||
|
@ -134,8 +134,8 @@ void cSetChunkData::RemoveInvalidBlockEntities(void)
|
|||||||
);
|
);
|
||||||
cBlockEntityList::iterator itr2 = itr;
|
cBlockEntityList::iterator itr2 = itr;
|
||||||
itr2++;
|
itr2++;
|
||||||
m_BlockEntities.erase(itr);
|
|
||||||
delete *itr;
|
delete *itr;
|
||||||
|
m_BlockEntities.erase(itr);
|
||||||
itr = itr2;
|
itr = itr2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user