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> <groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId> <artifactId>T2CodeLib</artifactId>
<version>14.4</version> <version>14.4</version>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>
<artifactId>bungee</artifactId> <artifactId>bungee</artifactId>
<version>1615</version> <version>1615</version>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>
<artifactId>PlugmanGUI</artifactId> <artifactId>PlugmanGUI</artifactId>
<version>3.0</version> <version>3.0</version>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.t2code.minecraft.1_13.r1</groupId> <groupId>net.t2code.minecraft.1_13.r1</groupId>
<artifactId>spigot</artifactId> <artifactId>spigot</artifactId>
<version>1.13r1</version> <version>1.13r1</version>
<scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View File

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

View File

@ -1,9 +1,13 @@
package net.t2code.alias.Spigot.listener; package net.t2code.alias.Spigot.listener;
import net.t2code.alias.Spigot.Main;
import net.t2code.alias.Spigot.cmdManagement.ExecuteAlias; 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.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerQuitEvent;
public class PluginEvents implements Listener { public class PluginEvents implements Listener {
@ -12,4 +16,9 @@ public class PluginEvents implements Listener {
Player player = event.getPlayer(); Player player = event.getPlayer();
ExecuteAlias.aliasStorage.remove(player.getUniqueId()); 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); Long long_ = T2Ctemplate.onLoadHeader(prefix, autor, version, spigot, discord);
plugin.getCommand("t2code-alias").setExecutor(new AliasCmdExecuter()); plugin.getCommand("t2code-alias").setExecutor(new AliasCmdExecuter());
loadReload(); loadReload();
T2CupdateAPI.onUpdateCheck(plugin,prefix,Util.getGit(),Util.getSpigotID(),Util.getDiscord(), T2CupdateAPI.onUpdateCheck(plugin, prefix, Util.getGit(), Util.getSpigotID(), Util.getDiscord(),
SelectConfig.getUpdateCheckOnJoin(),SelectConfig.getUpdateCheckSeePreReleaseUpdates(),SelectConfig.getUpdateCheckTimeInterval()); SelectConfig.getUpdateCheckOnJoin(), SelectConfig.getUpdateCheckSeePreReleaseUpdates(), SelectConfig.getUpdateCheckTimeInterval());
Bukkit.getServer().getPluginManager().registerEvents(new JoinEvent(), plugin);
T2Ctemplate.onLoadFooter(prefix, long_, version); T2Ctemplate.onLoadFooter(prefix, long_, version);
T2Cregister.listener(new PluginEvents(), plugin); T2Cregister.listener(new PluginEvents(), plugin);