Skip to content

Commit

Permalink
Added a cast for the teleport delay to a long.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccoystephenson committed Mar 7, 2022
1 parent 92ce2de commit 195e8ff
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void scheduleTeleport(Player player, Location destinationLocation) {
final int teleport_delay = LocalConfigService.getInstance().getInt("teleportDelay");
player.sendMessage(ChatColor.AQUA + "Teleporting in " + teleport_delay + " seconds...");
DelayedTeleportTask delayedTeleportTask = new DelayedTeleportTask(teleport_delay, player, destinationLocation);
delayedTeleportTask.runTaskLater(MedievalFactions.getInstance(), teleport_delay * getRandomNumberBetween(15, 25));
delayedTeleportTask.runTaskLater(MedievalFactions.getInstance(), (long) (teleport_delay * getRandomNumberBetween(15, 25)));
}

private int getRandomNumberBetween(int num1, int num2) {
Expand Down

0 comments on commit 195e8ff

Please sign in to comment.