本文整理匯總了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;
}