ActivityPromotion - 根据玩家的活动时间进行晋升。
重要提示:由于我不再玩 Minecraft,我已停止开发此插件。
该插件现已不再活跃。如果您想继续或重新开始,请随意查看代码。
版本:v0.5.5
关于最近更改的说明
v0.5.4 - v0.5.5
我修复了拼写错误,请在配置文件中将其更改为:"necessaryGroup",而不是 "neccesaryGroup"。
我在配置文件中实现了两个新变量:"promotionCheck" 和 "resetCheck"。
它们用于确定任务应运行的时间段。10 表示每 10 秒运行一次。
请根据您的需要进行调整。
我还实现了 MYSQL 支持,但我尚未完全测试它。请在论坛中报告任何错误。
注意
此插件需要 Vault 作为权限和经济接口!
您必须下载 Vault 才能使此插件正常工作。
我是一家德国 Minecraft 服务器的所有者,我们的服务器上有自动晋升的需求。
目前没有其他插件提供相同的功能,因此我创建了此插件。
此插件允许您根据玩家在服务器上花费的时间将玩家分配到多个组别。
这是我第一个 Bukkit 插件,所以对更新缓慢和代码质量不佳请多包涵 ;)
功能:
- 支持多世界
- 支持 Flatfile 和 MYSQL
- 集成 Vault:支持 Permissions 3、bPermissions、PEX、GroupManager、PermissionsBukkit、zPermission
- 限制晋升到特定组别
- 添加应被忽略的用户
- 定义用户应晋升的时间段
- 支持多个时间段
- 向用户添加权限
- 定义自己的活动时间段,例如 7 天、1 个月等
- 查看最后登录时间、总游戏时间和不活跃玩家
描述:
该插件将计算每个玩家的在线时长。
当玩家达到特定的时间等级时,他将被晋升到相应的组别。
重置日期后,玩家将在下一个时间段内保持当前组别
如果在此期间他不活跃,他将在下一个时间段降级。
日期将存储在 list.yml 中。
就是这样。
请参阅视频以获取更多详细信息。
命令:
- /ap
- 显示所有命令
- /ap reload
- 重新加载插件并保存当前状态
- /ap info <玩家>
- 显示该玩家的信息
- ap info
- 显示你自己的信息
权限节点:
- activitypromotion.reload
- 能够重新加载 ActivityPromotion
- activitypromotion.info
- 允许你查看自己的信息。
- activitypromotion.info.other
- 允许你查看其他玩家的信息。
- activitypromotion.loginmessage:
- 拥有此节点后,当你登录时将看到不活跃的玩家
默认情况下,OP(管理员)可以使用所有节点。
config.yml:
db:
port: 3306
enable: false
adress: 'localhost'
user: root
database: minecraft
pass: ''
promotionCheck: 10
resetCheck: 10
periods:
oneMonth:
resetActivity: true
periodTime: 1
nextReset: '2011-10-2500:00:00'
activeGroups:
- Trial
- Member
lifeTime:
resetActivity: false
periodTime: 1
activeGroups:
- VIP
nextReset: '2012-03-2210:36:00'
groups:
Trial:
startTime: 1
endTime: 40
setForFirstUse: false
permissions:
- example.permission
necessaryGroup:
promotionGroup:
- Trial
ignoreUser:
- Notch
world:
- world
Member:
startTime: 30
endTime: false
setForFirstUse: false
necessaryGroup:
- Trial
permissions:
- another.example.permission
promotionGroup:
- Member
ignoreUser:
- Notch
world:
- world
VIP:
startTime: 100
endTime: false
setForFirstUse: false
necessaryGroup:
- Member
- ^Trial
permissions:
- vip.permission
promotionGroup:
- VIP
ignoreUser:
- Notch
world:
- world
周期说明
除了 periodTime(其单位为分钟)之外,所有值的单位均为秒!
- oneMonth:
- 组名称并不重要,你可以随意填写
- resetActivity
- true
- 如果你希望定期重置时间计数,请将其设置为 true。
- 如果将其设置为 false,则视为终身周期。
- periodTime
- 1
- 在此处输入一个周期应重置的时间(以分钟为单位)。
-
- activeGroups:
- - Trial
- - Member
- 在此定义活跃的组。它们必须在 groups 部分中列出。
- nextReset
- '2012-03-22 20:16:00'
- 在首次使用插件时,你必须在此处填入一个过去的日期。
- 之后,插件将自动更新此项。
组说明
- startTime
- 100
- 玩家获得晋升所需的时间(以秒为单位)
- endTime
- false
- 玩家失去该组身份所需的时间(以秒为单位)。如果设置为 false,则表示该组没有结束时间。
- setForFirstUse
- false
- 如果你希望在服务器首次启动时将该组赋予所有玩家,请将其设置为 true。它将在一个周期结束后重置。
- neccesaryGroup:
- 玩家必须所在的组才能获得晋升。请注意,他必须处于所有列出的组中才能晋升。
- '^' 表示他在晋升前不能处于该组中。
- permissions:
- 如果你想授予权限节点而不是组,请将你的节点放在这里。
- promotionGroup:
- 这是玩家将被晋升到的权限组
- ignoreUser(忽略用户):
- 添加需要被忽略的用户
- world(世界):
- 在此处填写世界名称。请注意,必要的权限组(nessecaryGroup)将应用于所有世界。
- 因此,玩家必须在所有世界中都处于 Member 组,而不是 Trial 组,才能获得晋升。
注意:
“^”命令仅对必要权限组(nessecaryGroup)有效。
list.yml
players:
Chumper_tm:
lastLogout: 1332443720
totalTime: 130
passivePeriod:
oneMonth: 6
lifeTime: 0
timePlayed:
oneMonth: 4
lifeTime: 62
SQL
从版本 0.5.5 开始,AP 再次支持 MYSQL。
请注意,此插件不会自动创建数据表,您需要手动创建它。
代码示例如下:
CREATE TABLE `ap_player` (
`period` VARCHAR(255) NOT NULL ,
`name` VARCHAR(255) NOT NULL ,
`lastLogout` INT NULL ,
`totalTime` INT NULL ,
`passivePeriod` INT NULL ,
`timePlayed` INT NULL ,
PRIMARY KEY (`name`, `period`) )
ENGINE = InnoDB;
已知问题
卡顿?
下载与源码
GitHub 上的所有文件
GitHub 上的源码
更新日志:
- v0.5.5
- v0.5.4
- 集成了 Vault 以支持更多权限插件,并更轻松地集成经济系统
- 修复了在查询玩家信息但未找到该玩家时引发的异常
- v0.5.3
- v0.5.2
- v0.5.1
- 添加了 GroupManager 支持
- 添加了游戏内命令
- v0.5DEV
- v0.4.1
- 更新了版本号
- 修复了一个小 bug
- 实现了一些目前尚无法使用的功能
- v0.4
- 基于 CB 1317 编译
- 包含最新版本的 bPermission 和 PermissionsEx
- v0.3.3
- 修复了在使用 flatfile 时产生空指针异常的错误
- v0.3.2
- 移除了每次晋升后重新加载权限配置的操作,将其整合到 /ap reload 命令中
- 增加了 MySQL 的安全关闭机制
- v0.3.1
- v0.3
- 添加了 MySQL 支持
- 提升了性能
- 玩家状态更新频率改为每两(2)秒一次,而非每个 tick 更新
- v0.2
- 支持更多的权限插件
- 添加了 ignoreUser、endTime、default 和 permissions 配置项
- 修复了若干 bug
- v0.1
警告
尽管我已经对此插件进行了测试,但仍可能存在 Bug 和错误。
请在此处提交反馈,以便我改进插件并添加更多功能。
如果您想帮助我、改进插件或请求新功能,也请在此处留言。
待办事项
- 定时组,例如在您输入 "/ap promote <player> <group> <time>" 后设置 VIP 等限时组
- MYSQL 支持
- 定期更新 ;)
路线图:
- 支持书写周期格式,如 "1 month" 或 "6 weeks"
- 定时/VIP 组
- IConomy 支持
- 添加 MySQL 支持
ActivityPromotion - Promote players based on their activitytime.
IMPORTANT: As I am not playing minecraft anymore, i stopped developing this plugin.
This will now be unactive. If you want to continue or start over fell free to take a look at the Code.
Version: v0.5.5
Notes on the last changes
v0.5.4 - v0.5.5
I fixed the spelling mistake, please change it in the config: "necessaryGroup" instead of "neccesaryGroup".
I implemented two new variables in the config: "promotionCheck" and "resetCheck".
They are used to determine in which periods the tasks should run. 10 means every 10 seconds.
Change that according to your needs.
I also implemented MYSQL, but i haven't fully tested it yet. Please report any bugs in the forum.
Attention
This plugin needs Vault as permission and economic interface!
You have to download Vault er ein order to get this plugin to work.
I am the owner of a german minecraftserver and on our server is a need for automatic promotion.
There is nothing out there, that provides the same functionality, so i created this plugin.
This plugins allows you to put player in multiple groups, based on the time they have spend playing on the Server.
This is my first plugin for bukkit, so please be patient with updates and bad code ;)
Features:
- Multiworld support
- Supports Flatfile and MYSQL
- Vault integrated: supports Permissions 3, bPermissions, PEX, GroupManager, PermissionsBukkit, zPermission
- limit the promotion to groups
- add Users that should be ignored
- define your own period of time the user should be promoted
- multiple timeperiods possible
- add Permissions to the user
- define own ActivityPeriods like 7 days, 1 month, whatever
- See also the last logout, the total playing time and inactive players
Description:
The plugin will count the onlinetime of each player.
when a player reaches a specific timelevel, he will be promoted to the group.
After a resetdate the player will keep the groups for one more timeperiode
if he is inactive in this period, he will be degraded in the next period.
The date will be stored in the list.yml
That is all.
See the video for more details.
<h3>Commands:</h3>
- /ap
- shows all commands
- /ap reload
- reload the plugin and save actual status
- /ap info <player>
- shows information about the player
- ap info
- shows information about yourself
Permissionnodes:
- activitypromotion.reload
- able to reload ActivityPromotion
- activitypromotion.info
- Allows you to see Information about yourself.
- activitypromotion.info.other
- Allows you to see Informations about other players.
- activitypromotion.loginmessage:
- With this node you will see inactive Player when you log in
All nodes can be used by OP by default.
config.yml:
db:
port: 3306
enable: false
adress: 'localhost'
user: root
database: minecraft
pass: ''
promotionCheck: 10
resetCheck: 10
periods:
oneMonth:
resetActivity: true
periodTime: 1
nextReset: '2011-10-2500:00:00'
activeGroups:
- Trial
- Member
lifeTime:
resetActivity: false
periodTime: 1
activeGroups:
- VIP
nextReset: '2012-03-2210:36:00'
groups:
Trial:
startTime: 1
endTime: 40
setForFirstUse: false
permissions:
- example.permission
necessaryGroup:
promotionGroup:
- Trial
ignoreUser:
- Notch
world:
- world
Member:
startTime: 30
endTime: false
setForFirstUse: false
necessaryGroup:
- Trial
permissions:
- another.example.permission
promotionGroup:
- Member
ignoreUser:
- Notch
world:
- world
VIP:
startTime: 100
endTime: false
setForFirstUse: false
necessaryGroup:
- Member
- ^Trial
permissions:
- vip.permission
promotionGroup:
- VIP
ignoreUser:
- Notch
world:
- world
Explanation for the periods
Except for periodTime (which values are in minutes) all values have to be in seconds!
- oneMonth:
- the name for the group doesn't really matter, put in what you like
- resetActivity
- true
- If you want to reset the timecount every now and then, set this to true.
- If you set this to false it wil count as a lifetime period.
- periodTime
- 1
- Put here the time in MINUTES after a period should be resetted.
-
- activeGroups:
- - Trial
- - Member
- Define the active groups here. They have to be listed in the groups section.
- nextReset
- '2012-03-22 20:16:00'
- You have to put a date in the past here for the first time you use the plugin.
- After that the plugin will update this entry on its own.
Explanation for the groups
- startTime
- 100
- The time in seconds after a player will be promoted
- endTime
- false
- The time in seconds after a player will get this group removed, if set to false it means this group has no endtime
- setForFirstUse
- false
- If you want to give this group every player on the server on the first start, set this to true. it will reset after one period is over.
- neccesaryGroup:
- The groups the player has to be in to get promoted. Please be aware that he has to be in ALL Groups to get promoted.
- '^' Means, that he must not be in this group to get promoted.
- permissions:
- If you want to grant permission nodes instead of groups put your nodes here.
- promotionGroup:
- This are the groups the player will be promoted to
- ignoreUser:
- Add Users that shoud be ignored
- world:
- Put the worlds here. Please be aware, that the nessecaryGroup will apply on all worlds.
- So the player has to be in Member and not in Trial in ALL worlds to get promoted.
Attention:
The "^" command will only work for nessecaryGroup.
list.yml
players:
Chumper_tm:
lastLogout: 1332443720
totalTime: 130
passivePeriod:
oneMonth: 6
lifeTime: 0
timePlayed:
oneMonth: 4
lifeTime: 62
SQL
Since version 0.5.5 AP supports MYSQL again.
Please note that this plugin will NOT create the table, instead you have to create it.
The code looks like this:
CREATE TABLE `ap_player` (
`period` VARCHAR(255) NOT NULL ,
`name` VARCHAR(255) NOT NULL ,
`lastLogout` INT NULL ,
`totalTime` INT NULL ,
`passivePeriod` INT NULL ,
`timePlayed` INT NULL ,
PRIMARY KEY (`name`, `period`) )
ENGINE = InnoDB;
Known Bugs
Lag?
Download & Source
All Files on GitHub
Source on GitHub
Changelog:
- v0.5.5
- implemented MYSQL
- fixed spelling mistake
- v0.5.4
- implemented Vault to support more permissionplugins and to easier integrate economics in further steps
- fixed exception when a player was not found after asking information about it
- v0.5.3
- fixed handling with console
- v0.5.2
- Compiled against CB1.2.4-R1.0
- v0.5.1
- Added GroupManager support
- Added Ingame commands
- v0.5DEV
- Complete rewrite, thanks to the new code base provided by bukkit.
- v0.4.1
- updated version number
- fixed a small bug
- implemented some more features that doesn't work actually
- v0.4
- Compiled against CB 1317
- Includes newest version of bPermission and PermissionsEx
- v0.3.3
- fixed an error that created nullpointerexceptions when using the flatfile
- v0.3.2
- removed Permission reload after each promotion and put it in the /ap reload command
- added secure close for mysql
- v0.3.1
- removed debug output when a player joins
- v0.3
- Added MySQL support
- improved performance
- playerupdate now every two (2) seconds instead of every tick
- v0.2
- More Permissions to support
- Added ignoreUser, endTime, default and permissions
- Bugfixing
- v0.1
Warning
Even so i tested out this plugin there sure will be Bugs and Errors.
Please post them here so i can improve the Plugin and add more Features.
If you want to help me, improve the plugin or request features please do that also here.
Todo
- timed Groups, e.g VIPs after you typed in "/ap promote <player> <group> <time>
- MYSQL support
- Regulary updates ;)
Roadmap:
- written periods like "1 month" or "6 weeks"
- timed/VIP groups
- IConomy support
- Add MySQL support
评论 0
登录后参与评分
还没有评论,来抢沙发吧