Search in sources :

Example 1 with PasteEvent

use of com.fastasyncworldedit.core.event.extent.PasteEvent in project FastAsyncWorldEdit by IntellectualSites.

the class ClipboardCommands method checkPaste.

// FAWE start
private void checkPaste(Actor player, EditSession editSession, BlockVector3 to, ClipboardHolder holder, Clipboard clipboard) {
    URI uri = null;
    if (holder instanceof URIClipboardHolder) {
        uri = ((URIClipboardHolder) holder).getURI(clipboard);
    }
    PasteEvent event = new PasteEvent(player, clipboard, uri, editSession, to);
    WorldEdit.getInstance().getEventBus().post(event);
    if (event.isCancelled()) {
        throw FaweCache.MANUAL;
    }
}
Also used : URI(java.net.URI) URIClipboardHolder(com.fastasyncworldedit.core.extent.clipboard.URIClipboardHolder) PasteEvent(com.fastasyncworldedit.core.event.extent.PasteEvent)

Aggregations

PasteEvent (com.fastasyncworldedit.core.event.extent.PasteEvent)1 URIClipboardHolder (com.fastasyncworldedit.core.extent.clipboard.URIClipboardHolder)1 URI (java.net.URI)1