Skip to content

Commit

Permalink
fix: remove incorrect handling for VirtualCommandOrigin
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Feb 20, 2025
1 parent abe8ff0 commit 2e55636
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/bedrock/events/client_joined_event_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

#pragma once

#include "bedrock/common_types.h"
#include "bedrock/network/network_identifier.h"

struct ClientJoinedEventData {
ClientJoinedEventData(NetworkIdentifier, SubClientId);

Expand Down
6 changes: 3 additions & 3 deletions src/endstone/core/command/command_sender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ std::shared_ptr<endstone::CommandSender> CommandOrigin::getEndstoneSender() cons
return std::static_pointer_cast<endstone::Actor>(getEntity()->getEndstoneActor().shared_from_this());
}
case CommandOriginType::Virtual: {
const auto &virtual_command_origin = *static_cast<const VirtualCommandOrigin *>(this);
return endstone::core::PermissibleFactory::create<endstone::core::EndstoneProxiedCommandSender>(
getOutputReceiver().getEndstoneSender(), virtual_command_origin.getOrigin()->getEndstoneSender());
// const auto &virtual_command_origin = *static_cast<const VirtualCommandOrigin *>(this);
// return endstone::core::PermissibleFactory::create<endstone::core::EndstoneProxiedCommandSender>(
// getOutputReceiver().getEndstoneSender(), virtual_command_origin.getOrigin()->getEndstoneSender());
}
case CommandOriginType::CommandBlock:
case CommandOriginType::MinecartCommandBlock:
Expand Down

0 comments on commit 2e55636

Please sign in to comment.