功能
此插件允许用户申请职位,随后由拥有相应权限的用户对其进行评分。评分基于配置文件中设定的标准,满分为 100 分。可能的自定义标准示例如下:
标准的默认评分选项包括:
申请记录会保存用户的坐标位置,任何拥有权限的用户都可以传送至该位置以查看与申请相关的建筑作品(例如)。另一个选项是记录用户当前所在地块的位置(需要依赖 PlotSquared 插件)。
当工作人员(拥有批准权限)审核了申请并给出评分后,他们可以选择批准或拒绝,从而决定是否授予该职位。
申请和评分记录可以存储在插件文件夹中的 applications.yml 文件内,也可以存储到数据库中,这同样可以在 applications.yml 文件中进行配置。
目前仅支持 PermissionsEx 和 LuckPerms 两种权限插件。同样,目前唯一支持的地块插件是 PlotSquared。
可以链接 GitLab 项目,使用其 Issue 系统来展示申请及相关内容,如坐标、渲染图链接、名称等。您还可以指定一个 Discord 频道,用于发送有关新项目的通知(包含指向 GitLab Issue 的链接,如果使用了的话),以及申请最终处理结果(批准或拒绝)的通知。
如果您有添加功能的建议,请在下方留言,我会查看并考虑
命令
/pr apply - 申请指定职位
/pr validranks [ALIASES: vr, ranks]- 显示服务器上所有职位名称
/pr rate … - 根据各项标准,为开放申请给出 0-100 的评分
/pr gotoplot [ALIASES: plot] - 传送至指定位置或地块(针对开放申请)
/pr ratings - 查看开放申请的评分(需要 pr.ratings 权限以查看其他玩家的申请)
/pr approval <name> <approve/deny> - 批准或拒绝开放申请
/pr removeapplication <name> [ALIASES: ra, remap] - 通过指定玩家名称移除开放申请
/pr version - 显示插件版本信息
/pr help - 显示插件帮助信息
/pr apphelp - 显示提交申请的帮助信息
/pr status - 显示玩家申请状态
/pr pos1 - 注册 Chunky 位置 1
/pr pos2 - 注册 Chunky 位置 2
/pr cam - 注册 Chunky 摄像机
/pr chunkysettings [ALIASES: cs] - 返回位置、区块和参数详情
/pr setparam [ALIASES: sp] - 设置 Chunky JSON 参数
/pr removeparam[ALIASES: rp] - 移除 Chunky JSON 参数
/pr viewparams <raw/list> [ALIASES: vp] - 查看当前设置的 Chunky JSON 参数
/pr clearparams [<confirm/deny>] [ALIASES: rp] - 清除所有当前设置的 chunky JSON 参数(需要确认)
权限
pr.use - 允许使用 pr 命令
pr.apply - 允许使用 /pr apply 命令
pr.validranks - 允许使用 /pr validranks 命令
pr.rate - 允许使用 /pr rate 命令
pr.gotoplot - 允许使用 /pr gotoplot 命令
pr.ratings - 允许对其他用户的申请使用 /pr ratings 命令
pr.approval - 允许使用 /pr approval 命令
pr.removeapplication - 允许使用 /pr removeapplication 命令
pr.version - 允许使用 /pr version 命令
pr.help - 允许使用 /pr help 命令
pr.apphelp - 允许使用 /pr apphelp 命令
pr.status - 允许使用 /pr status 命令
pr.pos1 - 允许使用 /pr pos1 命令
pr.pos2 - 允许使用 /pr pos2 命令
pr.cam - 允许使用 /pr cam 命令
pr.chunkysettings - 允许使用 /pr chunkysettings
pr.setparam - 允许使用 /pr setparam
pr.removeparam - 允许使用 /pr removeparam
pr.viewparams - 允许使用 /pr viewparams
pr.clearparams - 允许使用 /pr clearparams
配置与安装
将最新版本的插件拖入你的 plugins 文件夹。重启或启动服务器,配置文件将会生成。
配置文件中包含:
Discord:
Notifications: true
Use-Main-Text-Channel: false
Channel: channel_name
Player-Applications:
External-Renders:
Use-External: true
Render-Command-Prefix: rs
User-Details:
UseSQL: false
HOSTNAME: hostname
DATABASE: database name
PORT: port number
USER: username
PASS: password
Application-Settings:
Max-Application-Count: 10
In-Game-Rating: false
Use-Ranks-In-Application: false
SQL-Table: playerapplications
Use-Plot-Locations: true
Criteria:
- atmosphere
- originality
- terrain
- structure
- layout
Use-Config-Ranks: true
Application-Ranks: guest[GUEST:guest],squire,knight,baron,builder,head_builder,senior_builder
Chunky-Config:
Use-Chunky: true
Max-Camera-Count: 4
GitLab-Config:
In-Progress-Apps:
Use-GitLab: false
Logins:
Render-Link:
Render-Link-Queries: ?noFontReplace=1&limit=1
Address:
Project-ID: 1
Access-Token: accesstoken
在这里你可以指定:
- 是否使用 SQL 数据库或本地文件来存储申请数据
- 指定 SQL 数据库连接参数
- 是否使用地块位置(需要 PlotSquared 依赖)或玩家位置
- 指定申请自定义条件(需要使用 SQL 数据库)
- 指定是否在申请中使用/允许头衔等级
- 指定存储申请的 SQL 表名称
- 是否使用服务器头衔,或为申请可用性指定特定头衔
- 指定可通过申请获取的头衔(必须是服务器上有效的头衔)
- 指定每个用户的最大申请数量
- 是否导出用户设置的 Chunky 渲染参数和摄像机
- Chunky 渲染的最大摄像机数量
- 指定是否使用 Discord 通知以及发送到哪个频道
- 配置 GitLab 登录、链接和项目相关内容
SQL 数据库配置
如果您使用 SQL 数据库来存储申请,则需要遵循一些命名约定(未来将允许用户自定义):
您使用的表名必须在配置文件中设置以匹配。
列必须如下所示(将“criteria 1, criteria 2, etc”替换为您的条件名称):
settings | status | name | rank | criteria 1 | criteria 2| … | criteria n | plotloc | totalRatings | ratinglist
Chunky
Chunky 参数和摄像机会以 JSON 格式导出到 SQL 表的 "settings" 列中,您可以从此处处理它们并生成 JSON 中指定的 Chunky 渲染。
摄像机按以下方式进行标记:“camera_n”,其中 'n' 表示摄像机编号。
所有粗犷渲染参数均可通过游戏内的 /pr setparams 命令进行设置。按照仅捕获两个位置并设置摄像机的标准配置,JSON 将如下所示(任何额外参数均在导出前添加):
{
"camera_1": {
"position": {
"x": 39.26309100906894,
"y": 65.49390748022948,
"z": -236.876800963328
},
"orientation": {
"roll": 0.0,
"pitch": -0.8635957187819827,
"yaw": 0.7880137870620696
},
"projectionMode": "PINHOLE",
"fov": 90.0,
"dof": "Infinity",
"focalOffset": 2.0
},
"chunkList": [[0,-15],[0,-14],[1,-15],[1,-14],[2,-15],[2,-14]]
}
计划新增功能
- 扩展对其他权限插件的兼容性
已添加 Chunky 支持
为本地存储的应用程序和 SQL 存储应用程序提供自定义条件
Features
This plugin allows users to apply for ranks, which are then rated by users with permissions to do so. The ratings are scored of 0-100 in criteria set within the config. An example of possible custom criteria is:
The default config options for criteria are:
- Atmosphere
- Originality
- Terrain
- Structure
- Layout
The application logs the user's location and any user with permissions can teleport to the location to view a build relating to the application (for example). Another option is to log the location of the plot the user is currently in (Requires PlotSquared dependency).
When a staff member (with permissions to approve) has reviewed the application and the ratings given they can approve or deny, ultimately resulting in either the rank being granted or not.
The applications and ratings are logged either locally within the applications.yml file in the plugin folder or to a database, which can be configured within the applications.yml file too.
As it stands, currently the only permissions plugin supported are PermissionsEx and LuckPerms. Similarly, the only plot plugin supported at the moment is PlotSquared.
A GitLab project can be linked to use the issue system as a way of displaying applications and their related content such as position, render links, name, etc. You can also specify a Discord channel to send notifications to about new projects with a link to GitLab issue (if its used) and also application finalisation (approve or deny).
If you have a suggestion for a feature to be added, drop a comment below and ill have a look into it
Commands
/pr apply - Apply For The Specified Rank
/pr validranks [ALIASES: vr, ranks]- Displays All Rank Names On The Server
/pr rate … - Rate An Open Application With A Rating of 0-100 In Each Criteria
/pr gotoplot [ALIASES: plot] - Teleport To Location Or Plot Of Open Application
/pr ratings - View Ratings Of Open Application (Requires Perm pr.ratings To View Other Users Applications)
/pr approval <name> <approve/deny> - Approve Or Deny Open Applications
/pr removeapplication <name> [ALIASES: ra, remap] - Remove An Open Application By Specifying Relevant Player Name
/pr version - Displays Plugin Version Information
/pr help - Displays Plugin Help Information
/pr apphelp - Displays application submission help
/pr status - Displays player application status
/pr pos1 - Register chunky position 1
/pr pos1 - Register chunky position 2
/pr cam - Register a chunky camera
/pr chunkysettings [ALIASES: cs] - Returns position, chunk and parameter details
/pr setparam [ALIASES: sp] - Sets a chunky JSON parameter
/pr removeparam[ALIASES: rp] - Removes a chunky JSON parameter
/pr viewparams <raw/list> [ALIASES: vp] - View currently set chunky JSON parameters
/pr clearparams [<confirm/deny>] [ALIASES: rp] - Clear all currently set chunky JSON parameters (requires confirmation)
Permissions
pr.use - Allows the use of the pr command
pr.apply - Allows the use of the /pr apply command
pr.validranks - Allows the use of the /pr validranks command
pr.rate - Allows the use of the /pr rate command
pr.gotoplot - Allows the use of the /pr gotoplot command
pr.ratings - Allows the use of the /pr ratings command for other users applications
pr.approval - Allows the use of the /pr approval command
pr.removeapplication - Allows the use of the /pr removeapplication command
pr.version - Allows the use of /pr version
pr.help - allows the use of /pr help
pr.apphelp - allows the use of /pr apphelp
pr.status - allows the use of /pr status
pr.pos1 - allows the use of /pr pos1
pr.pos2 - allows the use of /pr pos2
pr.cam - allows the use of /pr cam
pr.chunkysettings - allows the use of /pr chunkysettings
pr.setparam - allows the use of /pr setparam
pr.removeparam - allows the use of /pr removeparam
pr.viewparams - allows the use of /pr viewparams
pr.clearparams - allows the use of /pr clearparams
Configuration and Installation
Drag and drop the most recent version of the plugin into your plugins folder. Restart or start the server, the config file will generate.
The config file contains:
Discord:
Notifications: true
Use-Main-Text-Channel: false
Channel: channel_name
Player-Applications:
External-Renders:
Use-External: true
Render-Command-Prefix: rs
User-Details:
UseSQL: false
HOSTNAME: hostname
DATABASE: database name
PORT: port number
USER: username
PASS: password
Application-Settings:
Max-Application-Count: 10
In-Game-Rating: false
Use-Ranks-In-Application: false
SQL-Table: playerapplications
Use-Plot-Locations: true
Criteria:
- atmosphere
- originality
- terrain
- structure
- layout
Use-Config-Ranks: true
Application-Ranks: guest[GUEST:guest],squire,knight,baron,builder,head_builder,senior_builder
Chunky-Config:
Use-Chunky: true
Max-Camera-Count: 4
GitLab-Config:
In-Progress-Apps:
Use-GitLab: false
Logins:
Render-Link:
Render-Link-Queries: ?noFontReplace=1&limit=1
Address:
Project-ID: 1
Access-Token: accesstoken
Here you can specify:
- Whether to use SQL databases or local files for application storage
- Specify SQL database connection parameters
- Whether to use plot locations (PlotSquared dependency) or player locations
- Specify custom criteria for applications (Requires SQL database use)
- Specify whether to use/allow ranks in applications
- Specify the name of the SQL table applications are stored in
- Whether to use server ranks or specify specific ranks for application availability
- Specify ranks that can be applied for via an application (must be a valid rank on the server)
- Specify the maximum application count per user
- Whether to export chunky render parameters and cameras set by users
- Maximum camera count for chunky renders
- Specify whether to use Discord notifications and which channel to send to
- Configure GitLab logins, links and project related content
SQL Database Configuration
If you are using an SQL database to store the applications, there are a few naming conventions that need to be followed (this will be user defined in the future):
The table name that you use must be set within the config file to match.
The columns must be as follows (replace 'criteria 1, criteria 2, etc' with the names of your criteria):
settings | status | name | rank | criteria 1 | criteria 2| … | criteria n | plotloc | totalRatings | ratinglist
Chunky
Chunky parameters and cameras are exported in JSON format to the SQL table column "settings", from here you can process them and generate a render of the chunky specified within the JSON.
Cameras are labelled in the following fahsion: "camera_n" where 'n' denotes the camera number.
All of the chunky parameters can be set from in game with the /pr setparams command. As a standard with just two positions captured and a camera set, the JSON will be as follows (any additional parameters are added in prior to export):
{
"camera_1": {
"position": {
"x": 39.26309100906894,
"y": 65.49390748022948,
"z": -236.876800963328
},
"orientation": {
"roll": 0.0,
"pitch": -0.8635957187819827,
"yaw": 0.7880137870620696
},
"projectionMode": "PINHOLE",
"fov": 90.0,
"dof": "Infinity",
"focalOffset": 2.0
},
"chunkList": [[0,-15],[0,-14],[1,-15],[1,-14],[2,-15],[2,-14]]
}
Planned Additions
- Expanding compatibility to other permissions plugins
Added chunky support
Custom criteria for locally stored applications and SQL stored applications
评论 0
登录后参与评分
还没有评论,来抢沙发吧