本文整理汇总了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));
}
}
示例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()));
}
示例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()));
}
示例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()));
}
}
示例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()));
}
示例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()));
}
示例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()));
}
示例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()));
}
}
示例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()));
}
}
示例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()));
}
}
示例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);
}
示例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()));
}
示例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()));
}
示例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()));
}