本文整理汇总了Java中net.minecraft.server.RemoteControlCommandListener类的典型用法代码示例。如果您正苦于以下问题:Java RemoteControlCommandListener类的具体用法?Java RemoteControlCommandListener怎么用?Java RemoteControlCommandListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RemoteControlCommandListener类属于net.minecraft.server包,在下文中一共展示了RemoteControlCommandListener类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getListener
import net.minecraft.server.RemoteControlCommandListener; //导入依赖的package包/类
private ICommandListener getListener(CommandSender sender) {
if (sender instanceof Player) {
return ((CraftPlayer) sender).getHandle();
}
if (sender instanceof BlockCommandSender) {
return ((CraftBlockCommandSender) sender).getTileEntity();
}
if (sender instanceof CommandMinecart) {
return ((EntityMinecartCommandBlock) ((CraftMinecartCommand) sender).getHandle()).getCommandBlock();
}
if (sender instanceof RemoteConsoleCommandSender) {
return RemoteControlCommandListener.instance;
}
if (sender instanceof ConsoleCommandSender) {
return ((CraftServer) sender.getServer()).getServer();
}
return null;
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:19,代码来源:VanillaCommandWrapper.java
示例2: sendMessage
import net.minecraft.server.RemoteControlCommandListener; //导入依赖的package包/类
@Override
public void sendMessage(String message) {
RemoteControlCommandListener.instance.sendMessage(message + "\n"); // Send a newline after each message, to preserve formatting.
}
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:5,代码来源:CraftRemoteConsoleCommandSender.java
示例3: sendMessage
import net.minecraft.server.RemoteControlCommandListener; //导入依赖的package包/类
@Override
public void sendMessage(String message) {
RemoteControlCommandListener.getInstance().sendMessage(new ChatComponentText(message + "\n")); // Send a newline after each message, to preserve formatting.
}
开发者ID:tgnmc,项目名称:Craftbukkit,代码行数:5,代码来源:CraftRemoteConsoleCommandSender.java
示例4: sendMessage
import net.minecraft.server.RemoteControlCommandListener; //导入依赖的package包/类
public void sendMessage(String message) {
RemoteControlCommandListener.instance.sendMessage(ChatMessage.d(message + "\n")); // Send a newline after each message, to preserve formatting.
}
开发者ID:AlmuraDev,项目名称:Almura-Server,代码行数:4,代码来源:CraftRemoteConsoleCommandSender.java
示例5: CraftRemoteConsoleCommandSender
import net.minecraft.server.RemoteControlCommandListener; //导入依赖的package包/类
public CraftRemoteConsoleCommandSender(RemoteControlCommandListener listener) {
this.listener = listener;
}
开发者ID:bergerkiller,项目名称:SpigotSource,代码行数:4,代码来源:CraftRemoteConsoleCommandSender.java
示例6: sendMessage
import net.minecraft.server.RemoteControlCommandListener; //导入依赖的package包/类
public void sendMessage(String message) {
RemoteControlCommandListener.instance.sendMessage(message + "\n"); // Send a newline after each message, to preserve formatting.
}
开发者ID:didoupimpon,项目名称:Craft-city,代码行数:4,代码来源:CraftRemoteConsoleCommandSender.java
注:本文中的net.minecraft.server.RemoteControlCommandListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论