• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java EditSessionEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: wrapForLogging

import com.sk89q.worldedit.event.extent.EditSessionEvent; //导入依赖的package包/类
@Subscribe
  public void wrapForLogging(final EditSessionEvent event) {
event.setExtent(new AbstractLoggingExtent(event.getExtent()) {
	
	@Override
	protected void onBlockChange(Vector pos, BaseBlock b) {
		super.onBlockChange(pos, b);
		
		if (b.getType() == 0) {
			World world = Bukkit.getWorld(event.getWorld().getName());
			
			if (world != null) {
				Location l = new Location(world, pos.getBlockX(), pos.getBlockY(), pos.getBlockZ());
				if (BlockStorage.hasBlockInfo(l)) BlockStorage.clearBlockInfo(l);
			}
		}
	}
	
});
  }
 
开发者ID:TheBusyBiscuit,项目名称:Slimefun4,代码行数:21,代码来源:WESlimefunManager.java


示例2: wrapForLogging

import com.sk89q.worldedit.event.extent.EditSessionEvent; //导入依赖的package包/类
public void wrapForLogging(EditSessionEvent event)
    {
        event.setExtent(new AbstractLoggingExtent(event) {

            final WESlimefunManager this$0;
            private final EditSessionEvent val$event;

            protected void onBlockChange(Vector pos, BaseBlock b)
            {
                super.onBlockChange(pos, b);
                if(b.getType() == 0)
                {
                    org.bukkit.World world = Bukkit.getWorld(event.getWorld().getName());
                    if(world != null)
                    {
                        Location l = new Location(world, pos.getBlockX(), pos.getBlockY(), pos.getBlockZ());
                        if(BlockStorage.hasBlockInfo(l))
                            BlockStorage.clearBlockInfo(l);
                    }
                }
            }

            
            {
                this$0 = WESlimefunManager.this;
                event = editsessionevent;
                super($anonymous0);
            }
        }
);
    }
 
开发者ID:StarWishsama,项目名称:Slimefun4-Chinese-Version,代码行数:32,代码来源:WESlimefunManager.java


示例3: onEditSessionEvent

import com.sk89q.worldedit.event.extent.EditSessionEvent; //导入依赖的package包/类
@Subscribe(priority = EventHandler.Priority.VERY_EARLY)
   public void onEditSessionEvent(EditSessionEvent event)
{
	if (event.getActor() != null) //Not a player?
	{
		event.setExtent(new WorldEditFlag(event.getExtent(), event.getActor()));
	}
}
 
开发者ID:isokissa3,项目名称:WorldGuardExtraFlagsPlugin,代码行数:9,代码来源:WorldEditListener.java


示例4: wrapExtent

