From 9030d0adfb6990ed50a839314f9113e97ebadd5f Mon Sep 17 00:00:00 2001 From: FandMC Date: Sat, 2 Nov 2024 19:16:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=9C=89=E6=A6=82?= =?UTF-8?q?=E7=8E=87=E9=9A=8F=E6=9C=BA=E4=BC=A0=E9=80=81=E6=9C=AA=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E5=B0=B1=E6=8F=90=E5=89=8D=E7=BB=93=E6=9D=9F=E5=A4=B1?= =?UTF-8?q?=E6=98=8E=E6=95=88=E6=9E=9C=EF=BC=8C=E4=BC=98=E5=8C=96=E5=8D=A1?= =?UTF-8?q?=E9=A1=BF=E6=9C=8D=E5=8A=A1=E5=99=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fandtpa/Main.java | 1 - src/main/java/com/fandtpa/commands/command/TprandomCommand.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/fandtpa/Main.java b/src/main/java/com/fandtpa/Main.java index 7237538..bd854b4 100644 --- a/src/main/java/com/fandtpa/Main.java +++ b/src/main/java/com/fandtpa/Main.java @@ -386,5 +386,4 @@ public void executePortalCommand(Player player, PortalData portalData) { public Map getPortalMap() { return portalMap; } - } \ No newline at end of file diff --git a/src/main/java/com/fandtpa/commands/command/TprandomCommand.java b/src/main/java/com/fandtpa/commands/command/TprandomCommand.java index 5da8822..4460746 100644 --- a/src/main/java/com/fandtpa/commands/command/TprandomCommand.java +++ b/src/main/java/com/fandtpa/commands/command/TprandomCommand.java @@ -72,7 +72,7 @@ public void run() { private Location getRandomSafeLocation(Player player) { Random random = new Random(); World world = player.getWorld(); - int maxAttempts = 10; + int maxAttempts = 5; for (int attempts = 0; attempts < maxAttempts; attempts++) { double x = player.getLocation().getX() + random.nextInt(20001) - 10000;