1
0
mirror of https://e.coding.net/circlecloud/SimpleEssential.git synced 2024-11-17 01:18:47 +00:00

add new Command Ping...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092 2015-10-03 11:00:20 +08:00
parent 0170d8a666
commit bfc9200dc7
3 changed files with 42 additions and 2 deletions

View File

@ -21,6 +21,7 @@ import cn.citycraft.SimpleEssential.command.CommandEnchantBench;
import cn.citycraft.SimpleEssential.command.CommandGc;
import cn.citycraft.SimpleEssential.command.CommandHat;
import cn.citycraft.SimpleEssential.command.CommandHome;
import cn.citycraft.SimpleEssential.command.CommandPing;
import cn.citycraft.SimpleEssential.command.CommandSetHome;
import cn.citycraft.SimpleEssential.command.CommandSetSpawn;
import cn.citycraft.SimpleEssential.command.CommandSpawn;
@ -122,6 +123,7 @@ public class SimpleEssential extends JavaPlugin {
registerCommand(new CommandSpawn(this));
registerCommand(new CommandGc(this));
registerCommand(new CommandWorld(this));
registerCommand(new CommandPing(this));
}
/**

View File

@ -0,0 +1,37 @@
/**
*
*/
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;
import cn.citycraft.SimpleEssential.config.I18n;
/**
* 传送到顶部命令
*
* @author 蒋天蓓
* 2015年8月12日下午2:04:05
*
*/
public class CommandPing extends BaseCommand {
SimpleEssential plugin;
/**
* @param name
*/
public CommandPing(final SimpleEssential main) {
super("ping");
this.plugin = main;
setDescription("检测网络延时");
}
@Override
public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
sender.sendMessage(I18n.p("Ping"));
}
}

View File

@ -1,5 +1,5 @@
#本文件为基础插件的语言配置文件
version: 1.3
version: 1.4
#基础语言配置
Base:
offline: "§c玩家 %s 不存在或不在线!"
@ -42,4 +42,5 @@ World:
title: '§6当前服务器的启用的世界如下'
info: '§a%s §3- §a%s §6区块: §a%s §6实体: §a%s §6tiles: §a%s §6玩家: §a%s'
unknow: '§c未知的世界 §a%s'
Sudo: '§6玩家: §a%s §6已执行命令 §b%s'
Sudo: '§6玩家: §a%s §6已执行命令 §b%s'
Ping: '§6啪!'