本文整理匯總了Java中org.inventivetalent.mcwrapper.auth.properties.PropertyWrapper類的典型用法代碼示例。如果您正苦於以下問題:Java PropertyWrapper類的具體用法?Java PropertyWrapper怎麽用?Java PropertyWrapper使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PropertyWrapper類屬於org.inventivetalent.mcwrapper.auth.properties包,在下文中一共展示了PropertyWrapper類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setSkin
import org.inventivetalent.mcwrapper.auth.properties.PropertyWrapper; //導入依賴的package包/類
public void setSkin(final String skinOwner) {
if (Bukkit.getPluginManager().isPluginEnabled("NickNamer")) {
if (getPlugin() != null && getPlugin().isEnabled()) {
Bukkit.getScheduler().runTaskAsynchronously(getPlugin(), new Runnable() {
@Override
public void run() {
GameProfileWrapper profile = SkinLoader.loadSkin(skinOwner);
Collection<PropertyWrapper> values = profile.getProperties().values();
if (values.isEmpty()) { return; }
PropertyWrapper property = values.iterator().next();
setSkinTexture(property.getValue(), property.getSignature());
}
});
}
}
}
示例2: createProfile
import org.inventivetalent.mcwrapper.auth.properties.PropertyWrapper; //導入依賴的package包/類
public static Object createProfile(String data) {
try {
GameProfileWrapper profileWrapper = new GameProfileWrapper(UUID.randomUUID(), "CustomBlock");
PropertyWrapper propertyWrapper = new PropertyWrapper("textures", data);
profileWrapper.getProperties().put("textures", propertyWrapper);
return profileWrapper.getHandle();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
示例3: createProfile
import org.inventivetalent.mcwrapper.auth.properties.PropertyWrapper; //導入依賴的package包/類
public static Object createProfile(String data) {
try {
GameProfileWrapper profileWrapper = new GameProfileWrapper(UUID.randomUUID(), "CustomBlock");
PropertyWrapper propertyWrapper = new PropertyWrapper("textures", data);
profileWrapper.getProperties().put("textures", propertyWrapper);
return profileWrapper.getHandle();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
示例4: setSkinTexture
import org.inventivetalent.mcwrapper.auth.properties.PropertyWrapper; //導入依賴的package包/類
@NBT({
"npclib.options",
"player",
"skinTexture" })
@Override
public void setSkinTexture(@NBT(value = "value",
type = TagID.TAG_STRING) String value, @NBT(value = "signature",
type = TagID.TAG_STRING) String signature) {
this.skinTextureValue = value;
this.skinTextureSignature = signature;
GameProfileWrapper profile = getProfile();
profile.getProperties().clear();
profile.getProperties().put("textures", new PropertyWrapper("textures", value, signature));
setProfile(profile);
updateNearby();
if (getPlugin() != null && getPlugin().isEnabled()) {
// Give it some time to load the profile
Bukkit.getScheduler().runTaskLater(getPlugin(), new Runnable() {
@Override
public void run() {
updateNearby(32, new Predicate<Player>() {
@Override
public boolean apply(@Nullable Player player) {
respawnTo(player);
return true;
}
});
}
}, 20);
}
}