From e212762951e2512f091664ff562d75b28a70fb60 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Mon, 21 Nov 2022 11:45:05 +0000 Subject: [PATCH] Fix --- .../main/kotlin/com/willfp/ecojobs/commands/CommandJobs.kt | 4 ++++ eco-core/core-plugin/src/main/resources/lang.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecojobs/commands/CommandJobs.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecojobs/commands/CommandJobs.kt index 3504f9b..d2d53d6 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecojobs/commands/CommandJobs.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecojobs/commands/CommandJobs.kt @@ -28,6 +28,10 @@ class CommandJobs(plugin: EcoPlugin) : PluginCommand(plugin, "jobs", "ecojobs.co return } + if (player.hasJob(job)) { + player.sendMessage(plugin.langYml.getMessage("dont-have-job")) + } + job.levelGUI.open(player) } diff --git a/eco-core/core-plugin/src/main/resources/lang.yml b/eco-core/core-plugin/src/main/resources/lang.yml index 98283d0..bb82eb7 100644 --- a/eco-core/core-plugin/src/main/resources/lang.yml +++ b/eco-core/core-plugin/src/main/resources/lang.yml @@ -35,6 +35,7 @@ messages: job-already-joined: "&cYou already have this job!" leave-current-job: "&cYou must leave your current job before joining a new one!" cant-leave-job: "&cYou can't leave the %job%&f job!" + dont-have-job: "&cYou don't have this job unlocked!" menu: title: "Jobs"