Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SuppressWarnings("unchecked")
- public static void loadTokens() {
- String fileDir = main
- .getConfig()
- .getString("saveDir");
- try {
- FileInputStream fileIn = new FileInputStream(
- fileDir);
- ObjectInputStream in = new ObjectInputStream(fileIn);
- MiniTokenMain.usTokens = (HashMap<UUID, Integer>) in.readObject();
- in.close();
- fileIn.close();
- } catch (IOException i) {
- i.printStackTrace();
- } catch (ClassNotFoundException c) {
- System.out.println("Class not found");
- c.printStackTrace();
- }
- }
- public static void saveToaddTokens() {
- String fileDir = main.getConfig().getString("saveDirTwo");
- try {
- FileOutputStream fileOut = new FileOutputStream(
- fileDir);
- ObjectOutputStream out = new ObjectOutputStream(fileOut);
- out.writeObject(MiniTokenMain.toAddTokens);
- out.close();
- fileOut.close();
- } catch (IOException i) {
- i.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement