• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java NativeGameMode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getInfoWrapper

import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode; //导入依赖的package包/类
public static WrapperPlayServerPlayerInfo getInfoWrapper(UUID playeruuid, PlayerInfoAction action) {
    WrapperPlayServerPlayerInfo wrapper = new WrapperPlayServerPlayerInfo();
    wrapper.setAction(action);
    WrappedGameProfile profile = new WrappedGameProfile(playeruuid, NameGenerator.newName());
    PlayerInfoData data = new PlayerInfoData(profile, 1, NativeGameMode.SURVIVAL, WrappedChatComponent.fromText(NameGenerator.newName()));
    List<PlayerInfoData> listdata = new ArrayList<>();
    listdata.add(data);
    wrapper.setData(listdata);
    return wrapper;
}
 
开发者ID:TechzoneMC,项目名称:SimpleAntiAura,代码行数:11,代码来源:AuraCheck.java


示例2: createRespawnPacket

import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode; //导入依赖的package包/类
public static Object createRespawnPacket(int dimId, Difficulty difficulty, WorldType worldType, NativeGameMode gamemode) {
	PacketContainer container = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.RESPAWN);
	container.getIntegers().write(0, dimId);
	container.getDifficulties().write(0, difficulty);
	container.getWorldTypeModifier().write(0, worldType);
	container.getGameModes().write(0, gamemode);
	return container.getHandle();
}
 
开发者ID:ProtocolSupport,项目名称:ProtocolSupportAntiBot,代码行数:9,代码来源:Packets.java


示例3: createJoinGamePacket

import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode; //导入依赖的package包/类
public static Object createJoinGamePacket(int playerId, int maxPlayers) {
	PacketContainer container = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.LOGIN);
	container.getIntegers().write(0, playerId);
	container.getIntegers().write(2, maxPlayers);
	container.getGameModes().write(0, NativeGameMode.SURVIVAL);
	container.getWorldTypeModifier().write(0, WorldType.NORMAL);
	container.getDifficulties().write(0, Difficulty.EASY);
	return container.getHandle();
}
 
开发者ID:ProtocolSupport,项目名称:ProtocolSupportAntiBot,代码行数:10,代码来源:Packets.java


示例4: getPlayerInfoData

import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode; //导入依赖的package包/类
private PlayerInfoData getPlayerInfoData(WrappedGameProfile profile, int ping, String displayName) {
    if (displayName != null) {
        // min width
        while (displayName.length() < this.minColumnWidth)
            displayName += " ";

        // max width
        if (this.maxColumnWidth > 0)
            while (displayName.length() > this.maxColumnWidth)
                displayName = displayName.substring(0, displayName.length() - 1);
    }

    return new PlayerInfoData(profile, ping, NativeGameMode.SURVIVAL, displayName == null ? null : WrappedChatComponent.fromText(displayName));
}
 
开发者ID:thekeenant,项目名称:tabbed,代码行数:15,代码来源:SimpleTabList.java


示例5: getGameMode

import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode; //导入依赖的package包/类
/**
 * Retrieve the game mode of the current player.
 *
 * @return The current game mode
 */
public NativeGameMode getGameMode()
{
    return handle.getGameModes().read(0);
}
 
开发者ID:Ms-ran,项目名称:ItemPlus,代码行数:10,代码来源:WrapperPlayServerRespawn.java


示例6: setGameMode

import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode; //导入依赖的package包/类
/**
 * Set the game mode of the current player.
 *
 * @param mode - new value.
 */
public void setGameMode(NativeGameMode mode)
{
    handle.getGameModes().write(0, mode);
}
 
开发者ID:Ms-ran,项目名称:ItemPlus,代码行数:10,代码来源:WrapperPlayServerRespawn.java


示例7: getGamemode

import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode; //导入依赖的package包/类
/**
 * Retrieve the game mode of the initial world.
 *
 * @return The current gamemode.
 */
public NativeGameMode getGamemode()
{
    return handle.getGameModes().read(0);
}
 
开发者ID:Ms-ran,项目名称:ItemPlus,代码行数:10,代码来源:WrapperPlayServerLogin.java


示例8: setGamemode

import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode; //导入依赖的package包/类
/**
 * Set the game mode of the initial world.
 *
 * @param value - new value.
 */
public void setGamemode(NativeGameMode value)
{
    handle.getGameModes().write(0, value);
}
 
开发者ID:Ms-ran,项目名称:ItemPlus,代码行数:10,代码来源:WrapperPlayServerLogin.java


示例9: getGameMode

import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode; //导入依赖的package包/类
/**
 * Retrieve the game mode of the current player.
 * @return The current game mode
*/
public NativeGameMode getGameMode() {
    return handle.getGameModes().read(0);
}
 
开发者ID:aadnk,项目名称:PacketWrapper,代码行数:8,代码来源:WrapperPlayServerRespawn.java


示例10: setGameMode

import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode; //导入依赖的package包/类
/**
 * Set the game mode of the current player.
 * @param mode - new value.
*/
public void setGameMode(NativeGameMode mode) {
    handle.getGameModes().write(0, mode);
}
 
开发者ID:aadnk,项目名称:PacketWrapper,代码行数:8,代码来源:WrapperPlayServerRespawn.java


示例11: getGamemode

import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode; //导入依赖的package包/类
/**
 * Retrieve the game mode of the initial world.
 * @return The current gamemode.
*/
public NativeGameMode getGamemode() {
    return handle.getGameModes().read(0);
}
 
开发者ID:aadnk,项目名称:PacketWrapper,代码行数:8,代码来源:WrapperPlayServerLogin.java


示例12: setGamemode

import com.comphenix.protocol.wrappers.EnumWrappers.NativeGameMode; //导入依赖的package包/类
/**
 * Set the game mode of the initial world.
 * @param value - new value.
*/
public void setGamemode(NativeGameMode value) {
    handle.getGameModes().write(0, value);
}
 
开发者ID:aadnk,项目名称:PacketWrapper,代码行数:8,代码来源:WrapperPlayServerLogin.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EurekaClientConfig类代码示例发布时间:2022-05-22
下一篇:
Java HindiNormalizationFilter类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap