jobs

#6 - published 2 years ago

Jobs

This plugin was built from scratch to give something to those role play servers that can’t afford to buy the jobs plugin from Trojaner.

Some ideas (like the admin command to control the jobs) were taken from Trojaner’s jobs plugin.

Configuration:

Configuration Description
AnnounceJobJoin Self-descriptive. This setting will allow to announce when a player joins a job.
EnablePlugin Self-descriptive. This setting will enable or disable the plugin.
PublicJobs Set or group of jobs that are “public”, that meaning anybody can join and leave them at any time.
PrivateJobs Set or group of jobs that are “private”, that meaning that a player in the LeaderPermissionGroup specified has to accept them.
JobName (private and public) Self-descriptive, the name of the job.
PermissionGroup (private and public) Self-descriptive, the group in the permissions file that this job will use.
LeaderPermissionGroup (private only) This is the group of the leader of the private job. The leader should be able to accept players when they request to join, so make sure that this is not the same as the PermissionGroup for the job.

Permissions:

Command What it does Permission
/jobs Lists the available jobs jobs
/joinjob Joins or applies to a job joinjob
/leavejob Leaves your current job leavejob
/acceptjob Accepts an applicant into the job acceptjob
/jobadmin Controls the jobs and allows to clear a job or force someone into a job jobadmin

Translation:

(too long to list here, see the translation tab below OR THE FILE DIRECTLY)

Notes:

For this plugin to work you MUST create the permissions/commands for the jobs in the permission file of rocket FIRST.

Build #4 fixed errors with ALL of the commands. If one of them doesn’t work please make sure you have everything CORRECTLY set-up. I’ve tested this plugin on my own server with correct configuration and it works. I would love if people could report issues with incorrect configuration so that I can make sure on future builds to fix the issues.

Since Build #3, anyone who used build #1 and #2 SHOULD regenerate the translations file due to a change in it.

Examples:

Example permissions file.
Example plugin config file linked to the permissions file above.

Youtube Video On How To Configure:

Please report any bugs that you find and feel free to submit any suggestions.

If you like my work, feel free to donate with either of these options:
Bitcoin address found in my keybase profile
or
Paypal

Default configuration


<?xml version="1.0" encoding="utf-8"?>
<RocketJobsConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <AnnounceJobJoin>false</AnnounceJobJoin>
  <EnablePlugin>true</EnablePlugin>
  <PublicJobs>
    <Jobs>
      <JobName>Taxi</JobName>
      <PermissionGroup>Taxi</PermissionGroup>
    </Jobs>
    <Jobs>
      <JobName>Cook</JobName>
      <PermissionGroup>Cook</PermissionGroup>
    </Jobs>
    <Jobs>
      <JobName>Trader</JobName>
      <PermissionGroup>Trader</PermissionGroup>
    </Jobs>
    <Jobs>
      <JobName>Farmer</JobName>
      <PermissionGroup>Farmer</PermissionGroup>
    </Jobs>
  </PublicJobs>
  <PrivateJobs>
    <PrivateJobs>
      <JobName>Military</JobName>
      <PermissionGroup>Military</PermissionGroup>
      <LeaderPermissionGroup>Military Leader</LeaderPermissionGroup>
    </PrivateJobs>
    <PrivateJobs>
      <JobName>Police</JobName>
      <PermissionGroup>Police</PermissionGroup>
      <LeaderPermissionGroup>Police Leader</LeaderPermissionGroup>
    </PrivateJobs>
    <PrivateJobs>
      <JobName>Special Operations</JobName>
      <PermissionGroup>Spec Ops</PermissionGroup>
      <LeaderPermissionGroup>Spec Ops Leader</LeaderPermissionGroup>
    </PrivateJobs>
    <PrivateJobs>
      <JobName>Gun Seller</JobName>
      <PermissionGroup>Guns</PermissionGroup>
      <LeaderPermissionGroup>Guns Leader</LeaderPermissionGroup>
    </PrivateJobs>
  </PrivateJobs>
</RocketJobsConfiguration>

Default english translation


