MCPcopy Create free account
hub / github.com/cuberite/cuberite / SetCommandBlockCommand

Method SetCommandBlockCommand

src/World.cpp:2664–2680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2662
2663
2664bool cWorld::SetCommandBlockCommand(int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Command)
2665{
2666 class cUpdateCommandBlock : public cCommandBlockCallback
2667 {
2668 AString m_Command;
2669 public:
2670 cUpdateCommandBlock(const AString & a_Command) : m_Command(a_Command) {}
2671
2672 virtual bool Item(cCommandBlockEntity * a_CommandBlock) override
2673 {
2674 a_CommandBlock->SetCommand(m_Command);
2675 return false;
2676 }
2677 } CmdBlockCB (a_Command);
2678
2679 return DoWithCommandBlockAt(a_BlockX, a_BlockY, a_BlockZ, CmdBlockCB);
2680}
2681
2682
2683

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected