Browse Source

fixed #38 and actionbars for 1.14

MasterCake 5 years ago
parent
commit
548006c662

+ 17 - 12
Plugin/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>de.Linus122.TimeIsMoney</groupId>
         <artifactId>parent</artifactId>
-        <version>1.9.6.6</version>
+        <version>1.9.6.7</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -83,57 +83,62 @@
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>Tools</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>v1_8_R1</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>v1_8_R2</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>v1_8_R3</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>v1_9_R1</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>v1_9_R2</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>v1_10_R1</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>v1_11_R1</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>v1_12_R1</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>v1_13_R1</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>v1_13_R2</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
+        </dependency>
+        <dependency>
+            <groupId>de.Linus122.TimeIsMoney</groupId>
+            <artifactId>v1_14_R1</artifactId>
+            <version>1.9.6.7</version>
         </dependency>
     </dependencies>
 </project>

+ 4 - 4
Plugin/src/main/java/de/Linus122/TimeIsMoney/ATM.java

@@ -202,7 +202,7 @@ public class ATM implements Listener, CommandExecutor {
 	@EventHandler(priority = EventPriority.HIGHEST)
 	public void onInteract(PlayerInteractEvent e) {
 		if (e.getClickedBlock() != null) {
-			if (e.getClickedBlock().getType() == Material.getMaterial("WALL_SIGN") || e.getClickedBlock().getType() == Material.getMaterial("SIGN") || e.getClickedBlock().getType() == Material.getMaterial("SIGN_POST")) {
+			if (e.getClickedBlock().getType().name().contains("SIGN")) {
 				Sign sign = (Sign) e.getClickedBlock().getState();
 				if (sign.getLine(0).equalsIgnoreCase(CC("&cATM"))) {
 					if (!e.getPlayer().hasPermission("tim.atm.use")) {
@@ -217,7 +217,7 @@ public class ATM implements Listener, CommandExecutor {
 	
 	@EventHandler
 	public void onMove(InventoryMoveItemEvent e) {
-		if (e.getSource() == null) return;
+		if (e.getSource() == null || e.getSource().getViewers().size() == 0 || e.getSource().getViewers().get(0).getOpenInventory() == null) return;
 		if (e.getSource().getViewers().get(0).getOpenInventory().getTitle() == null) return;
 		if (e.getSource().getViewers().get(0).getOpenInventory().getTitle().equals(CC(Main.finalconfig.getString("atm_title")))) {
 			e.setCancelled(true);
@@ -361,9 +361,9 @@ public class ATM implements Listener, CommandExecutor {
 	@EventHandler
 	public void onSignChange(final SignChangeEvent e) {
 		final Block b = e.getBlock();
-		if (b.getType() == Material.getMaterial("WALL_SIGN") || b.getType() == Material.getMaterial("SIGN") || b.getType() == Material.getMaterial("SIGN_POST")) {
+		if (b.getType().name().contains("SIGN")) {
 			plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, () -> {
-				if (b.getType() == Material.getMaterial("WALL_SIGN") || b.getType() == Material.getMaterial("SIGN") || b.getType() == Material.getMaterial("SIGN_POST")) {
+				if (b.getType().name().contains("SIGN")) {
 					Sign sign = (Sign) e.getBlock().getState();
 					if (sign.getLine(0).equalsIgnoreCase("[atm]")) {
 						if (!e.getPlayer().hasPermission("tim.atm.place")) {

+ 1 - 1
Tools/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>de.Linus122.TimeIsMoney</groupId>
         <artifactId>parent</artifactId>
-        <version>1.9.6.6</version>
+        <version>1.9.6.7</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 

+ 1 - 1
Tools/src/main/java/de/Linus122/TimeIsMoney/tools/Utils.java

@@ -24,7 +24,7 @@ public class Utils {
 	 */
 	public static String CC(String s) {
 		// return an empty string if given string is null
-		if(s != null) {
+		if(s == null) {
 			return "";
 		}
 		return ChatColor.translateAlternateColorCodes('&', s);

+ 1 - 1
pom.xml

@@ -6,7 +6,7 @@
 
     <groupId>de.Linus122.TimeIsMoney</groupId>
     <artifactId>parent</artifactId>
-    <version>1.9.6.6</version>
+    <version>1.9.6.7</version>
     <name>TimeIsMoney Parent</name>
     <url>https://www.spigotmc.org/resources/time-is-money.12409/</url>
     <packaging>pom</packaging>

+ 2 - 2
v1_10_R1/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>de.Linus122.TimeIsMoney</groupId>
         <artifactId>parent</artifactId>
-        <version>1.9.6.6</version>
+        <version>1.9.6.7</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -35,7 +35,7 @@
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>Tools</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
     </dependencies>
 </project>

+ 2 - 2
v1_11_R1/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>de.Linus122.TimeIsMoney</groupId>
         <artifactId>parent</artifactId>
-        <version>1.9.6.6</version>
+        <version>1.9.6.7</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -35,7 +35,7 @@
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>Tools</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
     </dependencies>
 </project>

+ 2 - 2
v1_12_R1/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>de.Linus122.TimeIsMoney</groupId>
         <artifactId>parent</artifactId>
-        <version>1.9.6.6</version>
+        <version>1.9.6.7</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -35,7 +35,7 @@
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>Tools</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
     </dependencies>
 </project>

+ 2 - 2
v1_13_R1/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>de.Linus122.TimeIsMoney</groupId>
         <artifactId>parent</artifactId>
-        <version>1.9.6.6</version>
+        <version>1.9.6.7</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -35,7 +35,7 @@
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>Tools</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
     </dependencies>
 </project>

+ 2 - 2
v1_13_R2/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>de.Linus122.TimeIsMoney</groupId>
         <artifactId>parent</artifactId>
-        <version>1.9.6.6</version>
+        <version>1.9.6.7</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -35,7 +35,7 @@
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>Tools</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
     </dependencies>
 </project>

+ 2 - 2
v1_14_R1/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>de.Linus122.TimeIsMoney</groupId>
         <artifactId>parent</artifactId>
-        <version>1.9.6.6</version>
+        <version>1.9.6.7</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -35,7 +35,7 @@
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>Tools</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
     </dependencies>
 </project>

+ 2 - 2
v1_8_R1/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>de.Linus122.TimeIsMoney</groupId>
         <artifactId>parent</artifactId>
-        <version>1.9.6.6</version>
+        <version>1.9.6.7</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -35,7 +35,7 @@
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>Tools</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
     </dependencies>
 </project>

+ 2 - 2
v1_8_R2/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>de.Linus122.TimeIsMoney</groupId>
         <artifactId>parent</artifactId>
-        <version>1.9.6.6</version>
+        <version>1.9.6.7</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -35,7 +35,7 @@
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>Tools</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
     </dependencies>
 </project>

+ 2 - 2
v1_8_R3/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>de.Linus122.TimeIsMoney</groupId>
         <artifactId>parent</artifactId>
-        <version>1.9.6.6</version>
+        <version>1.9.6.7</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -35,7 +35,7 @@
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>Tools</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
     </dependencies>
 </project>

+ 2 - 2
v1_9_R1/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>de.Linus122.TimeIsMoney</groupId>
         <artifactId>parent</artifactId>
-        <version>1.9.6.6</version>
+        <version>1.9.6.7</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -35,7 +35,7 @@
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>Tools</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
     </dependencies>
 </project>

+ 2 - 2
v1_9_R2/pom.xml

@@ -7,7 +7,7 @@
     <parent>
         <groupId>de.Linus122.TimeIsMoney</groupId>
         <artifactId>parent</artifactId>
-        <version>1.9.6.6</version>
+        <version>1.9.6.7</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -35,7 +35,7 @@
         <dependency>
             <groupId>de.Linus122.TimeIsMoney</groupId>
             <artifactId>Tools</artifactId>
-            <version>1.9.6.6</version>
+            <version>1.9.6.7</version>
         </dependency>
     </dependencies>
 </project>