Skip to content

Commit 9887554

Browse files
authored
worked
1 parent 9cb8595 commit 9887554

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/zFastSlaying/Coins.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ public function onLogin(PlayerLoginEvent $event) {
7979

8080
$player = $event->getPlayer();
8181
$uuid = $player->getClientID();
82-
if (!is_file("/home/Lobby/eCoins/" . $player->getName() . ".yml")) {
82+
if (!is_file("/home/SkyWars/plugins/Coins/resources/" . $player->getName() . ".yml")) {
8383

84-
$playerfile = new Config("/home/Lobby/eCoins/" . $player->getName() . ".yml", Config::YAML);
84+
$playerfile = new Config("/home/SkyWars/plugins/Coins/resources/" . $player->getName() . ".yml", Config::YAML);
8585
$playerfile->set("coins", 2500);
8686
$playerfile->save();
8787

@@ -91,18 +91,18 @@ public function onLogin(PlayerLoginEvent $event) {
9191

9292
public function onCommand(CommandSender $sender, Command $command, string $label, array $args) : bool {
9393

94-
if ($command->getName() === "Coins") {
94+
if ($command->getName() === "coins") {
9595

96-
$playerfile = new Config("/home/Lobby/eCoins/" . $sender->getName() . ".yml", Config::YAML);
96+
$playerfile = new Config("/home/SkyWars/plugins/Coins/resources/" . $sender->getName() . ".yml", Config::YAML);
9797
$sender->sendMessage($this->prefix . "Du hast ".Color::GOLD . $playerfile->get("coins") . Color::WHITE . " Coins!");
9898

99-
} else if ($command->getName() === "AddCoins") {
99+
} else if ($command->getName() === "addcoins") {
100100

101101
if ($sender->isOp()) {
102102

103103
if (isset($args[0])) {
104104

105-
$playerfile = new Config("/home/Lobby/eCoins/" . $args[0] . ".yml", Config::YAML);
105+
$playerfile = new Config("/home/SkyWars/plugins/Coins/resources/" . $args[0] . ".yml", Config::YAML);
106106
$playerfile->set("coins", $playerfile->get("coins") + 10000);
107107
$playerfile->save();
108108
$sender->sendMessage(Color::GREEN . "10000 Coins gegeben!");
@@ -121,4 +121,4 @@ public function onCommand(CommandSender $sender, Command $command, string $label
121121

122122
}
123123

124-
}
124+
}

0 commit comments

Comments
 (0)