本文整理汇总了Java中com.comphenix.protocol.wrappers.WrappedSignedProperty类的典型用法代码示例。如果您正苦于以下问题:Java WrappedSignedProperty类的具体用法?Java WrappedSignedProperty怎么用?Java WrappedSignedProperty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WrappedSignedProperty类属于com.comphenix.protocol.wrappers包,在下文中一共展示了WrappedSignedProperty类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: spawnPlayer
import com.comphenix.protocol.wrappers.WrappedSignedProperty; //导入依赖的package包/类
public FakeMob spawnPlayer(Location loc, String name, Multimap<String, WrappedSignedProperty> skin) {
int id = this.getNewId();
FakeMob mob = new FakeMob(id, loc, EntityType.PLAYER);
mob.setCustomName(name);
mob.setPlayerSkin(skin);
SpawnFakeMobEvent event = new SpawnFakeMobEvent(loc, EntityType.PLAYER, mob);
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled()) return null;
for (Player player : loc.getWorld().getPlayers()) {
if (mob.isInRange(player)) {
mob.loadPlayer(player);
}
}
this.mobs.put(id, mob);
this.saveMobsFile();
return mob;
}
开发者ID:Howaner,项目名称:FakeMobs,代码行数:21,代码来源:FakeMobsPlugin.java
示例2: createSkullItemStack
import com.comphenix.protocol.wrappers.WrappedSignedProperty; //导入依赖的package包/类
public static ItemStack createSkullItemStack(String uuid, String textureValue, String textureSignature) {
WrappedGameProfile wrappedProfile = new WrappedGameProfile(UUID.fromString(uuid), null);
wrappedProfile.getProperties().put("textures", new WrappedSignedProperty("textures", textureValue, textureSignature));
ItemStack skull = new ItemStack(Material.SKULL_ITEM, 1, (short) SkullType.PLAYER.ordinal());
SkullMeta sm = (SkullMeta) skull.getItemMeta();
Field profileField = null;
try {
profileField = sm.getClass().getDeclaredField("profile");
profileField.setAccessible(true);
profileField.set(sm, wrappedProfile.getHandle());
} catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e1) {
e1.printStackTrace();
}
skull.setItemMeta(sm);
return skull;
}
开发者ID:RoboTricker,项目名称:Transport-Pipes,代码行数:21,代码来源:InventoryUtils.java
示例3: fromGameProfile
import com.comphenix.protocol.wrappers.WrappedSignedProperty; //导入依赖的package包/类
public static Skin fromGameProfile(WrappedGameProfile gameProfile) {
WrappedSignedProperty[] wrappedSignedProperties = gameProfile.getProperties().get(MULTIMAP_KEY).toArray(new WrappedSignedProperty[0]);
if (wrappedSignedProperties.length == 0) {
return Skin.EMPTY;
} else {
return fromWrappedSignedProperty(wrappedSignedProperties[0]);
}
}
开发者ID:MundoSK,项目名称:MundoSK,代码行数:9,代码来源:Skin.java
示例4: getPlayer
import com.comphenix.protocol.wrappers.WrappedSignedProperty; //导入依赖的package包/类
/**
* Get a skin from an online player.
* @param player
* @return
*/
public static Skin getPlayer(Player player) {
WrappedSignedProperty property = DEFAULT_SKIN.getProperty();
Collection<WrappedSignedProperty> properties = WrappedGameProfile.fromPlayer(player).getProperties().get("textures");
if (properties != null && properties.size() > 0)
property = properties.iterator().next();
return new Skin(property);
}
开发者ID:thekeenant,项目名称:tabbed,代码行数:13,代码来源:Skins.java
示例5: toWrappedSignedProperty
import com.comphenix.protocol.wrappers.WrappedSignedProperty; //导入依赖的package包/类
public WrappedSignedProperty toWrappedSignedProperty() {
return new WrappedSignedProperty("textures", value, signature);
}
开发者ID:MundoSK,项目名称:MundoSK,代码行数:4,代码来源:Skin.java
示例6: fromWrappedSignedProperty
import com.comphenix.protocol.wrappers.WrappedSignedProperty; //导入依赖的package包/类
public static Skin fromWrappedSignedProperty(WrappedSignedProperty wrappedSignedProperty) {
return new Skin(wrappedSignedProperty.getValue(), wrappedSignedProperty.getSignature());
}
开发者ID:MundoSK,项目名称:MundoSK,代码行数:4,代码来源:Skin.java
示例7: Skin
import com.comphenix.protocol.wrappers.WrappedSignedProperty; //导入依赖的package包/类
public Skin(String value, String signature) {
this(new WrappedSignedProperty("textures", value, signature));
}
开发者ID:thekeenant,项目名称:tabbed,代码行数:4,代码来源:Skin.java
示例8: getPlayerSkin
import com.comphenix.protocol.wrappers.WrappedSignedProperty; //导入依赖的package包/类
public Multimap<String, WrappedSignedProperty> getPlayerSkin() {
return this.playerSkin;
}
开发者ID:Howaner,项目名称:FakeMobs,代码行数:4,代码来源:FakeMob.java
示例9: setPlayerSkin
import com.comphenix.protocol.wrappers.WrappedSignedProperty; //导入依赖的package包/类
public void setPlayerSkin(Multimap<String, WrappedSignedProperty> skin) {
this.playerSkin = skin;
}
开发者ID:Howaner,项目名称:FakeMobs,代码行数:4,代码来源:FakeMob.java
注:本文中的com.comphenix.protocol.wrappers.WrappedSignedProperty类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论