當前位置: 首頁>>代碼示例>>Java>>正文


Java DynmapPlayer類代碼示例

本文整理匯總了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;
}
 
開發者ID:webbukkit,項目名稱:DynmapCanary,代碼行數:9,代碼來源:DynmapPlugin.java

示例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;
}
 
開發者ID:webbukkit,項目名稱:DynmapCanary,代碼行數:9,代碼來源:DynmapPlugin.java

示例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;
}
 
開發者ID:webbukkit,項目名稱:DynmapCanary,代碼行數:9,代碼來源:DynmapPlugin.java

示例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);
}
 
開發者ID:webbukkit,項目名稱:DynmapCanary,代碼行數:11,代碼來源:DynmapPlugin.java

示例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);
        }
    });
}
 
開發者ID:webbukkit,項目名稱:DynmapCanary,代碼行數:14,代碼來源:DynmapPlugin.java

示例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);
}
 
開發者ID:webbukkit,項目名稱:DynmapCanary,代碼行數:12,代碼來源:DynmapPlugin.java

示例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;
}
 
開發者ID:UnoModding,項目名稱:cynmap,代碼行數:9,代碼來源:CanaryServer.java

示例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;
}
 
開發者ID:UnoModding,項目名稱:cynmap,代碼行數:11,代碼來源:CanaryServer.java

示例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;
}
 
開發者ID:UnoModding,項目名稱:cynmap,代碼行數:9,代碼來源:CanaryServer.java

示例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);
}
 
開發者ID:webbukkit,項目名稱:DynmapCanary,代碼行數:6,代碼來源:DynmapPlugin.java

示例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);
}
 
開發者ID:webbukkit,項目名稱:DynmapCanary,代碼行數:6,代碼來源:DynmapPlugin.java

示例12: getOnlinePlayers

import org.dynmap.common.DynmapPlayer; //導入依賴的package包/類
@Override
public DynmapPlayer[] getOnlinePlayers() {
    return new DynmapPlayer[0];
}
 
開發者ID:Captain-Chaos,項目名稱:WorldPainter,代碼行數:5,代碼來源:WPDynmapServer.java

示例13: getPlayer

import org.dynmap.common.DynmapPlayer; //導入依賴的package包/類
@Override
public DynmapPlayer getPlayer(String name) {
    return null;
}
 
開發者ID:Captain-Chaos,項目名稱:WorldPainter,代碼行數:5,代碼來源:WPDynmapServer.java

示例14: getOfflinePlayer

import org.dynmap.common.DynmapPlayer; //導入依賴的package包/類
@Override
public DynmapPlayer getOfflinePlayer(String name) {
    return null;
}
 
開發者ID:Captain-Chaos,項目名稱:WorldPainter,代碼行數:5,代碼來源:WPDynmapServer.java


注:本文中的org.dynmap.common.DynmapPlayer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。