本文整理汇总了Java中org.dynmap.common.DynmapPlayer类的典型用法代码示例。如果您正苦于以下问题:Java DynmapPlayer类的具体用法?Java DynmapPlayer怎么用?Java DynmapPlayer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DynmapPlayer类属于org.dynmap.common包,在下文中一共展示了DynmapPlayer类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOnlinePlayers
import org.dynmap.common.DynmapPlayer; //导入依赖的package包/类
@Override
public DynmapPlayer[] getOnlinePlayers() {
List<Player> players = Canary.getServer().getPlayerList();
DynmapPlayer[] dplay = new DynmapPlayer[players.size()];
for(int i = 0; i < dplay.length; i++)
dplay[i] = new BukkitPlayer(players.get(i));
return dplay;
}
示例2: getPlayer
import org.dynmap.common.DynmapPlayer; //导入依赖的package包/类
@Override
public DynmapPlayer getPlayer(String name) {
Player p = Canary.getServer().getPlayer(name);
if(p != null) {
return new BukkitPlayer(p);
}
return null;
}
示例3: getOfflinePlayer
import org.dynmap.common.DynmapPlayer; //导入依赖的package包/类
@Override
public DynmapPlayer getOfflinePlayer(String name) {
OfflinePlayer op = Canary.getServer().getOfflinePlayer(name);
if(op != null) {
return new BukkitPlayer(op);
}
return null;
}
示例4: onSignChange
import org.dynmap.common.DynmapPlayer; //导入依赖的package包/类
@HookHandler(ignoreCanceled=true,priority=Priority.PASSIVE)
public void onSignChange(SignChangeHook evt) {
Sign s = evt.getSign();
String[] lines = s.getText(); /* Note: changes to this change event - intentional */
DynmapPlayer dp = null;
Player p = evt.getPlayer();
if(p != null) dp = new BukkitPlayer(p);
core.listenerManager.processSignChangeEvent(EventType.SIGN_CHANGE, s.isSignPost()?63:68,
getWorld(s.getWorld()).getName(), s.getX(), s.getY(), s.getZ(), lines, dp);
}
示例5: onPlayerChat
import org.dynmap.common.DynmapPlayer; //导入依赖的package包/类
@HookHandler(ignoreCanceled=true,priority=Priority.PASSIVE)
public void onPlayerChat(ChatHook evt) {
final Player p = evt.getPlayer();
final String msg = evt.getMessage();
ServerTaskManager.addTask(new ServerTask(DynmapPlugin.this, 1) {
public void run() {
DynmapPlayer dp = null;
if(p != null)
dp = new BukkitPlayer(p);
core.listenerManager.processChatEvent(EventType.PLAYER_CHAT, dp, msg);
}
});
}
示例6: onPlayerJoin
import org.dynmap.common.DynmapPlayer; //导入依赖的package包/类
@HookHandler(priority=Priority.PASSIVE, ignoreCanceled=true)
public void onPlayerJoin(ConnectionHook evt) {
final DynmapPlayer dp = new BukkitPlayer(evt.getPlayer());
// Give other handlers a change to prep player (nicknames and such from Essentials)
server.scheduleServerTask(new Runnable() {
@Override
public void run() {
core.listenerManager.processPlayerEvent(EventType.PLAYER_JOIN, dp);
}
}, 2);
}
示例7: getOfflinePlayer
import org.dynmap.common.DynmapPlayer; //导入依赖的package包/类
@Override
public DynmapPlayer getOfflinePlayer(String player) {
Player p = Canary.getServer().getPlayer(player);
if (p != null) {
return new CanaryPlayer(p);
}
return null;
}
示例8: getOnlinePlayers
import org.dynmap.common.DynmapPlayer; //导入依赖的package包/类
@Override
public DynmapPlayer[] getOnlinePlayers() {
DynmapPlayer[] players = new DynmapPlayer[server.getPlayerList().size()];
int i = 0;
for (Player p : server.getPlayerList()) {
players[i] = new CanaryPlayer(p);
i++;
}
return players;
}
示例9: getPlayer
import org.dynmap.common.DynmapPlayer; //导入依赖的package包/类
@Override
public DynmapPlayer getPlayer(String player) {
Player p = Canary.getServer().getPlayer(player);
if (p != null) {
return new CanaryPlayer(p);
}
return null;
}
示例10: onPlayerBedLeave
import org.dynmap.common.DynmapPlayer; //导入依赖的package包/类
@HookHandler(ignoreCanceled=true,priority=Priority.PASSIVE)
public void onPlayerBedLeave(BedExitHook evt) {
DynmapPlayer p = new BukkitPlayer(evt.getPlayer());
core.listenerManager.processPlayerEvent(EventType.PLAYER_BED_LEAVE, p);
}
示例11: onPlayerQuit
import org.dynmap.common.DynmapPlayer; //导入依赖的package包/类
@HookHandler(priority=Priority.PASSIVE, ignoreCanceled=true)
public void onPlayerQuit(DisconnectionHook evt) {
DynmapPlayer dp = new BukkitPlayer(evt.getPlayer());
core.listenerManager.processPlayerEvent(EventType.PLAYER_QUIT, dp);
}
示例12: getOnlinePlayers
import org.dynmap.common.DynmapPlayer; //导入依赖的package包/类
@Override
public DynmapPlayer[] getOnlinePlayers() {
return new DynmapPlayer[0];
}
示例13: getPlayer
import org.dynmap.common.DynmapPlayer; //导入依赖的package包/类
@Override
public DynmapPlayer getPlayer(String name) {
return null;
}
示例14: getOfflinePlayer
import org.dynmap.common.DynmapPlayer; //导入依赖的package包/类
@Override
public DynmapPlayer getOfflinePlayer(String name) {
return null;
}