本文整理汇总了Java中org.bukkit.util.Consumer类的典型用法代码示例。如果您正苦于以下问题:Java Consumer类的具体用法?Java Consumer怎么用?Java Consumer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Consumer类属于org.bukkit.util包,在下文中一共展示了Consumer类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: spawnTemporaryPlayer
import org.bukkit.util.Consumer; //导入依赖的package包/类
public static void spawnTemporaryPlayer(Player p, Location loc, UUID skin, String customName, Consumer<FakePlayer> callback) {
GameProfileBuilder.fetch(skin, gameProfile -> {
System.out.println(gameProfile);
callback.accept(spawnTemporaryPlayer(p, loc, gameProfile, customName));
});
}
开发者ID:AlphaHelixDev,项目名称:AlphaLibary,代码行数:9,代码来源:PlayerFakeUtil.java
示例2: spawn
import org.bukkit.util.Consumer; //导入依赖的package包/类
@Override
public <T extends Entity> T spawn(Location location, Class<T> clazz, Consumer<T> function)
throws IllegalArgumentException
{
// TODO Auto-generated method stub
throw new UnimplementedOperationException();
}
开发者ID:seeseemelk,项目名称:MockBukkit,代码行数:8,代码来源:WorldMock.java
示例3: spawn
import org.bukkit.util.Consumer; //导入依赖的package包/类
@Override
public <T extends Entity> T spawn(Location location, Class<T> clazz, Consumer<T> function) throws IllegalArgumentException {
return TaskManager.IMP.sync(new RunnableVal<T>() {
@Override
public void run(T value) {
this.value = parent.spawn(location, clazz, function);
}
});
}
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:10,代码来源:AsyncWorld.java
示例4: updateMeta
import org.bukkit.util.Consumer; //导入依赖的package包/类
public static void updateMeta(ItemStack item, Consumer<ItemMeta> mutator) {
final ItemMeta meta = item.getItemMeta();
mutator.accept(meta);
item.setItemMeta(meta);
}
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:6,代码来源:ItemUtils.java
示例5: updateMetaIfPresent
import org.bukkit.util.Consumer; //导入依赖的package包/类
public static void updateMetaIfPresent(@Nullable ItemStack item, Consumer<ItemMeta> mutator) {
if(item != null && item.hasItemMeta()) {
updateMeta(item, mutator);
}
}
开发者ID:OvercastNetwork,项目名称:ProjectAres,代码行数:6,代码来源:ItemUtils.java
示例6: spawnPlayer
import org.bukkit.util.Consumer; //导入依赖的package包/类
public static void spawnPlayer(Player p, Location loc, UUID skin, String name, Consumer<FakePlayer> callback) {
spawnTemporaryPlayer(p, loc, skin, name, entity -> {
FakeRegister.getPlayerLocationsFile().addPlayerToFile(entity);
callback.accept(entity);
});
}
开发者ID:AlphaHelixDev,项目名称:AlphaLibary,代码行数:7,代码来源:PlayerFakeUtil.java
示例7: spawn
import org.bukkit.util.Consumer; //导入依赖的package包/类
@Override
public <T extends Entity> T spawn( Location location, Class<T> aClass, Consumer<T> consumer ) throws IllegalArgumentException {
return null;
}
开发者ID:lukas81298,项目名称:FlexMC,代码行数:5,代码来源:FlexWorld.java
示例8: spawn
import org.bukkit.util.Consumer; //导入依赖的package包/类
@Override
public <T extends Entity> T spawn(Location location, Class<T> clazz, Consumer<T> consumer) throws IllegalArgumentException {
throw Pokkit.unsupported();
}
开发者ID:rutgerkok,项目名称:Pokkit,代码行数:6,代码来源:PokkitWorld.java
注:本文中的org.bukkit.util.Consumer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论