1
0
mirror of https://e.coding.net/circlecloud/RocketJump.git synced 2024-12-26 20:38:48 +00:00

fix: 修复命令注解错误的问题

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-06-05 18:10:05 +08:00
parent 3e67c29eae
commit 65e79bd6de
2 changed files with 12 additions and 14 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>pw.yumc</groupId>
<artifactId>RocketJump</artifactId>
<version>1.3.1</version>
<version>1.3.2</version>
<name>RocketJump</name>
<description>火箭跳跃 特效Duang...</description>
<build>
@ -65,8 +65,7 @@
<configuration>
<options>
<option>-repackageclasses ${project.groupId}.${project.artifactId}</option>
<option>-keep class
${project.groupId}.${project.artifactId}.${project.artifactId}</option>
<option>-keep class ${project.groupId}.${project.artifactId}.${project.artifactId}</option>
</options>
<libs>
<lib>${java.home}/lib/rt.jar</lib>
@ -76,7 +75,7 @@
</plugins>
</build>
<properties>
<update.description>&amp;c修复命令部分代码...</update.description>
<update.description>&amp;c修复命令失效的问题...</update.description>
<update.changes></update.changes>
<env.GIT_COMMIT>DEBUG</env.GIT_COMMIT>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

View File

@ -1,12 +1,11 @@
package pw.yumc.RocketJump;
import org.bukkit.GameMode;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import cn.citycraft.PluginHelper.commands.HandlerCommand;
import cn.citycraft.PluginHelper.commands.HandlerCommands;
import cn.citycraft.PluginHelper.commands.InvokeCommandEvent;
/**
*
@ -14,21 +13,21 @@ import cn.citycraft.PluginHelper.commands.HandlerCommands;
* @author
*/
public class RocketJumpCommands implements HandlerCommands {
@HandlerCommand(name = "off", description = "§a开启火箭跳跃")
public void off(final CommandSender sender, final Command cmd, final String string, final String[] args) {
final Player p = (Player) sender;
@HandlerCommand(name = "off", description = "§a开启火箭跳跃", onlyPlayerExecutable = true)
public void off(final InvokeCommandEvent e) {
final Player p = (Player) e.getSender();
RocketJump.Dante.remove(p.getName());
sender.sendMessage("§6[RocketJump]§4已关闭...");
e.getSender().sendMessage("§6[RocketJump]§4已关闭...");
if (p.getGameMode() == GameMode.SURVIVAL) {
p.setAllowFlight(false);
}
}
@HandlerCommand(name = "on", description = "§c关闭火箭跳跃")
public void on(final CommandSender sender, final Command cmd, final String string, final String[] args) {
final Player p = (Player) sender;
@HandlerCommand(name = "on", description = "§c关闭火箭跳跃", onlyPlayerExecutable = true)
public void on(final InvokeCommandEvent e) {
final Player p = (Player) e.getSender();
RocketJump.Dante.add(p.getName());
sender.sendMessage("§6[RocketJump]§a火箭跳跃已开启,双击空格启动。。。");
e.getSender().sendMessage("§6[RocketJump]§a火箭跳跃已开启,双击空格启动。。。");
p.setAllowFlight(true);
}
}