- 欢迎来到Minecraft插件百科!
- 对百科编辑一脸懵逼?帮助:快速入门带您快速熟悉百科编辑!
- 因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289
“ServerTutorialPlus”的版本间的差异
Qsefthuopq(讨论 | 贡献) |
Qsefthuopq(讨论 | 贡献) 小 |
||
(未显示同一用户的1个中间版本) | |||
第1行: | 第1行: | ||
− | + | 完整内容请查看MCBBS搬运帖:https://www.mcbbs.net/thread-797597-1-1.html | |
=介绍= | =介绍= | ||
=特点= | =特点= | ||
第25行: | 第25行: | ||
* 生成烟花 | * 生成烟花 | ||
* 添加药水效果 | * 添加药水效果 | ||
+ | =汉化= | ||
+ | 由qsefthuopq汉化 | ||
+ | ==配置== | ||
+ | # Server tutorial | ||
+ | # by MartenM | ||
+ | # Chinese translation | ||
+ | # by qsefthuopq | ||
+ | no permission command: '&c你没有权限执行这个指令.' | ||
+ | no permission tutorial: '&c你没有权限查看这个教程.' | ||
+ | enable first join tutorial: false | ||
+ | first join tutorial id: '' | ||
+ | language: Chinese | ||
+ | npc: | ||
+ | remove-invalid: true | ||
+ | retry-time: 5 | ||
+ | datasource: | ||
+ | mysql: | ||
+ | enabled: false | ||
+ | username: root | ||
+ | password: root | ||
+ | host: localhost | ||
+ | database: minecraft | ||
+ | |||
+ | ==语言文件== | ||
+ | invalid-args: '&c无效指令! 输入 /st help 查看帮助.' | ||
+ | no-permissions: '&c你没有权限这么做!' | ||
+ | player-only-command: '&c这个是玩家才能用的指令!' | ||
+ | 'yes': '&a&l是' | ||
+ | 'no': '&c&l否' | ||
+ | add: '&a&l添加' | ||
+ | clear: 清除 | ||
+ | completed: 已完成 | ||
+ | uncompleted: 未完成 | ||
+ | times-played: 播放次数 | ||
+ | amount-of-points: 步骤数 | ||
+ | permission: 权限 | ||
+ | id: ID | ||
+ | invisible: 隐身 | ||
+ | time: Time | ||
+ | seconds: 秒 | ||
+ | chat-messages: 聊天信息 | ||
+ | reward-commands: 指令奖励 | ||
+ | npc-type: NPC类型 | ||
+ | servertutorial-id: 服务器教程ID | ||
+ | action-cancelled: '&e行动已被取消' | ||
+ | nothhing-to-cancel: '&c没有可以取消的东西!' | ||
+ | player-lookup: '&a&l查看玩家' | ||
+ | lookup-set-unfinished: '&c[未完成设置]' | ||
+ | lookup-set-finished: '&e[完成设置]' | ||
+ | lookup-set-unfinished-message: '&c点击设置教程状态为 &c未完成' | ||
+ | lookup-set-finished-message: '&c点击设置教程状态为 &a已完成' | ||
+ | tutorial-created: '&a成功创建ID为&e %id% 的服务器教程' | ||
+ | tutorial-removed: '&a成功移除ID为&e %id% 的服务器教程' | ||
+ | tutorial-id-not-found: '&c找不到这个ID的教程.' | ||
+ | command-hastobe-number: '&c索引必须是一个数字' | ||
+ | command-invalid-index: '&c那不是一个有效的索引.' | ||
+ | command-succesfully-left: '&a成功退出教程.' | ||
+ | command-quit-notin: '&4你加入了教程.' | ||
+ | command-setblock-fail: '&c创建方块失败. 不要离你想要设置的方块太远!' | ||
+ | command-setblock-succes: '&a成功创建喜难度教程方块. 方块种类: &e%type%&a 服务器教程ID: &e%id%' | ||
+ | command-setting-set: '&a成功设置教程ID为&e %id%的 &e%setting%&a ' | ||
+ | command-setting-rewards-clear: '&a成功清除所有指令奖励.' | ||
+ | command-setting-rewards-added: '&a成功添加指令.' | ||
+ | command-setting-rewards-removed: '&a成功删除指令奖励.' | ||
+ | command-switch-successful: '成功交互步骤 %1% 和 %2%' | ||
+ | command-move-successful: '成功移动 %1% 到 %2% 的前面' | ||
+ | command-argument-available: '&a可用参数: &7%args%' | ||
+ | command-editall-canbe: '&e可批量编辑的参数: &7%args%' | ||
+ | command-editall-succes: '&a成功编辑所有步骤' | ||
+ | command-lookup-define-player: '&e查看一名玩家的状态. &7/st player <玩家名>' | ||
+ | command-lookup-uuid-error: '&c无法获得目标玩家的UUID. 你确定这个玩家登录过你的服务器?' | ||
+ | command-lookup-never-played: '&c那个玩家没有加入过你的服务器.' | ||
+ | command-lookup-set: '&a成功设置教程状态为已完成.' | ||
+ | command-lookup-unset: '&c成功设置教程状态为未完成.' | ||
+ | command-lookup-set-error: '&c这名玩家已经完成了这个教程.' | ||
+ | command-lookup-unset-error: '&c这名玩家还没有完成这个教程.' | ||
+ | event-block-remove: '&c你没有权限删除这个教程方块.' | ||
+ | event-block-removed: '&a成功移除教程方块!' | ||
+ | reload-stoptutorial: '&c由于插件重载你所以你的教程取消了.' | ||
+ | reload-succes: '&a成功重载插件.' | ||
+ | potion-effect-time: '&e药水效果时间: &7%ticks%&e ticks - &7%seconds%&e 秒 (20 | ||
+ | ticks = 1 秒)' | ||
+ | potion-effect-notime: '&e未给定时间.将使用point time' | ||
+ | potion-effect-amplifier: '药水效果倍数: %amp%' | ||
+ | potion-effect-wrong-usage-1: '&c错误用法. 手持药水并输入指令: &7/st edit <id> <point> add potion <time> <level>' | ||
+ | potion-effect-wrong-usage-2: '&c或输入: &7/st edit <id> <point> add potion <potioneffect> <time (s)> <level>' | ||
+ | firework-remove-info: '&e这个指令移除最近的烟花. 无需更多参数.' | ||
+ | firework-remove-failed: '&c找不到1000格内的烟花.' | ||
+ | firework-add-wrongusage: '&c错误用法. 你需要手持烟花.' | ||
+ | current-time: '当前时间: %time%' | ||
+ | title-notitle-set: '&c这个步骤没有设置标题.请在定时前设置.' | ||
+ | title-current: '&e当前类型: &a%type%&e 持续世界: &a%ticks%&e ticks.' | ||
+ | setting-edited: '&a成功编辑设置: &e%setting%' | ||
+ | save-succes: '&a成功 保存所有教程和方块.' | ||
+ | point-removed: '&a成功移除步骤&e %id%' | ||
+ | point-invalid-type: '&c无效的步骤类型!' | ||
+ | point-example-command-click: '&e点击显示&a%type%&e 步骤指令' | ||
+ | point-example-message: '&e点击以下选项来显示正确的指令: ' | ||
+ | point-added: '&a成功添加新的步骤.' | ||
+ | info-none-existing: '&e服务器目前还没有教程.' | ||
+ | info-more-info: '&7&i用 /st info <id> 来获取更多信息.' | ||
+ | npc-id-exists: '&c已经存在这个ID的NPC了!' | ||
+ | npc-tested-mobs: '&e测试怪物: &7' | ||
+ | npc-wrong-type: '&c无效实体类型. ''&e%type%&c'' (不存在)' | ||
+ | npc-living-type: '&c实体必须是生物!' | ||
+ | npc-creation-success: '成功创建ID为&e%id%&a的NPC来播放教程: &e%tutorial%' | ||
+ | npc-selection-cancelled: '&c取消选择NPC.' | ||
+ | npc-selection-message: '&e右键一个NPC来选择. &7(或再次输入指令来退出选择模式)' | ||
+ | npc-id-not-existing: '&c没有ID为&e%id%的NPC' | ||
+ | npc-removed-succes: '&a成功移除NPC!' | ||
+ | npc-text-change: '&a成功改变信息!' | ||
+ | npc-height-change: '&a成功改变高度!' | ||
+ | npc-info-none: '&e没有NPC!' | ||
+ | npc-info-more-info: '&7&i用 /st npc info <id> 来获取更多信息.' | ||
+ | help-help: 显示帮助页面. | ||
+ | help-create: 创建新的服务器教程. | ||
+ | help-remove: 移除一个服务器教程. | ||
+ | help-addpoint: 给一个教程添加新的步骤. | ||
+ | help-removepoint: 从一个教程内移除一个步骤 | ||
+ | help-edit: 编辑服务器教程设置. | ||
+ | help-editpoint: 编辑教程步骤. | ||
+ | help-editall: 编辑一个教程的所有步骤. | ||
+ | help-info: 显示服务器教程信息. | ||
+ | help-player: 显示玩家信息 | ||
+ | help-gui: 打开很有用的教程菜单. | ||
+ | help-play: 开始一个教程. | ||
+ | help-quit: 退出一个教程. | ||
+ | help-playpoint: 开始教程的一个步骤. | ||
+ | help-setblock: 设置右键触发教程的方块. | ||
+ | help-npc: 生成右键触发教程的NPC. | ||
+ | help-reload: 保存当前数据并重载. | ||
+ | error-wait-to-end: '&c请等待当前步骤结束!' | ||
+ | error-player-offline: '&c玩家不在线!' | ||
+ | error-person-in-tutorial: '&c那个玩家已经加入了教程!' | ||
+ | error-wait-to-end-tutorial: '&c请等待当前教程结束.' | ||
+ | error-atleast-one-word: '&c你最少也得说点话吧.' | ||
+ | error-no-index: '&c请输入一个有效的索引.' | ||
+ | error-notexisting-index: '&c那个索引不存在.' | ||
+ | error-invalid-point: '&c请输入一个有效的教程步骤.' | ||
+ | error-editall: '&c无法设置. 已停止编辑步骤.' | ||
+ | error-invalid-number: '&c无效数值.' | ||
+ | error-failed-finding-tutorial: 寻找服务器教程失败... | ||
+ | error-failed-finding-tutorial-admin: '&c找不到ID为&e%id%&c的服务器教程. 如出错请联系服务器管理员.' | ||
+ | error-invalid-effect: '&c无效药水效果.' | ||
+ | error-invalid-time: '&c这不是一个有效的世界. (时间以秒为单位)' | ||
+ | error-invalid-amplifier: 这不是一个有效的倍数. | ||
+ | tip-editpoint: '&7[&aTIP&7] 如果你想要编辑一个步骤, 请使用 /st editpoint' | ||
+ | wrong-command-format: '&c错误用法, 请使用形如以下的指令: &7' | ||
+ | unkown-argument: '&c未知参数. 你想输入的可能是: &7' | ||
+ | player-not-found: '&c无法在服务器内找到这名玩家.' | ||
+ | |||
=教程= | =教程= | ||
− | + | 本页面 | |
=权限= | =权限= | ||
* //Command permissions | * //Command permissions | ||
第70行: | 第221行: | ||
* /st editpoint <id> <point> <args> | * /st editpoint <id> <point> <args> | ||
=API= | =API= | ||
− | Server Tutorial Plus | + | ==ServerTutorialApi== |
− | + | Server Tutorial Plus 提供一个简单但实用的API. | |
+ | public class ServerTutorialApi { | ||
+ | /** | ||
+ | * Starts a server tutorial for the defined player. | ||
+ | * Returns true if the tutorial has been started. False in all other cases | ||
+ | * @param id Id of the server tutorial. | ||
+ | * @param player The player. | ||
+ | * @return A boolean that represents if the tutorial has been started. | ||
+ | */ | ||
+ | public boolean startTutorial(String id, Player player){ | ||
+ | |||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Returns if the player is currently in a server tutorial. | ||
+ | * @param uuid The players UUID | ||
+ | * @return A boolean | ||
+ | */ | ||
+ | public boolean isInTutorial(UUID uuid){ | ||
+ | |||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Get the current servertutorial of a player. | ||
+ | * @param uuid The UUID of the player | ||
+ | * @return The servertutorial or null if not in one. | ||
+ | */ | ||
+ | public ServerTutorial getCurrentTutorial(UUID uuid){ | ||
+ | |||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Gets the controller object that manges the players tutorial. | ||
+ | * @param uuid | ||
+ | * @return The controller object. Null if not in a tutorial. | ||
+ | */ | ||
+ | public TutorialController getController(UUID uuid){ | ||
+ | |||
+ | } | ||
+ | |||
+ | /** | ||
+ | * This method is used to fetch the API with ease. | ||
+ | * @return An Api Object | ||
+ | */ | ||
+ | public static ServerTutorialApi getApi(){ | ||
+ | |||
+ | } | ||
+ | } | ||
+ | 只需输入以下代码就可得到class: | ||
+ | ServerTutorialApi stApi = ServerTutorialApi.getApi(); | ||
+ | //TODO: Store this somewhere for easy acces. | ||
+ | ==事件== | ||
+ | 这个API也提供给你可以监听的事件. | ||
+ | @EventHandler | ||
+ | public void handlestart(TutorialStartEvent event){ | ||
+ | |||
+ | } | ||
+ | |||
+ | @EventHandler | ||
+ | public void handlestop(TutorialEndEvent event){ | ||
+ | |||
+ | } | ||
+ | |||
+ | @EventHandler | ||
+ | void handlePlayPoint(TutorialPlayPointEvent event){ | ||
+ | |||
+ | } | ||
=目标= | =目标= | ||
☐ 支持1.8 <br /> | ☐ 支持1.8 <br /> | ||
☐ 新的步骤类型<br /> | ☐ 新的步骤类型<br /> | ||
− | + | ☑ 语言文件<br /> | |
☑ 支持更多自定义步骤. (优先度)<br /> | ☑ 支持更多自定义步骤. (优先度)<br /> | ||
☑ 重写编辑指令.<br /> | ☑ 重写编辑指令.<br /> |
2020年3月17日 (二) 16:17的最新版本
完整内容请查看MCBBS搬运帖:https://www.mcbbs.net/thread-797597-1-1.html
目录
介绍
特点
- 为你的服务器创造教程.
- 每个教程可分为不同步骤.
- 每一步独一无二的设置.
- 在玩家第一次完成教程时给予奖励. (支持MySql)
- 在玩家第一次加入服务器的时候开始教程.
- 右键方块开始教程.
- 点击NPC开始教程.
- 游戏内编辑器 (指令)
- 记录每个教程的书籍.
- 独立的教程权限.
- 简单上手.
- 轻量. 没有在后台运行的线程.
- 支持 PlaceholderAPI
教程步骤选项
- 发送标题
- 发送聊天信息
- 发送Actionbar信息
- 播放音效
- 设置玩家为飞行模式
- 冻结玩家
- 执行指令
- 生成烟花
- 添加药水效果
汉化
由qsefthuopq汉化
配置
# Server tutorial # by MartenM # Chinese translation # by qsefthuopq no permission command: '&c你没有权限执行这个指令.' no permission tutorial: '&c你没有权限查看这个教程.' enable first join tutorial: false first join tutorial id: language: Chinese npc: remove-invalid: true retry-time: 5 datasource: mysql: enabled: false username: root password: root host: localhost database: minecraft
语言文件
invalid-args: '&c无效指令! 输入 /st help 查看帮助.' no-permissions: '&c你没有权限这么做!' player-only-command: '&c这个是玩家才能用的指令!' 'yes': '&a&l是' 'no': '&c&l否' add: '&a&l添加' clear: 清除 completed: 已完成 uncompleted: 未完成 times-played: 播放次数 amount-of-points: 步骤数 permission: 权限 id: ID invisible: 隐身 time: Time seconds: 秒 chat-messages: 聊天信息 reward-commands: 指令奖励 npc-type: NPC类型 servertutorial-id: 服务器教程ID action-cancelled: '&e行动已被取消' nothhing-to-cancel: '&c没有可以取消的东西!' player-lookup: '&a&l查看玩家' lookup-set-unfinished: '&c[未完成设置]' lookup-set-finished: '&e[完成设置]' lookup-set-unfinished-message: '&c点击设置教程状态为 &c未完成' lookup-set-finished-message: '&c点击设置教程状态为 &a已完成' tutorial-created: '&a成功创建ID为&e %id% 的服务器教程' tutorial-removed: '&a成功移除ID为&e %id% 的服务器教程' tutorial-id-not-found: '&c找不到这个ID的教程.' command-hastobe-number: '&c索引必须是一个数字' command-invalid-index: '&c那不是一个有效的索引.' command-succesfully-left: '&a成功退出教程.' command-quit-notin: '&4你加入了教程.' command-setblock-fail: '&c创建方块失败. 不要离你想要设置的方块太远!' command-setblock-succes: '&a成功创建喜难度教程方块. 方块种类: &e%type%&a 服务器教程ID: &e%id%' command-setting-set: '&a成功设置教程ID为&e %id%的 &e%setting%&a ' command-setting-rewards-clear: '&a成功清除所有指令奖励.' command-setting-rewards-added: '&a成功添加指令.' command-setting-rewards-removed: '&a成功删除指令奖励.' command-switch-successful: '成功交互步骤 %1% 和 %2%' command-move-successful: '成功移动 %1% 到 %2% 的前面' command-argument-available: '&a可用参数: &7%args%' command-editall-canbe: '&e可批量编辑的参数: &7%args%' command-editall-succes: '&a成功编辑所有步骤' command-lookup-define-player: '&e查看一名玩家的状态. &7/st player <玩家名>' command-lookup-uuid-error: '&c无法获得目标玩家的UUID. 你确定这个玩家登录过你的服务器?' command-lookup-never-played: '&c那个玩家没有加入过你的服务器.' command-lookup-set: '&a成功设置教程状态为已完成.' command-lookup-unset: '&c成功设置教程状态为未完成.' command-lookup-set-error: '&c这名玩家已经完成了这个教程.' command-lookup-unset-error: '&c这名玩家还没有完成这个教程.' event-block-remove: '&c你没有权限删除这个教程方块.' event-block-removed: '&a成功移除教程方块!' reload-stoptutorial: '&c由于插件重载你所以你的教程取消了.' reload-succes: '&a成功重载插件.' potion-effect-time: '&e药水效果时间: &7%ticks%&e ticks - &7%seconds%&e 秒 (20 ticks = 1 秒)' potion-effect-notime: '&e未给定时间.将使用point time' potion-effect-amplifier: '药水效果倍数: %amp%' potion-effect-wrong-usage-1: '&c错误用法. 手持药水并输入指令: &7/st edit <id> <point> add potion
教程
本页面
权限
- //Command permissions
- servertutorialplus.command.help
- servertutorialplus.command.create
- servertutorialplus.command.remove
- servertutorialplus.command.addpoint
- servertutorialplus.command.removepoint
- servertutorialplus.command.play
- servertutorialplus.command.player
- servertutorialplus.command.quit
- servertutorialplus.command.playpoint
- servertutorialplus.command.setblock
- servertutorialplus.command.edit
- servertutorialplus.command.npc
- servertutorialplus.command.info
- servertutorialplus.command.reload
- servertutorialplus.command.save
- //行动权限
- servertutorial.action.removeblock
- //教程权限
- servertutorialplus.tutorials.<教程ID>
指令
- /st help - 列出所有指令 (需要权限).
- /st create <id> - 创建新的教程.
- /st remove <id> - 移除一个教程.
- /st addpoint <id> - 给教程添加一个步骤.
- /st removepoint <id> <point index> - 从教程中移除一个步骤.
- /st info <optional: id> - 列出教程信息.
- /st gui - 显示GUI来查看所有教程和步骤.
- /st player <username> - 列出一个玩家的信息.
- /st play <id> (玩家名) - 执行一个教程. (玩家名可选)
- /st quit - 退出你当前的教程
- /st play <id> <point> - 执行教程的一个步骤.
- /st setblock <id> - 设置点击可开始教程的一个方块.
- /st reload - 重载插件配置. (你需要先保存教程!)
- /st save - 保存当前数据. (不要先重载!)
- /st npc <add/remove/bind/text/height> <数值>
- /st edit <id> <invisible/rewards> - 设置教程.
- /st editpoint <id> <point> <args> - 立即编辑所有步骤.
- /st editpoint <id> <point> <args>
API
ServerTutorialApi
Server Tutorial Plus 提供一个简单但实用的API.
public class ServerTutorialApi { /** * Starts a server tutorial for the defined player. * Returns true if the tutorial has been started. False in all other cases * @param id Id of the server tutorial. * @param player The player. * @return A boolean that represents if the tutorial has been started. */ public boolean startTutorial(String id, Player player){ } /** * Returns if the player is currently in a server tutorial. * @param uuid The players UUID * @return A boolean */ public boolean isInTutorial(UUID uuid){ } /** * Get the current servertutorial of a player. * @param uuid The UUID of the player * @return The servertutorial or null if not in one. */ public ServerTutorial getCurrentTutorial(UUID uuid){ } /** * Gets the controller object that manges the players tutorial. * @param uuid * @return The controller object. Null if not in a tutorial. */ public TutorialController getController(UUID uuid){ } /** * This method is used to fetch the API with ease. * @return An Api Object */ public static ServerTutorialApi getApi(){ } }
只需输入以下代码就可得到class:
ServerTutorialApi stApi = ServerTutorialApi.getApi(); //TODO: Store this somewhere for easy acces.
事件
这个API也提供给你可以监听的事件.
@EventHandler public void handlestart(TutorialStartEvent event){ } @EventHandler public void handlestop(TutorialEndEvent event){ } @EventHandler void handlePlayPoint(TutorialPlayPointEvent event){ }
目标
☐ 支持1.8
☐ 新的步骤类型
☑ 语言文件
☑ 支持更多自定义步骤. (优先度)
☑ 重写编辑指令.
☑ 绑定怪物来开始教程 (兼容citizens插件)
☑ 添加 placeholder API
☑ 右键NPC来开始教程
作者的话
如果你喜欢这个插件: 你可以在spigotmc上给这个插件一个五星. 我会很开森的 :D 我在闲余时间写出了这个插件. 我不求任何汇报, 只是希望你们喜欢这个插件, 但如果你想要支持我的话, 你可以回复我, 你也可以点击这里来捐助我: