File tree Expand file tree Collapse file tree 3 files changed +28
-2
lines changed
src/main/java/com/codehusky/huskyui Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 66
77 <groupId >com.codehusky</groupId >
88 <artifactId >HuskyUI</artifactId >
9- <version >0.5.0 </version >
9+ <version >0.5.1 </version >
1010
1111 <repositories >
1212 <repository >
Original file line number Diff line number Diff line change @@ -200,11 +200,24 @@ public boolean elementExists(int id){
200200 return elements .containsKey (id );
201201 }
202202
203+ /**
204+ * Check to see if an element at a given id is auto-inv
205+ *
206+ * @param id element id
207+ * @return if element is auto-inv
208+ */
203209 public boolean isElementAuto (int id ){
204210 if (!elements .containsKey (id )) throw new RuntimeException ("Cannot check if element is auto: Element id \" " + id + "\" is not registered." );
205211 return autoInvElements .contains (id );
206212 }
207213
214+ /**
215+ * Check to see if an element is in a fixed position<br>
216+ * Accessing this with a non-auto-inv item will throw a runtime exception.
217+ *
218+ * @param id element id
219+ * @return if element is fixed position
220+ */
208221 public boolean isElementFixedAuto (int id ){
209222 if (!isElementAuto (id )) throw new RuntimeException ("Cannot check if element is fixed auto: Element \" " + id + "\" is not auto." );
210223 return autoInvLocations .values ().contains (id );
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ public class HuskyUI {
8282 /**
8383 * The Version of HuskyUI for Sponge.
8484 */
85- public static final String PLUGIN_VERSION = "0.5.0 " ;
85+ public static final String PLUGIN_VERSION = "0.5.1 " ;
8686
8787 /**
8888 * The HuskyUI {@link Logger} used throughout the plugin.
@@ -274,6 +274,11 @@ public void onElementInteract(InteractItemEvent event){
274274 }
275275 }
276276
277+
278+ /**
279+ * Handle item drops
280+ * @param event dispense event
281+ */
277282 @ Listener
278283 public void onItemDrop (DropItemEvent .Dispense event ){
279284 for (Entity e :event .getEntities ()){
@@ -290,6 +295,10 @@ public void onItemDrop(DropItemEvent.Dispense event){
290295 }
291296 }
292297
298+ /**
299+ * Handle item usage
300+ * @param event useitemstackevent.start
301+ */
293302 @ Listener
294303 public void onItemUse (UseItemStackEvent .Start event ){
295304 Optional <Integer > potentialID = registry .getElementIDFromItemStack (event .getItemStackInUse ().createStack ());
@@ -300,6 +309,10 @@ public void onItemUse(UseItemStackEvent.Start event){
300309 }
301310 }
302311
312+ /**
313+ * Handle inventory clicks
314+ * @param event clickinvevent
315+ */
303316 @ Listener (order = Order .PRE )
304317 public void onItemClick (ClickInventoryEvent event ){
305318
You can’t perform that action at this time.
0 commit comments