|
| 1 | +/* |
| 2 | + * AsyncWorldEdit API |
| 3 | + * Copyright (c) 2016, SBPrime <https://github.com/SBPrime/> |
| 4 | + * Copyright (c) AsyncWorldEdit API contributors |
| 5 | + * |
| 6 | + * All rights reserved. |
| 7 | + * |
| 8 | + * Redistribution and use in source and binary forms, with or without |
| 9 | + * modification, are permitted free of charge provided that the following |
| 10 | + * conditions are met: |
| 11 | + * |
| 12 | + * 1. Redistributions of source code must retain the above copyright notice, this |
| 13 | + * list of conditions and the following disclaimer. |
| 14 | + * 2. Redistributions in binary form must reproduce the above copyright notice, |
| 15 | + * this list of conditions and the following disclaimer in the documentation |
| 16 | + * and/or other materials provided with the distribution, |
| 17 | + * 3. Redistributions of source code, with or without modification, in any form |
| 18 | + * other then free of charge is not allowed, |
| 19 | + * 4. Redistributions in binary form in any form other then free of charge is |
| 20 | + * not allowed. |
| 21 | + * 5. Any derived work based on or containing parts of this software must reproduce |
| 22 | + * the above copyright notice, this list of conditions and the following |
| 23 | + * disclaimer in the documentation and/or other materials provided with the |
| 24 | + * derived work. |
| 25 | + * 6. The original author of the software is allowed to change the license |
| 26 | + * terms or the entire license of the software as he sees fit. |
| 27 | + * 7. The original author of the software is allowed to sublicense the software |
| 28 | + * or its parts using any license terms he sees fit. |
| 29 | + * |
| 30 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 31 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 32 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 33 | + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR |
| 34 | + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 35 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 36 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 37 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 38 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 39 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 40 | + */ |
| 41 | +package org.primesoft.asyncworldedit.api.directChunk; |
| 42 | + |
| 43 | +import com.sk89q.worldedit.extent.clipboard.Clipboard; |
| 44 | +import com.sk89q.worldedit.function.mask.Mask; |
| 45 | +import com.sk89q.worldedit.function.pattern.Pattern; |
| 46 | +import com.sk89q.worldedit.regions.Region; |
| 47 | +import com.sk89q.worldedit.session.ClipboardHolder; |
| 48 | +import com.sk89q.worldedit.util.Location; |
| 49 | +import com.sk89q.worldedit.world.World; |
| 50 | +import org.primesoft.asyncworldedit.api.playerManager.IPlayerEntry; |
| 51 | +import org.primesoft.asyncworldedit.api.utils.IAsyncCommand; |
| 52 | + |
| 53 | +/** |
| 54 | + * |
| 55 | + * @author SBPrime |
| 56 | + */ |
| 57 | +public interface IDirectChunkCommands { |
| 58 | + /** |
| 59 | + * Create the clear chunk command |
| 60 | + * @param playerEntry The player entry |
| 61 | + * @param region Region to clear |
| 62 | + * @param mask Mask |
| 63 | + * @return |
| 64 | + */ |
| 65 | + IAsyncCommand createClearChunk(IPlayerEntry playerEntry, Region region, Mask mask); |
| 66 | + |
| 67 | + /** |
| 68 | + * Create the relight chunk command |
| 69 | + * @param playerEntry The player entry |
| 70 | + * @param region Region to clear |
| 71 | + * @return |
| 72 | + */ |
| 73 | + IAsyncCommand createRelight(IPlayerEntry playerEntry, Region region); |
| 74 | + |
| 75 | + /** |
| 76 | + * Create the copy to clipboard command |
| 77 | + * @param playerEntry |
| 78 | + * @param region |
| 79 | + * @param mask |
| 80 | + * @param clipboard |
| 81 | + * @return |
| 82 | + */ |
| 83 | + IAsyncCommand createCopy(IPlayerEntry playerEntry, Region region, Mask mask, Clipboard clipboard); |
| 84 | + |
| 85 | + /** |
| 86 | + * Create the clipboard paste command |
| 87 | + * @param playerEntry |
| 88 | + * @param position |
| 89 | + * @param world |
| 90 | + * @param mask |
| 91 | + * @param clipboard |
| 92 | + * @param ignoreAirBlocks |
| 93 | + * @param relight |
| 94 | + * @return |
| 95 | + */ |
| 96 | + IAsyncCommand createPaste(IPlayerEntry playerEntry, Location position, World world, Mask mask, ClipboardHolder clipboard, |
| 97 | + boolean ignoreAirBlocks, boolean relight); |
| 98 | + |
| 99 | + /** |
| 100 | + * Create clone chunk command |
| 101 | + * @param playerEntry |
| 102 | + * @param region Source region |
| 103 | + * @param position Target position |
| 104 | + * @param world |
| 105 | + * @param mask |
| 106 | + * @return |
| 107 | + */ |
| 108 | + IAsyncCommand createClone(IPlayerEntry playerEntry, Region region, Location position, World world, Mask mask); |
| 109 | + |
| 110 | + |
| 111 | + /** |
| 112 | + * Create fill chunk command |
| 113 | + * @param playerEntry |
| 114 | + * @param position Source position |
| 115 | + * @param world Source world |
| 116 | + * @param region Target region (region to fill) |
| 117 | + * @param mask |
| 118 | + * @return |
| 119 | + */ |
| 120 | + IAsyncCommand createFill(IPlayerEntry playerEntry, Location position, World world, Region region, Mask mask); |
| 121 | + |
| 122 | + /** |
| 123 | + * Create set chunk command |
| 124 | + * @param playerEntry |
| 125 | + * @param region |
| 126 | + * @param pattern |
| 127 | + * @param mask |
| 128 | + * @param fullChunk |
| 129 | + * @return |
| 130 | + */ |
| 131 | + IAsyncCommand createSet(IPlayerEntry playerEntry, Region region, Pattern pattern, Mask mask, boolean fullChunk); |
| 132 | + |
| 133 | + /** |
| 134 | + * Create replace chunk command |
| 135 | + * @param playerEntry |
| 136 | + * @param region |
| 137 | + * @param from |
| 138 | + * @param to |
| 139 | + * @param mask |
| 140 | + * @param wholeWorld perform the replace over the whole world |
| 141 | + * @return |
| 142 | + */ |
| 143 | + IAsyncCommand createReplace(IPlayerEntry playerEntry, Region region, Mask from, Pattern to, Mask mask, boolean wholeWorld); |
| 144 | +} |
0 commit comments