summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-12-29 23:01:38 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2020-12-30 13:15:19 +0100
commit90ce4ed2b8ac47bd6f528815e6c21f0128e71dba (patch)
tree2a89648e6e454747d048cd1c9943fcc7b4c92436 /src
parentAvoid an std::list in StreamNextChunk (diff)
downloadcuberite-90ce4ed2b8ac47bd6f528815e6c21f0128e71dba.tar
cuberite-90ce4ed2b8ac47bd6f528815e6c21f0128e71dba.tar.gz
cuberite-90ce4ed2b8ac47bd6f528815e6c21f0128e71dba.tar.bz2
cuberite-90ce4ed2b8ac47bd6f528815e6c21f0128e71dba.tar.lz
cuberite-90ce4ed2b8ac47bd6f528815e6c21f0128e71dba.tar.xz
cuberite-90ce4ed2b8ac47bd6f528815e6c21f0128e71dba.tar.zst
cuberite-90ce4ed2b8ac47bd6f528815e6c21f0128e71dba.zip
Diffstat (limited to 'src')
-rw-r--r--src/BlockEntities/CommandBlockEntity.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/BlockEntities/CommandBlockEntity.cpp b/src/BlockEntities/CommandBlockEntity.cpp
index 6cc83ff68..c1e2cd430 100644
--- a/src/BlockEntities/CommandBlockEntity.cpp
+++ b/src/BlockEntities/CommandBlockEntity.cpp
@@ -169,7 +169,7 @@ void cCommandBlockEntity::Execute()
}
class CommandBlockOutCb :
- public cCommandOutputCallback
+ public cLogCommandDeleteSelfOutputCallback
{
cCommandBlockEntity * m_CmdBlock;
@@ -182,7 +182,7 @@ void cCommandBlockEntity::Execute()
m_CmdBlock->SetLastOutput(cClientHandle::FormatChatPrefix(m_CmdBlock->GetWorld()->ShouldUseChatPrefixes(), "SUCCESS", cChatColor::Green, cChatColor::White) + a_Text);
m_CmdBlock->GetWorld()->BroadcastBlockEntity(m_CmdBlock->GetPos());
}
- } CmdBlockOutCb(this);
+ };
AString RealCommand = m_Command;
@@ -203,7 +203,7 @@ void cCommandBlockEntity::Execute()
{
cServer * Server = cRoot::Get()->GetServer();
LOGD("cCommandBlockEntity: Executing command %s", m_Command.c_str());
- Server->QueueExecuteConsoleCommand(RealCommand, CmdBlockOutCb);
+ Server->QueueExecuteConsoleCommand(RealCommand, *new CommandBlockOutCb(this));
}
else
{