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


Java LocalSession.dispatchCUIEvent方法代码示例

本文整理汇总了Java中com.sk89q.worldedit.LocalSession.dispatchCUIEvent方法的典型用法代码示例。如果您正苦于以下问题:Java LocalSession.dispatchCUIEvent方法的具体用法?Java LocalSession.dispatchCUIEvent怎么用?Java LocalSession.dispatchCUIEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sk89q.worldedit.LocalSession的用法示例。


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

示例1: describeCUI

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Override
public void describeCUI(LocalSession session, Actor player) {
    checkNotNull(player);
    checkNotNull(session);

    Collection<Vector> vertices = region.getVertices();
    Collection<Triangle> triangles = region.getTriangles();

    Map<Vector, Integer> vertexIds = new HashMap<Vector, Integer>(vertices.size());
    int lastVertexId = -1;
    for (Vector vertex : vertices) {
        vertexIds.put(vertex, ++lastVertexId);
        session.dispatchCUIEvent(player, new SelectionPointEvent(lastVertexId, vertex, getArea()));
    }

    for (Triangle triangle : triangles) {
        final int[] v = new int[3];
        for (int i = 0; i < 3; ++i) {
            v[i] = vertexIds.get(triangle.getVertex(i));
        }
        session.dispatchCUIEvent(player, new SelectionPolygonEvent(v));
    }
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:24,代码来源:PolyhedralRegionSelector.java

示例2: explainPrimarySelection

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Override
public void explainPrimarySelection(Actor player, LocalSession session, Vector pos) {
    checkNotNull(player);
    checkNotNull(session);
    checkNotNull(pos);

    Message msg;
    if (position1 != null && position2 != null) {
        msg = BBC.SELECTOR_POS.m(1, position1, region.getArea());
    } else {
        msg = BBC.SELECTOR_POS.m(1, position1, "");
    }
    String prefix = WorldEdit.getInstance().getConfiguration().noDoubleSlash ? "" : "/";
    String cmd = prefix + Commands.getAlias(SelectionCommands.class, "/pos1") + " " + pos.getBlockX() + "," + pos.getBlockY() + "," + pos.getBlockZ();
    msg.suggestTip(cmd).send(player);

    session.dispatchCUIEvent(player, new SelectionPointEvent(0, pos, getArea()));
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:19,代码来源:CuboidRegionSelector.java

示例3: explainSecondarySelection

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Override
public void explainSecondarySelection(Actor player, LocalSession session, Vector pos) {
    checkNotNull(player);
    checkNotNull(session);
    checkNotNull(pos);

    Message msg;
    if (position1 != null && position2 != null) {
        msg = BBC.SELECTOR_POS.m(2, position2, region.getArea());
    } else {
        msg = BBC.SELECTOR_POS.m(2, position2, "");
    }
    String prefix = WorldEdit.getInstance().getConfiguration().noDoubleSlash ? "" : "/";
    String cmd = prefix + Commands.getAlias(SelectionCommands.class, "/pos2") + " " + pos.getBlockX() + "," + pos.getBlockY() + "," + pos.getBlockZ();
    msg.suggestTip(cmd).send(player);

    session.dispatchCUIEvent(player, new SelectionPointEvent(1, pos, getArea()));
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:19,代码来源:CuboidRegionSelector.java

示例4: describeLegacyCUI

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Override
public void describeLegacyCUI(LocalSession session, Actor player) {
    checkNotNull(player);
    checkNotNull(session);

    if (isDefined()) {
        session.dispatchCUIEvent(player, new SelectionPointEvent(0, region.getMinimumPoint(), getArea()));
        session.dispatchCUIEvent(player, new SelectionPointEvent(1, region.getMaximumPoint(), getArea()));
    }
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:11,代码来源:PolyhedralRegionSelector.java

示例5: explainPrimarySelection

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Override
public void explainPrimarySelection(Actor player, LocalSession session, Vector pos) {
    BBC.SELECTOR_POS.send(player, 1, pos, region.getArea());

    session.dispatchCUIEvent(player, new SelectionShapeEvent(getTypeID()));
    session.dispatchCUIEvent(player, new SelectionPoint2DEvent(0, pos, getArea()));
    session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMinimumY(), region.getMaximumY()));
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:9,代码来源:Polygonal2DRegionSelector.java

示例6: explainSecondarySelection

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Override
public void explainSecondarySelection(Actor player, LocalSession session, Vector pos) {
    BBC.SELECTOR_POS.send(player, region.size(), pos, region.getArea());

    session.dispatchCUIEvent(player, new SelectionPoint2DEvent(region.size() - 1, pos, getArea()));
    session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMinimumY(), region.getMaximumY()));
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:8,代码来源:Polygonal2DRegionSelector.java

示例7: describeCUI

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Override
public void describeCUI(LocalSession session, Actor player) {
    final List<BlockVector2D> points = region.getPoints();
    for (int id = 0; id < points.size(); id++) {
        session.dispatchCUIEvent(player, new SelectionPoint2DEvent(id, points.get(id), getArea()));
    }

    session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMinimumY(), region.getMaximumY()));
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:10,代码来源:Polygonal2DRegionSelector.java

示例8: describeLegacyCUI

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Override
public void describeLegacyCUI(LocalSession session, Actor player) {
    if (isDefined()) {
        session.dispatchCUIEvent(player, new SelectionPointEvent(0, region.getMinimumPoint(), getArea()));
        session.dispatchCUIEvent(player, new SelectionPointEvent(1, region.getMaximumPoint(), getArea()));
    }
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:8,代码来源:CylinderRegionSelector.java

示例9: explainRegionAdjust

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Override
public void explainRegionAdjust(Actor player, LocalSession session) {
    checkNotNull(player);
    checkNotNull(session);

    if (position1 != null) {
        session.dispatchCUIEvent(player, new SelectionPointEvent(0, position1, getArea()));
    }

    if (position2 != null) {
        session.dispatchCUIEvent(player, new SelectionPointEvent(1, position2, getArea()));
    }
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:14,代码来源:CuboidRegionSelector.java

示例10: describeCUI

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Override
public void describeCUI(LocalSession session, Actor player) {
    if (position1 != null) {
        session.dispatchCUIEvent(player, new SelectionPointEvent(0, position1, getArea()));
    }

    if (position2 != null) {
        session.dispatchCUIEvent(player, new SelectionPointEvent(1, position2, getArea()));
    }
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:11,代码来源:CuboidRegionSelector.java

示例11: explainRegionAdjust

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Override
public void explainRegionAdjust(Actor player, LocalSession session) {
    session.dispatchCUIEvent(player, new SelectionShapeEvent(getTypeID()));
    describeCUI(session, player);
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:6,代码来源:Polygonal2DRegionSelector.java

示例12: describeCUI

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Override
public void describeCUI(LocalSession session, Actor player) {
    session.dispatchCUIEvent(player, new SelectionCylinderEvent(region.getCenter(), region.getRadius()));
    session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMinimumY(), region.getMaximumY()));
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:6,代码来源:CylinderRegionSelector.java

示例13: describeCUI

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Override
public void describeCUI(LocalSession session, Actor player) {
    session.dispatchCUIEvent(player, new SelectionEllipsoidPointEvent(0, region.getCenter()));
    session.dispatchCUIEvent(player, new SelectionEllipsoidPointEvent(1, region.getRadius()));
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:6,代码来源:EllipsoidRegionSelector.java

示例14: describeLegacyCUI

import com.sk89q.worldedit.LocalSession; //导入方法依赖的package包/类
@Override
public void describeLegacyCUI(LocalSession session, Actor player) {
    session.dispatchCUIEvent(player, new SelectionPointEvent(0, region.getMinimumPoint(), getArea()));
    session.dispatchCUIEvent(player, new SelectionPointEvent(1, region.getMaximumPoint(), getArea()));
}
 
开发者ID:boy0001,项目名称:FastAsyncWorldedit,代码行数:6,代码来源:EllipsoidRegionSelector.java


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