Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NazrinNya committed Dec 27, 2023
1 parent 12d0cf2 commit 6864c6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/main/java/plugin/Plugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import plugin.models.PlayerData;
import useful.Bundle;

import java.io.File;
import java.io.IOException;
import java.util.Map;

Expand Down Expand Up @@ -72,6 +73,10 @@ public Plugin() throws IOException, ParseException {
mongoClient = MongoClients.create(string);
db = mongoClient.getDatabase("mindustry").withCodecRegistry(pojoCodecRegistry);
newCollection = db.getCollection("newplayers", PlayerData.class);
File dir = new File(Vars.tmpDirectory.absolutePath());
if (!dir.exists()){
dir.mkdir();
}
}

// starts once plugin is started
Expand Down
1 change: 0 additions & 1 deletion src/main/java/plugin/discord/Bot.java
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ private static void onMessageCreate(MessageCreateEvent listener) {
String response;

String id = listener.getMessageContent().split(" ")[1];
MessageAttachment atc = listener.getMessage().getAttachments().get(0);
String reason = readValueFromArraySeparated(listener.getMessageContent().split(" "), 3, listener.getMessageContent().split(" ").length);
if (!canParseInt(listener.getMessageContent().split(" ")[2])){
listener.getChannel().sendMessage("Please, type a number in time!");
Expand Down

0 comments on commit 6864c6e

Please sign in to comment.