This commit is contained in:
rrryfu
2023-09-25 23:19:16 +08:00
parent bbbbf9cada
commit 628bfc397e
7 changed files with 79 additions and 8 deletions
generated
+1 -1
View File
@@ -1 +1 @@
mc-srv2-notifyonstart
notifyonstart
-1
View File
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<list size="1">
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/modules/notifyonstart.main.iml" filepath="$PROJECT_DIR$/.idea/modules/notifyonstart.main.iml" />
</modules>
</component>
</project>
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="FacetManager">
<facet type="minecraft" name="Minecraft">
<configuration>
<autoDetectTypes>
<platformType>SPIGOT</platformType>
</autoDetectTypes>
</configuration>
</facet>
</component>
</module>
+53
View File
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="ce97b9f5-6785-4670-b350-12f90ab9ea27" name="Changes" comment="">
<change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/modules/notifyonstart.main.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/settings.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/settings.gradle" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/cf/sobrooms/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/cf/sobrooms/Main.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectColorInfo"><![CDATA[{
"customColor": "",
"associatedIndex": 8
}]]></component>
<component name="ProjectId" id="2VtRIra79d9tkHTc8fsXlFQRFWj" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
"git-widget-placeholder": "main"
}
}]]></component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="ce97b9f5-6785-4670-b350-12f90ab9ea27" name="Changes" comment="" />
<created>1695653315409</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1695653315409</updated>
</task>
<servers />
</component>
</project>
+1 -2
View File
@@ -1,2 +1 @@
rootProject.name = 'mc-srv2-notifyonstart'
rootProject.name = 'notifyonstart'
+4 -4
View File
@@ -49,12 +49,12 @@ public class Main extends JavaPlugin {
webhookConfig = new File("./NoS/config_webhook.json");
try {
if (isLoggingConfig.createNewFile()) {
System.out.println("Config created: " + isLoggingConfig.getName());
System.out.println("Configuration file created: " + isLoggingConfig.getName());
//FileWriter notifyWebhookConfigWriter = new FileWriter(notifyWebhookConfig);
//FileWriter pubMessageWebhookConfigWriter = new FileWriter(pubMessageWebhookConfig);
//notifyWebhookConfigWriter.write("{\"url_notify\": \"default-ns\"}");
FileWriter linkConfigWriter = new FileWriter(webhookConfig);
linkConfigWriter.write("{\"url_publicmsg\": \"default-ns\", \"url_notify\": \"default-ns\"}");
linkConfigWriter.write("{\n \"url_publicmsg\": \"default-ns\", \n \"url_notify\": \"default-ns\"\n}");
linkConfigWriter.close();
//notifyWebhookConfigWriter.close();
} else {
@@ -63,8 +63,8 @@ public class Main extends JavaPlugin {
} catch (IOException e) {
throw new RuntimeException(e);
}
// post
Bukkit.getConsoleSender().sendMessage("Note: This Spigot/Bukkit plugin is highly verbose, so it will log a lot of events...");
// such cap
//Bukkit.getConsoleSender().sendMessage("Note: This Spigot/Bukkit plugin is highly verbose, so it will log a lot of events...");
// register commands
try {
Objects.requireNonNull(this.getCommand("info")).setExecutor(new InfoCommand());