Skip to content
This repository was archived by the owner on Oct 28, 2025. It is now read-only.

Commit d662387

Browse files
committed
Updated the API so its no longer dependent on Bukkit API
1 parent adb7d95 commit d662387

File tree

16 files changed

+402
-98
lines changed

16 files changed

+402
-98
lines changed

nbproject/project.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@ dist.jar=${dist.dir}/AsyncWorldEdit-api.jar
2929
dist.javadoc.dir=${dist.dir}/javadoc
3030
endorsed.classpath=
3131
excludes=
32-
file.reference.craftbukkit.jar=lib/craftbukkit.jar
3332
file.reference.worldedit.jar=lib/worldedit.jar
3433
includes=**
3534
jar.compress=false
3635
javac.classpath=\
37-
${file.reference.craftbukkit.jar}:\
3836
${file.reference.worldedit.jar}
3937
# Space-separated list of extra javac options
4038
javac.compilerargs=

src/org/primesoft/asyncworldedit/api/IAsyncWorldEdit.java

Lines changed: 62 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
*/
4141
package org.primesoft.asyncworldedit.api;
4242

43+
import java.util.UUID;
4344
import org.primesoft.asyncworldedit.api.blockPlacer.IBlockPlacer;
4445
import org.primesoft.asyncworldedit.api.changesetSerializer.ISerializerManager;
4546
import org.primesoft.asyncworldedit.api.directChunk.IDirectChunkAPI;
@@ -50,81 +51,111 @@
5051

5152
/**
5253
* The main AsyncWorldEdit API class
54+
*
5355
* @author SBPrime
5456
*/
55-
public interface IAsyncWorldEdit {
57+
public interface IAsyncWorldEdit {
58+
5659
/**
5760
* Get the progress display manager
58-
* @return
61+
*
62+
* @return
5963
*/
6064
IProgressDisplayManager getProgressDisplayManager();
61-
62-
65+
6366
/**
6467
* Get the task dispatcher
65-
* @return
68+
*
69+
* @return
6670
*/
6771
ITaskDispatcher getTaskDispatcher();
68-
69-
72+
7073
/**
7174
* Get the block placer
72-
* @return
75+
*
76+
* @return
7377
*/
7478
IBlockPlacer getBlockPlacer();
75-
76-
79+
7780
/**
7881
* Get the physics watcher
79-
* @return
82+
*
83+
* @return
8084
*/
8185
IPhysicsWatch getPhysicsWatcher();
82-
8386

8487
/**
8588
* The player manager
86-
* @return
89+
*
90+
* @return
8791
*/
8892
IPlayerManager getPlayerManager();
89-
90-
93+
9194
/**
9295
* Get the direct chunk API
93-
* @return
96+
*
97+
* @return
9498
*/
9599
IDirectChunkAPI getDirectChunkAPI();
96-
97-
100+
98101
/**
99102
* Get the native API adapter
100-
* @return
103+
*
104+
* @return
101105
*/
102106
IAdapter getAdapter();
103-
107+
104108
/**
105109
* Get the current version of the API
106-
* @return
110+
*
111+
* @return
107112
*/
108113
double getAPIVersion();
109-
110-
114+
111115
/**
112-
* Get the current version of the API
113-
* detailed in format x.y.z
114-
* @return
116+
* Get the current version of the API detailed in format x.y.z
117+
*
118+
* @return
115119
*/
116120
byte[] getDetailAPIVersion();
117-
121+
118122
/**
119123
* Get the map manipulation utils
120-
* @return
124+
*
125+
* @return
121126
*/
122127
IMapUtils getMapUtils();
123-
124-
128+
125129
/**
126130
* Get the changeset serializer
127-
* @return
131+
*
132+
* @return
128133
*/
129134
ISerializerManager getChangesetSerializer();
135+
136+
/**
137+
* The WorldEdit integrator
138+
*
139+
* @return
140+
*/
141+
IWorldeditIntegrator getWorldEditIntegrator();
142+
143+
/**
144+
* Get the AsyncWorldEdit world
145+
* (wrapper for world)
146+
*
147+
* @param worldUUID
148+
* @return
149+
*/
150+
IWorld getWorld(UUID worldUUID);
151+
152+
153+
/**
154+
* Get the AsyncWorldEdit world
155+
* (wrapper for world)
156+
*
157+
* @param worldName
158+
* @return
159+
*/
160+
IWorld getWorld(String worldName);
130161
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* AsyncWorldEdit API
3+
* Copyright (c) 2015, 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;
42+
43+
/**
44+
*
45+
* @author SBPrime
46+
*/
47+
public class IChunk {
48+
49+
}

src/org/primesoft/asyncworldedit/api/IPhysicsWatch.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,15 @@ public interface IPhysicsWatch {
6565
*/
6666
void removeLocation(String worldName, Vector location);
6767

68+
69+
/**
70+
* Enable the physics watcher
71+
*/
72+
void enable();
73+
74+
/**
75+
* Disable the physics watcher
76+
*/
77+
void disable();
78+
6879
}

src/org/primesoft/asyncworldedit/api/IPlotMeFix.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
*/
4141
package org.primesoft.asyncworldedit.api;
4242

43-
import org.bukkit.entity.Player;
43+
import java.util.UUID;
4444

4545
/**
4646
* Basic PlotMe fix class. Used to fix the GMask before all WorldEdit operations
@@ -57,5 +57,5 @@ public interface IPlotMeFix {
5757
* Set the GMask based on PlotMe data
5858
* @param entry
5959
*/
60-
public void setMask(Player entry);
60+
public void setMask(UUID entry);
6161
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/*
2+
* AsyncWorldEdit API
3+
* Copyright (c) 2015, 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;
42+
43+
import java.util.UUID;
44+
45+
/**
46+
* World wrapper class
47+
* @author SBPrime
48+
*/
49+
public interface IWorld {
50+
/**
51+
* Get the world UUID
52+
* @return
53+
*/
54+
UUID getUID();
55+
56+
57+
/**
58+
* Get the world name
59+
* @return
60+
*/
61+
String getName();
62+
63+
/**
64+
* Regenerate world chunk
65+
* @param cx
66+
* @param cz
67+
*/
68+
void regenerateChunk(int cx, int cz);
69+
70+
71+
/**
72+
* Tests if the chunk is loaded
73+
* @param cx
74+
* @param cz
75+
* @return
76+
*/
77+
boolean isChunkLoaded(int cx, int cz);
78+
79+
/**
80+
* Get chunk at location
81+
* @param cx
82+
* @param cz
83+
* @return
84+
*/
85+
IChunk getChunkAt(int cx, int cz);
86+
}

0 commit comments

Comments
 (0)