Update Spigot to Minecraft 1.6.2

By: md_5 <md_5@live.com.au>
This commit is contained in:
Spigot
2013-07-09 10:31:10 +10:00
parent 0485474219
commit 6fe8638955
25 changed files with 140 additions and 421 deletions

View File

@@ -1,11 +1,11 @@
From e73321d034e8457dde548fbf9fcdb45dd8414bda Mon Sep 17 00:00:00 2001
From 8452737fcbc24d005dce588dd62e42f64fbee981 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 10:36:24 +1000
Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index 1794291..bc164c0 100644
index 2401f81..95d042b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,43 +1,23 @@
@@ -23,7 +23,7 @@ index 1794291..bc164c0 100644
+
+ <groupId>org.spigotmc</groupId>
+ <artifactId>spigot-api</artifactId>
<version>1.6.1-R0.1-SNAPSHOT</version>
<version>1.6.2-R0.1-SNAPSHOT</version>
- <name>Bukkit</name>
- <url>http://www.bukkit.org</url>
+ <name>Spigot-API</name>

View File

@@ -1,46 +0,0 @@
From d2c9c65d41116c92c03c09aa6f90ab080358ffc2 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Mon, 8 Jul 2013 12:37:21 +1000
Subject: [PATCH] Add 1.6 Potion Effects
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
index 536e59b..855bda1 100644
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
@@ -108,6 +108,32 @@ public abstract class PotionEffectType {
* Deals damage to an entity over time and gives the health to the shooter.
*/
public static final PotionEffectType WITHER = new PotionEffectTypeWrapper(20);
+ // Spigot Start
+ /**
+ * Adds 4 HP points.
+ *
+ * @deprecated this is a Spigot API which may be subject to removal or
+ * change pending Bukkit addition.
+ */
+ @Deprecated
+ public static final PotionEffectType HEALTH_BOOST = new PotionEffectTypeWrapper( 21 );
+ /**
+ * Adds 4 absorption HP which absorb damage inflicted.
+ *
+ * @deprecated this is a Spigot API which may be subject to removal or
+ * change pending Bukkit addition.
+ */
+ @Deprecated
+ public static final PotionEffectType ABSORPTION = new PotionEffectTypeWrapper( 22 );
+ /**
+ * Causes the food meter to be replenished by 1 point each tick.
+ *
+ * @deprecated this is a Spigot API which may be subject to removal or
+ * change pending Bukkit addition.
+ */
+ @Deprecated
+ public static final PotionEffectType SATURATION = new PotionEffectTypeWrapper( 23 );
+ // Spigot End
private final int id;
--
1.8.1.2

View File

@@ -0,0 +1,54 @@
From fb9382fe420c5f7d200cedb929bbeba37eef4531 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 7 Jul 2013 10:32:05 -0400
Subject: [PATCH] InventoryClickEvent getClickedInventory
Add InventoryClickEvent.getClickedInventory. Adds BUKKIT-4495
Plugins currently have to do the logic themselves on the raw slot ID
in order to determine the inventory clicked. This provides the logic for plugins to
readily identify which inventory was clicked.
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
index 28198b8..3313d91 100644
--- a/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
+++ b/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
@@ -47,6 +47,7 @@ public class InventoryClickEvent extends InventoryInteractEvent {
private static final HandlerList handlers = new HandlerList();
private final ClickType click;
private final InventoryAction action;
+ private final Inventory clickedInventory;
private SlotType slot_type;
private int whichSlot;
private int rawSlot;
@@ -62,6 +63,13 @@ public class InventoryClickEvent extends InventoryInteractEvent {
super(view);
this.slot_type = type;
this.rawSlot = slot;
+ if (slot < 0) {
+ this.clickedInventory = null;
+ } else if (view.getTopInventory() != null && slot < view.getTopInventory().getSize()) {
+ this.clickedInventory = view.getTopInventory();
+ } else {
+ this.clickedInventory = view.getBottomInventory();
+ }
this.whichSlot = view.convertSlot(slot);
this.click = click;
this.action = action;
@@ -73,6 +81,14 @@ public class InventoryClickEvent extends InventoryInteractEvent {
}
/**
+ * Gets the inventory that was clicked, or null if outside of window
+ * @return The clicked inventory
+ */
+ public Inventory getClickedInventory() {
+ return clickedInventory;
+ }
+
+ /**
* Gets the type of slot that was clicked.
*
* @return the slot type
--
1.8.1.2