Skip to content

Commit

Permalink
fix for commands not working for playernames containing spaces (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
SleepSpace9 authored and jojoe77777 committed Dec 10, 2017
1 parent 16ba244 commit 35f9fe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/slapper/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ public function onEntityDamage(EntityDamageEvent $event) {
if(isset($entity->namedtag->Commands)) {
$server = $this->getServer();
foreach ($entity->namedtag->Commands as $cmd) {
$server->dispatchCommand(new ConsoleCommandSender(), str_replace("{player}", $damagerName, $cmd));
$server->dispatchCommand(new ConsoleCommandSender(), str_replace("{player}", '"'.$damagerName.'"', $cmd));
}
}
}
Expand Down

0 comments on commit 35f9fe6

Please sign in to comment.