From b1169f48dbd15b29ede5671de22caf36cb40e77a Mon Sep 17 00:00:00 2001 From: Ruakij Date: Sun, 9 May 2021 23:15:25 +0200 Subject: [PATCH] Ability to create new LinkedBeaconTeleporterItem --- .../ruakij/LinkedBeaconTeleporters/Function.java | 11 +++++++++++ .../LinkedBeaconTeleporter.java | 4 ++++ .../LinkedBeaconTeleporterItem.java | 6 ++++++ 3 files changed, 21 insertions(+) diff --git a/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/Function.java b/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/Function.java index fb98e74..00a7f96 100644 --- a/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/Function.java +++ b/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/Function.java @@ -27,4 +27,15 @@ public class Function { throw new InvalidPropertiesFormatException("Could not deserialize BlockLocation '"+ serialisedLoc +"'"); } } + + public static String randomString(String alphabet, int length){ + char[] alphabetChars = alphabet.toCharArray(); + + String str = ""; + Random random = new Random(); + for(int i=0; i