This commit is contained in:
JaTiTV 2023-05-04 16:38:21 +02:00
parent 02e7020815
commit ba1db37a90
5 changed files with 19 additions and 26 deletions

View File

@ -72,21 +72,25 @@
<groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId>
<version>14.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.t2code</groupId>
<artifactId>bungee</artifactId>
<version>1615</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.t2code</groupId>
<artifactId>PlugmanGUI</artifactId>
<version>3.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.t2code.minecraft.1_13.r1</groupId>
<artifactId>spigot</artifactId>
<version>1.13r1</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -25,12 +25,11 @@ public class SelectConfig {
isConfigVersion = yamlConfiguration.getInt("ConfigVersion");
updateCheckOnJoin = yamlConfiguration.getBoolean("Plugin.updateCheck.onJoin");
updateCheckSeePreReleaseUpdates = yamlConfiguration.getBoolean("Plugin.updateCheck.seePreReleaseUpdates");
updateCheckTimeInterval = yamlConfiguration.getInt("Plugin.updateCheck.timeInterval");
updateCheckOnJoin = yamlConfiguration.getBoolean("plugin.updateCheck.onJoin");
updateCheckSeePreReleaseUpdates = yamlConfiguration.getBoolean("plugin.updateCheck.seePreReleaseUpdates");
updateCheckTimeInterval = yamlConfiguration.getInt("plugin.updateCheck.timeInterval");
language = yamlConfiguration.getString("Plugin.language");
language = yamlConfiguration.getString("plugin.language");
buyMessage = yamlConfiguration.getBoolean("buy.message");
buyCurrency = yamlConfiguration.getString("buy.currency");

View File

@ -1,9 +1,13 @@
package net.t2code.alias.Spigot.listener;
import net.t2code.alias.Spigot.Main;
import net.t2code.alias.Spigot.cmdManagement.ExecuteAlias;
import net.t2code.alias.Util;
import net.t2code.t2codelib.SPIGOT.api.update.T2CupdateAPI;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.event.player.PlayerQuitEvent;
public class PluginEvents implements Listener {
@ -12,4 +16,9 @@ public class PluginEvents implements Listener {
Player player = event.getPlayer();
ExecuteAlias.aliasStorage.remove(player.getUniqueId());
}
@EventHandler
public void onJoinEvent(PlayerLoginEvent event) {
T2CupdateAPI.join(Main.getPlugin(), Util.getPrefix(), "t2code.alias.updatemsg", event.getPlayer(), Util.getSpigotID(), Util.getDiscord());
}
}

View File

@ -1,18 +0,0 @@
// This claas was created by JaTiTV
package net.t2code.alias.Spigot.system;
import net.t2code.alias.Spigot.Main;
import net.t2code.alias.Util;
import net.t2code.t2codelib.SPIGOT.api.update.T2CupdateAPI;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerLoginEvent;
public class JoinEvent implements Listener {
@EventHandler
public void onJoinEvent(PlayerLoginEvent event) {
T2CupdateAPI.join(Main.getPlugin(),Util.getPrefix(), "t2code.alias.updatemsg", event.getPlayer(), Util.getSpigotID(), Util.getDiscord());
}
}

View File

@ -28,9 +28,8 @@ public class Load {
Long long_ = T2Ctemplate.onLoadHeader(prefix, autor, version, spigot, discord);
plugin.getCommand("t2code-alias").setExecutor(new AliasCmdExecuter());
loadReload();
T2CupdateAPI.onUpdateCheck(plugin,prefix,Util.getGit(),Util.getSpigotID(),Util.getDiscord(),
SelectConfig.getUpdateCheckOnJoin(),SelectConfig.getUpdateCheckSeePreReleaseUpdates(),SelectConfig.getUpdateCheckTimeInterval());
Bukkit.getServer().getPluginManager().registerEvents(new JoinEvent(), plugin);
T2CupdateAPI.onUpdateCheck(plugin, prefix, Util.getGit(), Util.getSpigotID(), Util.getDiscord(),
SelectConfig.getUpdateCheckOnJoin(), SelectConfig.getUpdateCheckSeePreReleaseUpdates(), SelectConfig.getUpdateCheckTimeInterval());
T2Ctemplate.onLoadFooter(prefix, long_, version);
T2Cregister.listener(new PluginEvents(), plugin);