Skip to content

Commit

Permalink
Fixing minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreChaussard committed Aug 4, 2024
1 parent d422aa7 commit f1ddbea
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/fr/nocsy/mcpets/data/config/Language.java
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ public enum Language {

REQUIRES_MODELENGINE("§cThis plugin requires ModelEngine r2.3.1. It seems that this requirement is not satisfied."),

USAGE("§cThis command doesn't exist. \n§7Check out the wiki: §nhttps://alexandre-chaussard.gitbook.io/mcpets/tutorials/plugin-features/commands"),
USAGE("§cThis command doesn't exist. \n§7Check out the wiki: §nhttps://mcpets.gitbook.io/mcpets/tutorials/plugin-features/commands"),
NO_PERM("§cYou're not allowed to use this command."),
BLACKLISTED_WORLD("§cMCPets is disabled in this world."),

8 changes: 5 additions & 3 deletions src/main/java/fr/nocsy/mcpets/listeners/PetListener.java
Original file line number Diff line number Diff line change
@@ -282,9 +282,11 @@ public void death(MythicMobDeathEvent e) {
if (pet != null) {
if (!pet.isRemoved()) {
pet.despawn(PetDespawnReason.DEATH);
Player owner = Bukkit.getPlayer(pet.getOwner());
if (owner != null) {
Language.REVOKED.sendMessage(owner);
if (pet.getOwner() != null) {
Player owner = Bukkit.getPlayer(pet.getOwner());
if (owner != null) {
Language.REVOKED.sendMessage(owner);
}
}
}
}

0 comments on commit f1ddbea

Please sign in to comment.