import com.sk89q.worldedit.event.extent.EditSessionEvent; //导入依赖的package包/类
@Deprecated
private AbstractDelegateExtent wrapExtent(final AbstractDelegateExtent extent, final EventBus eventBus, EditSessionEvent event, final Stage stage) {
    event = event.clone(stage);
    event.setExtent(extent);
    eventBus.post(event);
    if (event.isCancelled()) {
        return new NullExtent(extent, BBC.WORLDEDIT_CANCEL_REASON_MANUAL);
    }
    final Extent toReturn = event.getExtent();
    if (!(toReturn instanceof AbstractDelegateExtent)) {
        Fawe.debug("Extent " + toReturn + " must be AbstractDelegateExtent");
        return extent;
    }
    if (toReturn != extent) {
        String className = toReturn.getClass().getName().toLowerCase();
        for (String allowed : Settings.IMP.EXTENT.ALLOWED_PLUGINS) {
            if (className.contains(allowed.toLowerCase())) {
                this.wrapped = true;
                return (AbstractDelegateExtent) toReturn;
            }
        }
        if (Settings.IMP.EXTENT.DEBUG) {
            Fawe.debug("&cPotentially unsafe extent blocked: " + toReturn.getClass().getName());
            Fawe.debug("&8 - &7For area restrictions, it is recommended to use the FaweAPI");
            Fawe.debug("&8 - &7For block logging, it is recommended to use use BlocksHub");
            Fawe.debug("&8 - &7To allow this plugin add it to the FAWE `allowed-plugins` list");
            Fawe.debug("&8 - &7To hide this message set `debug` to false in the FAWE config.yml");
            if (toReturn.getClass().getName().contains("CoreProtect")) {
                Fawe.debug("Note on CoreProtect: ");
                Fawe.debug(" - If you disable CP's WE logger (CP config) and this still shows, please update CP");
                Fawe.debug(" - Use BlocksHub and set `debug` false in the FAWE config");
            }
        }
    }
    return extent;
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:37,代码来源:EditSession.java


示例5: onEditSession

import com.sk89q.worldedit.event.extent.EditSessionEvent; //导入依赖的package包/类
@Subscribe(priority=Priority.VERY_EARLY)
public void onEditSession(EditSessionEvent event) {
    String world = event.getWorld().getName();
    if (!PlotSquared.isPlotWorld(world)) {
        return;
    }
    Actor actor = event.getActor();
    if (actor != null && actor.isPlayer()) {
        String name = actor.getName();
        if (WEManager.bypass.contains(name)) {
            return;
        }

        PlotPlayer player = UUIDHandler.getPlayer(actor.getName());
        HashSet<RegionWrapper> mask = WEManager.getMask(player);
        if (mask.size() == 0) {
            if (Permissions.hasPermission(player, "plots.worldedit.bypass")) {
                MainUtil.sendMessage(player, C.WORLDEDIT_BYPASS);
            }
            event.setExtent(new NullExtent());
            return;
        }
        if (Settings.CHUNK_PROCESSOR) {
            event.setExtent(new ProcessedWEExtent(mask, event.getExtent()));
        }
        else {
            event.setExtent(new WEExtent(mask, event.getExtent()));
        }
    }
}
 
开发者ID:Mayomi,项目名称:PlotSquared-Chinese,代码行数:31,代码来源:WESubscriber.java


示例6: worldEditListener

import com.sk89q.worldedit.event.extent.EditSessionEvent; //导入依赖的package包/类
@Subscribe(priority = EventHandler.Priority.VERY_EARLY)
public void worldEditListener(EditSessionEvent event) {
    Actor actor = event.getActor();
    if (event.getWorld() == null) {
        return;
    }
    World world1 = PlotMe_CorePlugin.getInstance().getServer().getWorld(event.getWorld().getName());
    BukkitWorld adapt = BukkitUtil.adapt(world1);
    if (PlotMeCoreManager.getInstance().isPlotWorld(adapt)) {
        if (actor != null && actor.isPlayer()) {
            event.setExtent(new PlotMeWorldEdit(api, event.getExtent(), event.getActor()));
        }
    }
}
 
开发者ID:WorldCretornica,项目名称:PlotMe-Core,代码行数:15,代码来源:PlotWorldEditListener.java


示例7: EditSession

import com.sk89q.worldedit.event.extent.EditSessionEvent; //导入依赖的package包/类
@Deprecated
public EditSession(@Nonnull World world, @Nullable FaweQueue queue, @Nullable FawePlayer player, @Nullable FaweLimit limit, @Nullable FaweChangeSet changeSet, @Nullable RegionWrapper[] allowedRegions, @Nullable Boolean autoQueue, @Nullable Boolean fastmode, @Nullable Boolean checkMemory, @Nullable Boolean combineStages, @Nullable BlockBag blockBag, @Nullable EventBus bus, @Nullable EditSessionEvent event) {
    this(null, world, queue, player, limit, changeSet, allowedRegions, autoQueue, fastmode, checkMemory, combineStages, blockBag, bus, event);
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:5,代码来源:EditSession.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java KettleAttributeInterface类代码示例发布时间:2022-05-22
下一篇:
Java Classified类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap