mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-09-29 15:07:40 +02:00
Compile with 1.8.8
This commit is contained in:
parent
40427e427c
commit
d56fc3abf7
11
pom.xml
11
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.acrobot.chestshop</groupId>
|
<groupId>com.acrobot.chestshop</groupId>
|
||||||
<artifactId>chestshop</artifactId>
|
<artifactId>chestshop</artifactId>
|
||||||
<version>3.9.1-SNAPSHOT</version>
|
<version>3.9.1-1.8.8-hotfix</version>
|
||||||
<description>Chest-and-sign shop plugin for Bukkit</description>
|
<description>Chest-and-sign shop plugin for Bukkit</description>
|
||||||
<name>ChestShop</name>
|
<name>ChestShop</name>
|
||||||
|
|
||||||
@ -70,14 +70,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<artifactId>log4j-core</artifactId>
|
<artifactId>log4j-core</artifactId>
|
||||||
<version>2.1</version>
|
<version>2.0-beta9</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<version>1.12-R0.1-SNAPSHOT</version>
|
<version>1.8.8-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@ -102,6 +102,7 @@
|
|||||||
<groupId>org.bstats</groupId>
|
<groupId>org.bstats</groupId>
|
||||||
<artifactId>bstats-bukkit-lite</artifactId>
|
<artifactId>bstats-bukkit-lite</artifactId>
|
||||||
<version>1.1</version>
|
<version>1.1</version>
|
||||||
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -125,7 +126,7 @@
|
|||||||
<groupId>info.somethingodd</groupId>
|
<groupId>info.somethingodd</groupId>
|
||||||
<artifactId>odditem</artifactId>
|
<artifactId>odditem</artifactId>
|
||||||
<version>0.9.5</version>
|
<version>0.9.5</version>
|
||||||
<scope>compile</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
@ -275,7 +276,7 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>${project.name}</finalName>
|
<finalName>${project.name}-${project.version}</finalName>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
@ -14,19 +14,9 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
* @author Acrobot
|
* @author Acrobot
|
||||||
*/
|
*/
|
||||||
public class InventoryUtil {
|
public class InventoryUtil {
|
||||||
private static Boolean legacyContents = null;
|
|
||||||
|
|
||||||
private static ItemStack[] getStorageContents(Inventory inventory) {
|
private static ItemStack[] getStorageContents(Inventory inventory) {
|
||||||
if (legacyContents == null) {
|
return inventory.getContents();
|
||||||
try {
|
|
||||||
inventory.getStorageContents();
|
|
||||||
legacyContents = false;
|
|
||||||
} catch (NoSuchMethodError e) {
|
|
||||||
legacyContents = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return legacyContents ? inventory.getContents() : inventory.getStorageContents();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -391,10 +391,10 @@ public class MaterialUtil {
|
|||||||
if (color != null) {
|
if (color != null) {
|
||||||
((Colorable) materialData).setColor(color);
|
((Colorable) materialData).setColor(color);
|
||||||
}
|
}
|
||||||
} else if (materialData instanceof Wood) {
|
} else if (materialData instanceof Tree) {
|
||||||
TreeSpecies species = new EnumParser<TreeSpecies>().parse(type, TreeSpecies.values());
|
TreeSpecies species = new EnumParser<TreeSpecies>().parse(type, TreeSpecies.values());
|
||||||
if (species != null) {
|
if (species != null) {
|
||||||
((Wood) materialData).setSpecies(species);
|
((Tree) materialData).setSpecies(species);
|
||||||
}
|
}
|
||||||
} else if (materialData instanceof SpawnEgg) {
|
} else if (materialData instanceof SpawnEgg) {
|
||||||
EntityType entityType = new EnumParser<EntityType>().parse(type, EntityType.values());
|
EntityType entityType = new EnumParser<EntityType>().parse(type, EntityType.values());
|
||||||
@ -435,9 +435,8 @@ public class MaterialUtil {
|
|||||||
DyeColor color = ((Colorable) data).getColor();
|
DyeColor color = ((Colorable) data).getColor();
|
||||||
|
|
||||||
return (color != null ? color.name() : null);
|
return (color != null ? color.name() : null);
|
||||||
} else if (data instanceof Wood) {
|
} else if (data instanceof Tree) {
|
||||||
//TreeSpecies specie = TreeSpecies.getByData((byte) (data.getData() & 3)); //This works, but not as intended
|
TreeSpecies specie = ((Tree) data).getSpecies();
|
||||||
TreeSpecies specie = ((Wood) data).getSpecies();
|
|
||||||
return (specie != null && specie != TreeSpecies.GENERIC ? specie.name() : null);
|
return (specie != null && specie != TreeSpecies.GENERIC ? specie.name() : null);
|
||||||
} else if (data instanceof SpawnEgg) {
|
} else if (data instanceof SpawnEgg) {
|
||||||
EntityType type = ((SpawnEgg) data).getSpawnedType();
|
EntityType type = ((SpawnEgg) data).getSpawnedType();
|
||||||
|
@ -67,16 +67,6 @@ public class AdminInventory implements Inventory {
|
|||||||
public void setContents(ItemStack[] itemStacks) {
|
public void setContents(ItemStack[] itemStacks) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemStack[] getStorageContents() {
|
|
||||||
return new ItemStack[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setStorageContents(ItemStack[] itemStacks) throws IllegalArgumentException {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean contains(int i) {
|
public boolean contains(int i) {
|
||||||
return true;
|
return true;
|
||||||
@ -216,9 +206,4 @@ public class AdminInventory implements Inventory {
|
|||||||
public ListIterator<ItemStack> iterator(int i) {
|
public ListIterator<ItemStack> iterator(int i) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Location getLocation() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ public class PlayerInteract implements Listener {
|
|||||||
|
|
||||||
if (Properties.ALLOW_AUTO_ITEM_FILL && ChatColor.stripColor(sign.getLine(ITEM_LINE)).equals(AUTOFILL_CODE)) {
|
if (Properties.ALLOW_AUTO_ITEM_FILL && ChatColor.stripColor(sign.getLine(ITEM_LINE)).equals(AUTOFILL_CODE)) {
|
||||||
if (canAccess) {
|
if (canAccess) {
|
||||||
ItemStack item = player.getInventory().getItemInMainHand();
|
ItemStack item = player.getInventory().getItemInHand();
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
String itemCode = MaterialUtil.getSignName(item);
|
String itemCode = MaterialUtil.getSignName(item);
|
||||||
String[] lines = sign.getLines();
|
String[] lines = sign.getLines();
|
||||||
|
Loading…
Reference in New Issue
Block a user