2 Angajamente 46d74a2e71 ... 062af591d4

Autor SHA1 Permisiunea de a trimite mesaje. Dacă este dezactivată, utilizatorul nu va putea trimite nici un fel de mesaj Data
  mastercake10 062af591d4 update minor version 10 luni în urmă
  mastercake10 4ecd43e053 only open atm on right click 10 luni în urmă
4 a modificat fișierele cu 12 adăugiri și 9 ștergeri
  1. 2 2
      Plugin/pom.xml
  2. 8 5
      Plugin/src/main/java/de/Linus122/TimeIsMoney/ATM.java
  3. 1 1
      Tools/pom.xml
  4. 1 1
      pom.xml

+ 2 - 2
Plugin/pom.xml

@@ -7,7 +7,7 @@
 	<parent>
 		<groupId>de.Linus122.TimeIsMoney</groupId>
 		<artifactId>parent</artifactId>
-		<version>1.9.8</version>
+		<version>1.9.9</version>
 		<relativePath>../pom.xml</relativePath>
 	</parent>
 
@@ -111,7 +111,7 @@
 		<dependency>
 			<groupId>de.Linus122.TimeIsMoney</groupId>
 			<artifactId>Tools</artifactId>
-			<version>1.9.8</version>
+			<version>1.9.9</version>
 		</dependency>
         <dependency>
             <groupId>org.jetbrains</groupId>

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

@@ -29,6 +29,7 @@ import org.bukkit.event.Event.Result;
 import org.bukkit.event.EventHandler;
 import org.bukkit.event.EventPriority;
 import org.bukkit.event.Listener;
+import org.bukkit.event.block.Action;
 import org.bukkit.event.block.SignChangeEvent;
 import org.bukkit.event.inventory.InventoryCloseEvent;
 import org.bukkit.event.inventory.InventoryDragEvent;
@@ -327,11 +328,13 @@ public class ATM implements Listener, CommandExecutor {
 			if (e.getClickedBlock().getState() instanceof Sign) {
 				Sign sign = (Sign) e.getClickedBlock().getState();
 				if (sign.getLine(0).equalsIgnoreCase(CC(Main.finalconfig.getString("atm_sign_label")))) {
-					e.setCancelled(true);
-					if (!e.getPlayer().hasPermission("tim.atm.use")) {
-						e.getPlayer().sendMessage(CC(Main.finalconfig.getString("message_atm_noperms")));
-					} else {
-						this.openGUI(e.getPlayer());
+					if(e.getAction() == Action.RIGHT_CLICK_BLOCK) {
+						e.setCancelled(true);
+						if (!e.getPlayer().hasPermission("tim.atm.use")) {
+							e.getPlayer().sendMessage(CC(Main.finalconfig.getString("message_atm_noperms")));
+						} else {
+							this.openGUI(e.getPlayer());
+						}
 					}
 				}
 			}

+ 1 - 1
Tools/pom.xml

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

+ 1 - 1
pom.xml

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