当前位置: 首页>>代码示例>>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;未经允许,请勿转载。