mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-13 21:08:34 +00:00
Fixing some things that weren't thread safe.
More import / formatting cleanup.
This commit is contained in:
@ -18,7 +18,6 @@ import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang.exception.ExceptionUtils;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.*;
|
||||
|
||||
@ -973,4 +972,16 @@ public class TFM_Util
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String inputStreamToString(InputStream is, boolean preserveNewlines) throws IOException
|
||||
{
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(is));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String line;
|
||||
while ((line = br.readLine()) != null)
|
||||
{
|
||||
sb.append(line).append(preserveNewlines ? System.lineSeparator() : "");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user