carm-outsource / timereward Goto Github PK
View Code? Open in Web Editor NEW在线时长自动领奖插件,通过指令发放奖励,基于EasyPlugin实现。
License: GNU General Public License v3.0
在线时长自动领奖插件,通过指令发放奖励,基于EasyPlugin实现。
License: GNU General Public License v3.0
功能简述
自动领取能不能设置成一个开关 也就是说可以手动领取和自动领取
需求来源
因为我试图用菜单把他结合进去 但是条件冲突(正好就是自动领取输出内容冲突)
如果把这个问题解决完后我觉得可以更好的让这个插件结合在菜单中
功能参考(可选)
附加内容
%TimeReward_claimed_<奖励ID>% 领取之前输出为false 时间到后当玩家领取该奖励后 才能输出true
可以考虑不用NMS之类的 避免以后更新版本插件再次不兼容等等
我认为你这个插件基本解决了其他插件中的NMS问题
功能简述
当我设置30分钟的奖励时间时
一旦在线超过30分钟 服务器便提醒玩家领取奖励(在 auto-claim 关掉的前提下)
需求来源
以下为我的配置 (当打开auto-claim)
30:
name: '&f在线时长 &b30 &f分钟'
time: 1800
permission: "timereward.claim"
commands:
- 'msg %player_name% 你可以领取在线30分钟的时长奖励(命令 /zaixian)'
流程:时间到了——》tr提醒玩家领取插件——》玩家根据命令打开zaixian菜单——》菜单通过判断玩家是否实现目标来进行奖励
当 auto-claim 关掉之后 按照config的提示 “若关闭,则玩家需要手动输入指令领取奖励。”
可以得知 当我关掉后 玩家需要额外输出指令才能有以上的提示
所以我觉得可以增加一个功能 就是专门给关掉auto-claim的人用的功能:提醒玩家领取奖励
功能参考(可选)
暂时想不到
附加内容
上次发issue忘记说明这个东西了 仅说明添加auto-claim功能 忘记这个东西了
我到现在才发现更新了()虽然还没测试 看了配置文件才发现了这个东西
问题简述
输入指令报错
问题来源
[15:20:10 ERROR]: null
org.bukkit.command.CommandException: Cannot execute command 'timereward' in plugin TimeReward v1.3.0 - plugin is disabled.
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_18_R1.CraftServer.dispatchCommand(CraftServer.java:907) ~[paper-1.18.1.jar:git-Paper-198]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2289) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2100) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2081) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundChatPacket.handle(ServerboundChatPacket.java:46) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundChatPacket.a(ServerboundChatPacket.java:6) ~[?:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:56) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.18.1.jar:git-Paper-198]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:149) ~[?:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[?:?]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1413) ~[paper-1.18.1.jar:git-Paper-198]
at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:189) ~[paper-1.18.1.jar:git-Paper-198]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:122) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1391) ~[paper-1.18.1.jar:git-Paper-198]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1384) ~[paper-1.18.1.jar:git-Paper-198]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:132) ~[?:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1362) ~[paper-1.18.1.jar:git-Paper-198]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1268) ~[paper-1.18.1.jar:git-Paper-198]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.18.1.jar:git-Paper-198]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
描述一下通过哪些操作才发现的问题,如:
输入指令中显示"An internal error......."
问题简述
无法连接数据库,且已创建数据库
问题来源
预期结果(可选)
问题截图/问题报错
[08:12:50 INFO] [Console]: [TimeReward] 创建插件所需表... [08:12:50 INFO] [Console]: [TimeReward] [ERROR] 无法创建插件所需的表,请检查数据库权限。 [08:12:50 ERROR] [STDERR]: java.sql.SQLSyntaxErrorException: Invalid default value for 'update' [08:12:50 ERROR] [STDERR]: at MC-BOOTSTRAP/[email protected]/com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) [08:12:50 ERROR] [STDERR]: at MC-BOOTSTRAP/[email protected]/com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) [08:12:50 ERROR] [STDERR]: at MC-BOOTSTRAP/[email protected]/com.mysql.cj.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1335) [08:12:50 ERROR] [STDERR]: at MC-BOOTSTRAP/[email protected]/com.mysql.cj.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2085) [08:12:50 ERROR] [STDERR]: at MC-BOOTSTRAP/[email protected]/com.mysql.cj.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1246) [08:12:50 ERROR] [STDERR]: at cc.carm.plugin.timereward.lib.easysql.beecp.pool.ProxyStatement.executeUpdate(ProxyStatement.java) [08:12:50 ERROR] [STDERR]: at cc.carm.plugin.timereward.lib.easysql.action.SQLUpdateActionImpl.execute(SQLUpdateActionImpl.java:29) [08:12:50 ERROR] [STDERR]: at cc.carm.plugin.timereward.lib.easysql.action.SQLUpdateActionImpl.execute(SQLUpdateActionImpl.java:12) [08:12:50 ERROR] [STDERR]: at cc.carm.plugin.timereward.database.DataManager.initialize(DataManager.java:41) [08:12:50 ERROR] [STDERR]: at cc.carm.plugin.timereward.Main.initialize(Main.java:45) [08:12:50 ERROR] [STDERR]: at cc.carm.plugin.timereward.lib.easyplugin.EasyPlugin.onEnable(EasyPlugin.java:53) [08:12:50 ERROR] [STDERR]: at TRANSFORMER/[email protected]/org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPluginMixin.java:264) [08:12:50 ERROR] [STDERR]: at TRANSFORMER/[email protected]/org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoaderMixin.java:342) [08:12:50 ERROR] [STDERR]: at TRANSFORMER/[email protected]/org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) [08:12:50 ERROR] [STDERR]: at TRANSFORMER/[email protected]/org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugin(CraftServerMixin.java:525) [08:12:50 ERROR] [STDERR]: at TRANSFORMER/[email protected]/org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugins(CraftServerMixin.java:439) [08:12:50 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.handler$zfo000$arclight$enablePlugins(MinecraftServerMixin.java:2194) [08:12:50 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_129815_(MinecraftServerMixin.java:375) [08:12:50 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130006_(MinecraftServerMixin.java:300) [08:12:50 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.dedicated.DedicatedServer.m_7038_(DedicatedServerMixin.java:165) [08:12:50 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130011_(MinecraftServerMixin.java:2087) [08:12:50 ERROR] [STDERR]: at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_206580_(MinecraftServerMixin.java:244) [08:12:50 ERROR] [STDERR]: at java.base/java.lang.Thread.run(Thread.java:833) [08:12:50 INFO] [Console]: [TimeReward] [ERROR] 初始化数据库失败,请检查配置文件。 [08:12:50 INFO] [Console]: [TimeReward] 关闭数据库连接...
操作环境
1.19.2 Arclight Java18 /verion无效指令啊....
其他补充
`# TimeReward - 区域保护插件,将不符合条件的玩家弹出区域,基于EasyPlugin实现。
version: 1.3.0
debug: false
metrics: true
check-update: true
database:
driver: com.mysql.cj.jdbc.Driver
host: 127.0.0.1
port: 3306
database: minecraft
username: minecraft
password: 7L5JtcjdnmYbb7GR
additional: ?useSSL=false
tables:
claimed: tr_user_claimed
time: tr_user_times
rewards:
example:
name: '&f[初级奖励] &e总在线时长 2小时'
time: 7200
permission: servername.vip
commands:
- 'say &f恭喜 &b%player_name% &f领取了奖励 &r%(name) &f! '
`
问题简述
插件无法在 1.8.8 Spigot (with Java 17) 环境中正常加载
Java8同理
问题来源
预期结果(可选)
正常加载
问题截图/问题报错
[15:17:06 ERROR]: Could not load 'plugins\TimeReward-1.3.0.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.IncompatibleClassChangeError: class cc.carm.plugin.timereward.lib.easyplugin.EasyPlugin overrides final method org.bukkit.plugin.java.JavaPlugin.isInitialized()Z
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:134) ~[spigot.jar:git-iSpigot-PaperEdition]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:314) ~[spigot.jar:git-iSpigot-PaperEdition]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:246) ~[spigot.jar:git-iSpigot-PaperEdition]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(SourceFile:335) ~[spigot.jar:git-iSpigot-PaperEdition]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(SourceFile:323) ~[spigot.jar:git-iSpigot-PaperEdition]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(SourceFile:728) ~[spigot.jar:git-iSpigot-PaperEdition]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.IncompatibleClassChangeError: class cc.carm.plugin.timereward.lib.easyplugin.EasyPlugin overrides final method org.bukkit.plugin.java.JavaPlugin.isInitialized()Z
at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
at java.lang.ClassLoader.defineClass(ClassLoader.java:1012) ~[?:?]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:524) ~[?:?]
at java.net.URLClassLoader$1.run(URLClassLoader.java:427) ~[?:?]
at java.net.URLClassLoader$1.run(URLClassLoader.java:421) ~[?:?]
at java.security.AccessController.doPrivileged(AccessController.java:712) ~[?:?]
at java.net.URLClassLoader.findClass(URLClassLoader.java:420) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:102) ~[spigot.jar:git-iSpigot-PaperEdition]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:87) ~[spigot.jar:git-iSpigot-PaperEdition]
at java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
at java.lang.ClassLoader.defineClass(ClassLoader.java:1012) ~[?:?]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:524) ~[?:?]
at java.net.URLClassLoader$1.run(URLClassLoader.java:427) ~[?:?]
at java.net.URLClassLoader$1.run(URLClassLoader.java:421) ~[?:?]
at java.security.AccessController.doPrivileged(AccessController.java:712) ~[?:?]
at java.net.URLClassLoader.findClass(URLClassLoader.java:420) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:102) ~[spigot.jar:git-iSpigot-PaperEdition]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:87) ~[spigot.jar:git-iSpigot-PaperEdition]
at java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[?:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
at java.lang.Class.forName0(Native Method) ~[?:?]
at java.lang.Class.forName(Class.java:467) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:65) ~[spigot.jar:git-iSpigot-PaperEdition]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:130) ~[spigot.jar:git-iSpigot-PaperEdition]
... 6 more
操作环境
[15:18:54 INFO]: *--------------- Imanity - Software ---------------*
[15:18:54 INFO]:
[15:18:54 INFO]: This Server is currently running ImanitySpigot3
[15:18:54 INFO]: Version: 2022.11.1 LTS BUILD 3
[15:18:54 INFO]:
[15:18:54 INFO]: *--------------------------------------------------*
其他补充
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.