mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 06:38:56 +00:00
Addressing (hopefully) npe in Compat listener.
This commit is contained in:
@@ -3,8 +3,6 @@ root = true
|
|||||||
[*]
|
[*]
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
[*.java]
|
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<groupId>com.dre</groupId>
|
<groupId>com.dre</groupId>
|
||||||
<artifactId>brewery</artifactId>
|
<artifactId>brewery</artifactId>
|
||||||
<version>1.4.0</version>
|
<version>1.4.1</version>
|
||||||
<name>Brewery</name>
|
<name>Brewery</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<!-- Static resources -->
|
<!-- Static resources -->
|
||||||
<resource>
|
<resource>
|
||||||
<filtering>false</filtering>
|
<filtering>true</filtering>
|
||||||
<directory>${project.basedir}/resources</directory>
|
<directory>${project.basedir}/resources</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/*.yml</include>
|
<include>**/*.yml</include>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: Brewery
|
name: ${project.name}
|
||||||
version: 1.4.0
|
version: ${project.version}
|
||||||
main: com.dre.brewery.P
|
main: com.dre.brewery.P
|
||||||
authors: [Milan Albrecht, Frank Baumann, ProgrammerDan]
|
authors: [Milan Albrecht, Frank Baumann, ProgrammerDan]
|
||||||
softdepend: [LWC, LogBlock, WorldGuard, GriefPrevention, Vault]
|
softdepend: [LWC, LogBlock, WorldGuard, GriefPrevention, Vault]
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ public class P extends JavaPlugin {
|
|||||||
use1_9 = !v.matches(".*1\\.[0-8].*");
|
use1_9 = !v.matches(".*1\\.[0-8].*");
|
||||||
if (use1_9) {
|
if (use1_9) {
|
||||||
log("&cExperimental support for Bukkit 1.9 enabled.");
|
log("&cExperimental support for Bukkit 1.9 enabled.");
|
||||||
log("&cPlease note that the changes of 1.9 make a build of Brewery with the same quality as for older versions impossible.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// load the Config
|
// load the Config
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ public class Compat1_9 implements Listener {
|
|||||||
if (item.getType() == Material.POTION) {
|
if (item.getType() == Material.POTION) {
|
||||||
try {
|
try {
|
||||||
PotionMeta meta = (PotionMeta) item.getItemMeta();
|
PotionMeta meta = (PotionMeta) item.getItemMeta();
|
||||||
meta.setMainEffect(null);
|
// Throw away former "base" effect and replace with MUNDANE.
|
||||||
|
meta.setBasePotionData(new PotionData(PotionType.MUNDANE, false, false));
|
||||||
item.setItemMeta(meta);
|
item.setItemMeta(meta);
|
||||||
} catch (Exception exception) {}
|
} catch (Exception exception) {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user