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"