Skip to content

Commit

Permalink
give command fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ilm9001 committed Oct 8, 2021
1 parent 2c5320c commit 8ba78d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command
}

cosmeticItem = cosmetic.getCosmeticItemStack();
((Player) sender).getInventory().addItem(cosmeticItem);
toPlayer.getInventory().addItem(cosmeticItem);
Component gave = Component.text("Gave ").color(TextColor.color(0, 255, 110))
.append(cosmetic.getCosmeticName())
.append(Component.text(" to ").color(TextColor.color(0, 255, 110))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public CosmeticFactory() {
*/
public @NotNull List<Cosmetic> getCosmeticsFromConfig() {
List<Cosmetic> cosmeticsList = new ArrayList<>();
JavaPlugin plugin = Cosmetics.getInstance();
Cosmetics.refreshCosmetics();
FileConfiguration config = Cosmetics.getCosmetics();

Expand Down

0 comments on commit 8ba78d6

Please sign in to comment.