当前位置: 首页>>代码示例>>Java>>正文


Java Client类代码示例

本文整理汇总了Java中org.rev317.min.accessors.Client的典型用法代码示例。如果您正苦于以下问题:Java Client类的具体用法?Java Client怎么用?Java Client使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Client类属于org.rev317.min.accessors包,在下文中一共展示了Client类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getPlayers

import org.rev317.min.accessors.Client; //导入依赖的package包/类
/**
 * Gets all players except local player
 *
 * @param filter
 *
 * @return all players
 */
public static final Player[] getPlayers(final Filter<Player> filter) {
    final Client                            client     = Loader.getClient();
    ArrayList<Player>                       playerList = new ArrayList<>();
    final org.rev317.min.accessors.Player[] accPlayers = client.getPlayers();
    for (int i = 0; i < accPlayers.length; i++) {
        if (accPlayers[i] == null) {
            continue;
        }
        final Player player = new Player(accPlayers[i], i);
        if (filter.accept(player)) {
            playerList.add(player);
        }
    }

    return playerList.toArray(new Player[playerList.size()]);
}
 
开发者ID:Parabot,项目名称:Parabot-317-API-Minified-PkHonor,代码行数:24,代码来源:Players.java

示例2: getNpcs

import org.rev317.min.accessors.Client; //导入依赖的package包/类
/**
 * Gets all Npcs except local Npc
 *
 * @param filter
 *
 * @return all Npcs
 */
public static final Npc[] getNpcs(final Filter<Npc> filter) {
    final Client                         client  = Loader.getClient();
    ArrayList<Npc>                       npcList = new ArrayList<>();
    final org.rev317.min.accessors.Npc[] accNpcs = client.getNpcs();
    for (int i = 0; i < accNpcs.length; i++) {
        if (accNpcs[i] == null) {
            continue;
        }
        final Npc npc = new Npc(accNpcs[i], i);
        if (filter.accept(npc)) {
            npcList.add(npc);
        }
    }

    return npcList.toArray(new Npc[npcList.size()]);
}
 
开发者ID:Parabot,项目名称:Parabot-317-API-Minified-PkHonor,代码行数:24,代码来源:Npcs.java

示例3: intercept

import org.rev317.min.accessors.Client; //导入依赖的package包/类
public static void intercept(int index) {
    int outputIndex = 0;

    Client client   = Loader.getClient();
    int    action1  = client.getMenuAction1()[index];
    int    action2  = client.getMenuAction2()[index];
    int    action3  = client.getMenuAction3()[index];
    int    action4  = 0;
    int    actionId = client.getMenuActionId()[index];
    if (DActions.debugActions()) {
        if (Game.hasAction4()) {
            action4 = client.getMenuAction4()[index];
            System.out.println(String.format(outputs[0][outputIndex], index, action1, action2, action3, action4, actionId));
        } else {
            System.out.println(String.format(outputs[1][outputIndex], index, action1, action2, action3, actionId));
        }
    }

    final GameActionEvent actionEvent = new GameActionEvent(actionId, action1, action2, action3, action4, index);
    ScriptEngine.getInstance().dispatch(actionEvent);
}
 
开发者ID:Parabot,项目名称:Parabot-317-API-Minified-PkHonor,代码行数:22,代码来源:MenuAction.java

示例4: sendAction

import org.rev317.min.accessors.Client; //导入依赖的package包/类
/**
 * Sends an action to the client
 *
 * @param action
 * @param cmd1
 * @param cmd2
 * @param cmd3
 * @param cmd4
 * @param index
 */
public static void sendAction(int action, int cmd1, int cmd2, int cmd3, int cmd4, int index) {
    Client client = Loader.getClient();

    client.getMenuAction1()[index] = cmd1;
    client.getMenuAction2()[index] = cmd2;
    client.getMenuAction3()[index] = cmd3;
    if (Game.hasAction4()) {
        client.getMenuAction4()[index] = cmd4;
    }
    client.getMenuActionId()[index] = action;

    client.doAction(index);
}
 
开发者ID:Parabot,项目名称:Parabot-317-API-Minified-PkHonor,代码行数:24,代码来源:Menu.java

示例5: getClient

import org.rev317.min.accessors.Client; //导入依赖的package包/类
public static Client getClient() {
    return (Client) Context.getInstance().getClient();
}
 
开发者ID:Parabot,项目名称:Parabot-317-API-Minified-PkHonor,代码行数:4,代码来源:Loader.java


注:本文中的org.rev317.min.accessors.Client类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。