mirror of
https://e.coding.net/circlecloud/RocketJump.git
synced 2024-11-22 14:58:50 +00:00
fix: 修复命令注解错误的问题
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
3e67c29eae
commit
65e79bd6de
7
pom.xml
7
pom.xml
@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>pw.yumc</groupId>
|
<groupId>pw.yumc</groupId>
|
||||||
<artifactId>RocketJump</artifactId>
|
<artifactId>RocketJump</artifactId>
|
||||||
<version>1.3.1</version>
|
<version>1.3.2</version>
|
||||||
<name>RocketJump</name>
|
<name>RocketJump</name>
|
||||||
<description>火箭跳跃 特效Duang...</description>
|
<description>火箭跳跃 特效Duang...</description>
|
||||||
<build>
|
<build>
|
||||||
@ -65,8 +65,7 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<options>
|
<options>
|
||||||
<option>-repackageclasses ${project.groupId}.${project.artifactId}</option>
|
<option>-repackageclasses ${project.groupId}.${project.artifactId}</option>
|
||||||
<option>-keep class
|
<option>-keep class ${project.groupId}.${project.artifactId}.${project.artifactId}</option>
|
||||||
${project.groupId}.${project.artifactId}.${project.artifactId}</option>
|
|
||||||
</options>
|
</options>
|
||||||
<libs>
|
<libs>
|
||||||
<lib>${java.home}/lib/rt.jar</lib>
|
<lib>${java.home}/lib/rt.jar</lib>
|
||||||
@ -76,7 +75,7 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<properties>
|
<properties>
|
||||||
<update.description>&c修复命令部分代码...</update.description>
|
<update.description>&c修复命令失效的问题...</update.description>
|
||||||
<update.changes></update.changes>
|
<update.changes></update.changes>
|
||||||
<env.GIT_COMMIT>DEBUG</env.GIT_COMMIT>
|
<env.GIT_COMMIT>DEBUG</env.GIT_COMMIT>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
package pw.yumc.RocketJump;
|
package pw.yumc.RocketJump;
|
||||||
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import cn.citycraft.PluginHelper.commands.HandlerCommand;
|
import cn.citycraft.PluginHelper.commands.HandlerCommand;
|
||||||
import cn.citycraft.PluginHelper.commands.HandlerCommands;
|
import cn.citycraft.PluginHelper.commands.HandlerCommands;
|
||||||
|
import cn.citycraft.PluginHelper.commands.InvokeCommandEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -14,21 +13,21 @@ import cn.citycraft.PluginHelper.commands.HandlerCommands;
|
|||||||
* @author 喵♂呜
|
* @author 喵♂呜
|
||||||
*/
|
*/
|
||||||
public class RocketJumpCommands implements HandlerCommands {
|
public class RocketJumpCommands implements HandlerCommands {
|
||||||
@HandlerCommand(name = "off", description = "§a开启火箭跳跃")
|
@HandlerCommand(name = "off", description = "§a开启火箭跳跃", onlyPlayerExecutable = true)
|
||||||
public void off(final CommandSender sender, final Command cmd, final String string, final String[] args) {
|
public void off(final InvokeCommandEvent e) {
|
||||||
final Player p = (Player) sender;
|
final Player p = (Player) e.getSender();
|
||||||
RocketJump.Dante.remove(p.getName());
|
RocketJump.Dante.remove(p.getName());
|
||||||
sender.sendMessage("§6[RocketJump]§4已关闭...");
|
e.getSender().sendMessage("§6[RocketJump]§4已关闭...");
|
||||||
if (p.getGameMode() == GameMode.SURVIVAL) {
|
if (p.getGameMode() == GameMode.SURVIVAL) {
|
||||||
p.setAllowFlight(false);
|
p.setAllowFlight(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@HandlerCommand(name = "on", description = "§c关闭火箭跳跃")
|
@HandlerCommand(name = "on", description = "§c关闭火箭跳跃", onlyPlayerExecutable = true)
|
||||||
public void on(final CommandSender sender, final Command cmd, final String string, final String[] args) {
|
public void on(final InvokeCommandEvent e) {
|
||||||
final Player p = (Player) sender;
|
final Player p = (Player) e.getSender();
|
||||||
RocketJump.Dante.add(p.getName());
|
RocketJump.Dante.add(p.getName());
|
||||||
sender.sendMessage("§6[RocketJump]§a火箭跳跃已开启,双击空格启动。。。");
|
e.getSender().sendMessage("§6[RocketJump]§a火箭跳跃已开启,双击空格启动。。。");
|
||||||
p.setAllowFlight(true);
|
p.setAllowFlight(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user