Fixed regex-generation
This commit is contained in:
parent
f8c7672cfa
commit
8889a16bdc
@ -140,10 +140,13 @@ public class LinkedBeaconTeleporterManager {
|
||||
String regex = serialiseBeaconItem(name, lore);
|
||||
|
||||
// Wrap in regex-quotes
|
||||
regex = "\\Q"+ regex +"\\E";
|
||||
regex = "^\\Q"+ regex +"\\E$";
|
||||
// Exclude id from regex-quotes and create group
|
||||
regex = regex.replace("%id%", "\\E(.*)\\Q");
|
||||
|
||||
// Remove empty regex-quotes
|
||||
regex = regex.replace("\\E\\Q", "");
|
||||
|
||||
return regex;
|
||||
}
|
||||
String serialiseBeaconItem(String name, List<String> lore){
|
||||
|
Loading…
x
Reference in New Issue
Block a user