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


Java SpawnChangeEvent类代码示例

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


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

示例1: setSpawnLocation

import org.bukkit.event.world.SpawnChangeEvent; //导入依赖的package包/类
public boolean setSpawnLocation(int x, int y, int z) {
    try {
        Location previousLocation = getSpawnLocation();
        world.worldInfo.setSpawnPosition(x, y, z);

        // Notify anyone who's listening.
        SpawnChangeEvent event = new SpawnChangeEvent(this, previousLocation);
        server.getPluginManager().callEvent(event);

        return true;
    } catch (Exception e) {
        return false;
    }
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:15,代码来源:CraftWorld.java

示例2: get

import org.bukkit.event.world.SpawnChangeEvent; //导入依赖的package包/类
@Override
protected Location[] get(final Event e, final World[] source) {
	if (getTime() == -1 && e instanceof SpawnChangeEvent && !Delay.isDelayed(e)) {
		return new Location[] {((SpawnChangeEvent) e).getPreviousLocation()};
	}
	return get(source, new Converter<World, Location>() {
		@Override
		@Nullable
		public Location convert(final World w) {
			return w.getSpawnLocation();
		}
	});
}
 
开发者ID:nfell2009,项目名称:Skript,代码行数:14,代码来源:ExprSpawn.java

示例3: setSpawnLocation

import org.bukkit.event.world.SpawnChangeEvent; //导入依赖的package包/类
public boolean setSpawnLocation(int x, int y, int z) {
    try {
        Location previousLocation = getSpawnLocation();
        world.worldData.setSpawn(x, y, z);

        // Notify anyone who's listening.
        SpawnChangeEvent event = new SpawnChangeEvent(this, previousLocation);
        server.getPluginManager().callEvent(event);

        return true;
    } catch (Exception e) {
        return false;
    }
}
 
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:15,代码来源:CraftWorld.java

示例4: setSpawnLocation

import org.bukkit.event.world.SpawnChangeEvent; //导入依赖的package包/类
public boolean setSpawnLocation(int x, int y, int z) {
    try {
        Location previousLocation = getSpawnLocation();
        world.worldData.setSpawn(new BlockPosition(x, y, z));

        // Notify anyone who's listening.
        SpawnChangeEvent event = new SpawnChangeEvent(this, previousLocation);
        server.getPluginManager().callEvent(event);

        return true;
    } catch (Exception e) {
        return false;
    }
}
 
开发者ID:tgnmc,项目名称:Craftbukkit,代码行数:15,代码来源:CraftWorld.java

示例5: setSpawnLocation

import org.bukkit.event.world.SpawnChangeEvent; //导入依赖的package包/类
public boolean setSpawnLocation(int x, int y, int z) {
    try {
        Location previousLocation = getSpawnLocation();
        world.field_72986_A.func_76081_a(x, y, z);

        // Notify anyone who's listening.
        SpawnChangeEvent event = new SpawnChangeEvent(this, previousLocation);
        server.getPluginManager().callEvent(event);

        return true;
    } catch (Exception e) {
        return false;
    }
}
 
开发者ID:agaricusb,项目名称:MCPBukkit,代码行数:15,代码来源:CraftWorld.java

示例6: setTime

import org.bukkit.event.world.SpawnChangeEvent; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public boolean setTime(final int time) {
	return super.setTime(time, getExpr(), SpawnChangeEvent.class);
}
 
开发者ID:nfell2009,项目名称:Skript,代码行数:6,代码来源:ExprSpawn.java

示例7: onSpawnChange

import org.bukkit.event.world.SpawnChangeEvent; //导入依赖的package包/类
@EventHandler
public void onSpawnChange(SpawnChangeEvent spawnChangeEvent) {
    checkSafety(spawnChangeEvent);
}
 
开发者ID:games647,项目名称:LagMonitor,代码行数:5,代码来源:ThreadSafetyListener.java


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