<?xml version="1.0" encoding="utf-8"?>
<Translations xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Translation Id="list_usage" Value="/jobs &lt;private | public&gt; &lt;page&gt;" />
  <Translation Id="join_apply_usage" Value="/jjob &lt;job name&gt;" />
  <Translation Id="accept_usage" Value="/ajob &lt;player name&gt;" />
  <Translation Id="admin_usage" Value="/joba &lt;add | remove | clear&gt; &lt;job name&gt; &lt;player name&gt;" />
  <Translation Id="format_error" Value="Unable to convert {0} to a number." />
  <Translation Id="overflow_error" Value="{0} is too big of a number." />
  <Translation Id="next_page_notification" Value="Next page: &quot;/Jobs {0} {1}&quot;." />
  <Translation Id="pub_job_notification" Value="{0}" />
  <Translation Id="priv_job_notification" Value="{0}" />
  <Translation Id="end_of_list" Value="You have reached the end of the {0} jobs." />
  <Translation Id="unexistant_page" Value="That page does not exist." />
  <Translation Id="error_already_in_a_job" Value="You already are in a job!" />
  <Translation Id="error_already_in_a_job_admin" Value="You cannot make a player have 2 jobs!" />
  <Translation Id="error_leader_of_a_job" Value="You are the leader of a job, and may not join other jobs!" />
  <Translation Id="error_leader_of_a_job_admin" Value="That player is the leader of a job and may not join other jobs." />
  <Translation Id="error_already_applying" Value="You are still applying to another job!" />
  <Translation Id="error_leader_offline" Value="Unable to send request to join {0}, no leader is online." />
  <Translation Id="error_job_not_found" Value="Unable to find a job known as {0}" />
  <Translation Id="error_not_in_a_job" Value="You have not yet joined a job!" />
  <Translation Id="error_player_not_applying" Value="That player is not applying to your job." />
  <Translation Id="error_invalid_job_in_storage" Value="Stored job that player was applying to does not exist anymore." />
  <Translation Id="error_not_leader_of_job" Value="You are not the leader of {0}. You may not accept that request." />
  <Translation Id="error_player_not_in_job" Value="Unable to remove player from the job {0}." />
  <Translation Id="error_contact_admin" Value="An error has occured, please contact an admin about this." />
  <Translation Id="notification_quiet_joined_job" Value="You have joined the job {0}." />
  <Translation Id="notification_quiet_joined_job_admin" Value="{0} has joined the job {1}." />
  <Translation Id="notification_global_joined_job" Value="{0} has joined the job {1}." />
  <Translation Id="notification_player_applying" Value="{0} wants to join your job." />
  <Translation Id="notification_applied_to_job" Value="You have sent a request to join the job {0}." />
  <Translation Id="notification_left_job" Value="You left the job {0}." />
  <Translation Id="notification_accepted_application" Value="You have accepted the application of {0}." />
</Translations>

Commands and permissions


/acceptjob <player name>

Permissions: acceptjob

Accepts a join request to your group.


/jobadmin <add | remove | clear> <job name> <player name>

Permissions: jobadmin

Administers jobs for players. Overrides most of the things.


/leavejob

Permissions: leavejob

Leaves the job you are currently in.


/joinjob <job name>

Permissions: joinjob

Joins a public job or applies to a private job.


/jobs <private | public> <page number>

Permissions: jobs

Lists the available jobs.


Git changelog


c0d3c2daf440f30 2017-04-02 16:04:13

Build #6

  • Patched issue with `/jobadmin clear <job name>`
  • Patched issue with `/jobs <private | public> <page>` throwing an error
  • on the last page.

4558e22b4e6d011 2017-03-29 16:18:51

Add version display

    53627b0a1401f48 2017-03-28 20:49:19

    Bug Fixes

    • Fixed most of the bugs that happened in the plugin.

    59f27e567419411 2017-03-28 13:06:46

    Fix

    • Fixed missing translation values.
    • Removed unused translation.

    0669db694a52c30 2017-03-28 08:48:20

    Fix error when group doesn't exist.

      a3b9a3a0bc9b923 2017-03-28 08:31:09

      First Release

        Download

        Build #6
        By downloading this file, you agree to our license terms.

        Repository

        github.com

        License

        MIT

        Author

        persiafighter