Ver código fonte

fixed players.near argument indices

Kajetan Johannes Hammerle 6 anos atrás
pai
commit
024c4b19ca

+ 2 - 2
src/main/java/me/km/snuviscript/MinecraftFunctions.java

@@ -473,8 +473,8 @@ public class MinecraftFunctions
         sm.registerFunction("players.toworldlist", (sc, in) -> new ArrayList(((World) in[0].get(sc)).playerEntities));
         sm.registerFunction("players.near", (sc, in) -> 
         {     
-            Location l = (Location) in[1].get(sc);
-            return Utils.getPlayers(l.getWorld(), l.getX(), l.getY(), l.getZ(), in[2].getDouble(sc)); 
+            Location l = (Location) in[0].get(sc);
+            return Utils.getPlayers(l.getWorld(), l.getX(), l.getY(), l.getZ(), in[1].getDouble(sc)); 
         });
         
         // ---------------------------------------------------------------------