Compare commits

...

3 Commits

Author SHA1 Message Date
502647092 0ed4c8cd41 清理代码 去除无效else...
Signed-off-by: 502647092 <jtb1@163.com>
2015-12-12 11:56:27 +08:00
502647092 c2b6f00bc2 fix world command and add warp warps command...
Signed-off-by: 502647092 <jtb1@163.com>
2015-10-21 20:07:52 +08:00
502647092 e56e6a3134 fix relocations config...
Signed-off-by: 502647092 <jtb1@163.com>
2015-10-21 18:07:55 +08:00
8 changed files with 128 additions and 18 deletions

View File

@ -11,11 +11,6 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
@ -27,5 +22,6 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

10
pom.xml
View File

@ -35,10 +35,12 @@
<include>cn.citycraft:PluginHelper</include>
</includes>
</artifactSet>
<relocation>
<pattern>cn.citycraft.PluginHelper</pattern>
<shadedPattern>${project.groupId}.${project.artifactId}</shadedPattern>
</relocation>
<relocations>
<relocation>
<pattern>cn.citycraft.PluginHelper</pattern>
<shadedPattern>${project.groupId}.${project.artifactId}</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>

View File

@ -0,0 +1,36 @@
/**
*
*/
package cn.citycraft.SimpleEssential.command;
import org.bukkit.command.Command;
import org.bukkit.command.CommandException;
import org.bukkit.command.CommandSender;
import cn.citycraft.PluginHelper.commands.BaseCommand;
import cn.citycraft.SimpleEssential.SimpleEssential;
/**
*
*
* @author
* 20158122:04:05
*
*/
public class CommandBase extends BaseCommand {
SimpleEssential plugin;
/**
* @param name
*/
public CommandBase(final SimpleEssential main) {
super("warps");
this.plugin = main;
setDescription("查看所有地表");
}
@Override
public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
sender.sendMessage("§c当前功能暂未开发...");
}
}

View File

@ -31,16 +31,15 @@ public class CommandHat extends BaseCommand {
if (p.getItemInHand() == null) {
sender.sendMessage(I18n.p("Hat.empty"));
return;
} else {
final ItemStack hand = p.getItemInHand();
p.setItemInHand(null);
final ItemStack helmet = p.getInventory().getHelmet();
if (!(helmet == null)) {
p.getInventory().addItem(helmet);
}
p.getInventory().setHelmet(hand);
sender.sendMessage(I18n.p("Hat.enjoy"));
}
final ItemStack hand = p.getItemInHand();
p.setItemInHand(null);
final ItemStack helmet = p.getInventory().getHelmet();
if (!(helmet == null)) {
p.getInventory().addItem(helmet);
}
p.getInventory().setHelmet(hand);
sender.sendMessage(I18n.p("Hat.enjoy"));
}
}

View File

@ -0,0 +1,38 @@
/**
*
*/
package cn.citycraft.SimpleEssential.command;
import org.bukkit.command.Command;
import org.bukkit.command.CommandException;
import org.bukkit.command.CommandSender;
import cn.citycraft.PluginHelper.commands.BaseCommand;
import cn.citycraft.SimpleEssential.SimpleEssential;
/**
*
*
* @author
* 20158122:04:05
*
*/
public class CommandWarp extends BaseCommand {
SimpleEssential plugin;
/**
* @param name
*/
public CommandWarp(final SimpleEssential main) {
super("warp");
this.plugin = main;
setMinimumArguments(1);
setPermission("se.warp");
setDescription("传送至地标");
}
@Override
public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
sender.sendMessage("§c当前功能暂未开发...");
}
}

View File

@ -0,0 +1,36 @@
/**
*
*/
package cn.citycraft.SimpleEssential.command;
import org.bukkit.command.Command;
import org.bukkit.command.CommandException;
import org.bukkit.command.CommandSender;
import cn.citycraft.PluginHelper.commands.BaseCommand;
import cn.citycraft.SimpleEssential.SimpleEssential;
/**
*
*
* @author
* 20158122:04:05
*
*/
public class CommandWarps extends BaseCommand {
SimpleEssential plugin;
/**
* @param name
*/
public CommandWarps(final SimpleEssential main) {
super("warps");
this.plugin = main;
setDescription("查看所有地表");
}
@Override
public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
sender.sendMessage("§c当前功能暂未开发...");
}
}

View File

@ -49,6 +49,7 @@ public class CommandWorld extends BaseCommand {
}
sender.sendMessage(I18n.p("World.info", wd.getName(), wd.getEnvironment().toString(), wd.getLoadedChunks().length, wd.getEntities().size(), tileEntities, wd.getPlayers().size()));
}
break;
case 1:
final World wd = Bukkit.getWorld(args[0]);
if (wd != null) {
@ -60,6 +61,7 @@ public class CommandWorld extends BaseCommand {
} else {
sender.sendMessage(I18n.p("World.unknow", args[1]));
}
break;
}
}
}

View File

@ -0,0 +1 @@
warps: