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


Java ResidenceDeleteEvent类代码示例

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


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

示例1: onRemoveEvent

import com.bekvon.bukkit.residence.event.ResidenceDeleteEvent; //导入依赖的package包/类
@EventHandler
public void onRemoveEvent(ResidenceDeleteEvent event) throws SQLException {

    // Ensure that the Database database connection is established
    Database.connect();
    if (!Database.isConnected()) {
        Database.connect();
    }

    if (event.getResidence().isSubzone()) {
    } else {
        Player p = event.getPlayer();
        String pUUID = p.getUniqueId().toString().replace("-", "");
        long plotArea = event.getResidence().getMainArea().getSize();
        String playerWorld = Database.getPlayerWorld(p.getWorld().getName());
        String playerWorldReplaced = playerWorld.replace("_count", "");
        String preMessage = Main.getPlugin().getConfig().getString("MessagesConfig.PreMessage");

        ResultSet RSland = Database.getPlayerLand(pUUID);
        if (Database.isConnected()) {
            while (RSland.next()) {
                if (p.getName().equals(event.getResidence().getOwner())) {
                    Long prevWildLand = RSland.getLong(playerWorld);
                    Long newWildLand = prevWildLand - plotArea;
                    Database.changePlayerWildLand(pUUID, newWildLand, playerWorld);
                    p.sendMessage(preMessage + "§A Removed §6" + plotArea + "§A Tiles from " + StringUtils.capitalize(playerWorldReplaced) + " land");
                    p.sendMessage(String.valueOf(preMessage + "§A New " + StringUtils.capitalize(playerWorldReplaced) + " Land Count: §6" + newWildLand));
                }
            }


        }
    }
}
 
开发者ID:L-E-iT,项目名称:Eldin-Land-Plugin,代码行数:35,代码来源:PlotRemoveListener.java

示例2: onResidenceDelete

import com.bekvon.bukkit.residence.event.ResidenceDeleteEvent; //导入依赖的package包/类
@EventHandler
public void onResidenceDelete(ResidenceDeleteEvent event) {
	event.getResidence().getAreaMap().values().forEach(area -> {
		area.getChunks().forEach(chunkRef -> {
			
		});
	});
}
 
开发者ID:redstone,项目名称:FreshWilderness,代码行数:9,代码来源:ResidenceEngine.java

示例3: onResidenceDeleteEvent

import com.bekvon.bukkit.residence.event.ResidenceDeleteEvent; //导入依赖的package包/类
@EventHandler
public void onResidenceDeleteEvent(final ResidenceDeleteEvent event) {
    if (event.getPlayer() != null) {                    
        ClaimedResidence res = Residence.getResidenceManager().getByLoc(event.getPlayer().getLocation());
        if (res != null) {                   
            for (Player player : res.getPlayersInResidence()) {
                if (player != null) {
                    ServerWorldUtil.sendResidenceInfo(player, res);
                }
            }
        } else {
            ServerWorldUtil.sendResidenceInfo(event.getPlayer(), res);
        }
    }
}
 
开发者ID:AlmuraDev,项目名称:AlmuraForgeBridge,代码行数:16,代码来源:PlayerListener.java


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