Bug fix,
Could not pass event AsyncPlayerChatEvent to EnderBank v1.20.1.a.1 java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.hasItemMeta()" because "item" is null
This commit is contained in:
parent
597ee7e756
commit
0e7b4c5d8b
89
.classpath
89
.classpath
@ -1,40 +1,49 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="module" value="true"/>
|
<attribute name="module" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="lib" path="HolographicDisplaysAPI-2.3.3-SNAPSHOT.jar">
|
<classpathentry kind="lib" path="HolographicDisplaysAPI-2.3.3-SNAPSHOT.jar">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="module" value="true"/>
|
<attribute name="module" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="lib" path="Vault.jar">
|
<classpathentry kind="lib" path="Vault.jar">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="module" value="true"/>
|
<attribute name="module" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="lib" path="D:/My Documents/Minecraft Stuff/1.18 Plugin Tester/bundler/libraries/spigot-api-1.18.1-R0.1-SNAPSHOT.jar">
|
<classpathentry kind="lib" path="D:/My Documents/Minecraft Stuff/1.18 Plugin Tester/bundler/libraries/spigot-api-1.18.1-R0.1-SNAPSHOT.jar">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="module" value="true"/>
|
<attribute name="module" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="lib" path="D:/My Documents/Minecraft Stuff/1.18 Plugin Tester/bundler/libraries/commons-io-2.11.0.jar">
|
<classpathentry kind="lib" path="D:/My Documents/Minecraft Stuff/1.18 Plugin Tester/bundler/libraries/commons-io-2.11.0.jar">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="module" value="true"/>
|
<attribute name="module" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="lib" path="D:/My Documents/Minecraft Stuff/1.18 Plugin Tester/bundler/libraries/gson-2.8.8.jar">
|
<classpathentry kind="lib" path="D:/My Documents/Minecraft Stuff/1.18 Plugin Tester/bundler/libraries/gson-2.8.8.jar">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="module" value="true"/>
|
<attribute name="module" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="lib" path="D:/My Documents/Minecraft Stuff/1.18 Plugin Tester/bundler/libraries/snakeyaml-1.28.jar">
|
<classpathentry kind="lib" path="D:/My Documents/Minecraft Stuff/1.18 Plugin Tester/bundler/libraries/snakeyaml-1.28.jar">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="module" value="true"/>
|
<attribute name="module" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="lib" path="/home/phil/.m2/repository/org/spigotmc/spigot-api/1.21.4-R0.1-SNAPSHOT/spigot-api-1.21.4-R0.1-SNAPSHOT.jar" sourcepath="/home/phil/.m2/repository/org/spigotmc/spigot-api/1.21.4-R0.1-SNAPSHOT/spigot-api-1.21.4-R0.1-SNAPSHOT-sources.jar">
|
||||||
</classpath>
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="maven.groupId" value="org.spigotmc"/>
|
||||||
|
<attribute name="maven.artifactId" value="spigot-api"/>
|
||||||
|
<attribute name="maven.version" value="1.21.4-R0.1-SNAPSHOT"/>
|
||||||
|
<attribute name="maven.scope" value="provided"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
</classpath>
|
||||||
|
|||||||
@ -336,6 +336,11 @@ public class BankStorage {
|
|||||||
public void openSearch(String search, Player opener) {
|
public void openSearch(String search, Player opener) {
|
||||||
//Load up inventory
|
//Load up inventory
|
||||||
this.itemIdentifiers = new ArrayList<Integer>();
|
this.itemIdentifiers = new ArrayList<Integer>();
|
||||||
|
if (items == null)
|
||||||
|
{
|
||||||
|
items=BankStorage.getBank(opener.getUniqueId()).items;
|
||||||
|
|
||||||
|
}
|
||||||
for(int i = 0;i < items.size();i++) {
|
for(int i = 0;i < items.size();i++) {
|
||||||
ItemStack item = items.get(i);
|
ItemStack item = items.get(i);
|
||||||
|
|
||||||
|
|||||||
@ -416,15 +416,15 @@ public class EnderBank extends JavaPlugin implements Listener {
|
|||||||
if(handler.equals("banksearch")) {
|
if(handler.equals("banksearch")) {
|
||||||
queue.remove(queue.size() - 1);
|
queue.remove(queue.size() - 1);
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
Block b = p.getTargetBlock(null, 10);
|
// Block b = p.getTargetBlock(null, 10);
|
||||||
if(!pf.getBoolean("Must_Look_At_Chest_To_Search") || b.getType().equals(Material.ENDER_CHEST)) {
|
// if(!pf.getBoolean("Must_Look_At_Chest_To_Search") || b.getType().equals(Material.ENDER_CHEST)) {
|
||||||
String search = e.getMessage();
|
String search = e.getMessage();
|
||||||
BankStorage bank = BankStorage.searchDatabase.get(p);
|
BankStorage bank = BankStorage.searchDatabase.get(p);
|
||||||
bank.openSearch(search, p);
|
bank.openSearch(search, p);
|
||||||
}else {
|
// }else {
|
||||||
p.sendMessage(ViperStringUtils.makeColors(formatString(messages.getString("Open_Inventory_Not_Looking_At_Ender"), p.getUniqueId())));
|
// p.sendMessage(ViperStringUtils.makeColors(formatString(messages.getString("Open_Inventory_Not_Looking_At_Ender"), p.getUniqueId())));
|
||||||
// p.sendMessage(EnderBank.notificationString + " You must be looking at an ender chest!");
|
// p.sendMessage(EnderBank.notificationString + " You must be looking at an ender chest!");
|
||||||
}
|
// }
|
||||||
BankStorage.searchDatabase.remove(p);
|
BankStorage.searchDatabase.remove(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user