2020-07-13 00:40:11 +00:00
package me.totalfreedom.tfguilds.command ;
import me.totalfreedom.tfguilds.Common ;
2021-05-22 04:26:48 +00:00
import me.totalfreedom.tfguilds.TFGuilds ;
import org.bukkit.ChatColor ;
2020-07-13 00:40:11 +00:00
import org.bukkit.command.Command ;
import org.bukkit.command.CommandExecutor ;
import org.bukkit.command.CommandSender ;
public class TFGuildsCommand extends Common implements CommandExecutor
{
2021-05-22 04:26:48 +00:00
2020-07-13 00:40:11 +00:00
@Override
2021-05-22 04:26:48 +00:00
public boolean onCommand ( CommandSender sender , Command cmd , String label , String [ ] args )
2020-07-13 00:40:11 +00:00
{
2020-07-15 00:20:25 +00:00
if ( args . length > 1 )
2020-07-29 21:03:05 +00:00
{
2020-07-15 00:20:25 +00:00
return false ;
2020-07-29 21:03:05 +00:00
}
2021-05-22 04:26:48 +00:00
if ( args . length = = 1 & & args [ 0 ] . equalsIgnoreCase ( " reload " ) )
2020-07-14 23:22:37 +00:00
{
2021-05-22 04:26:48 +00:00
if ( ! tfmBridge . isAdmin ( sender ) )
2020-07-14 23:22:37 +00:00
{
2021-05-22 04:26:48 +00:00
sender . sendMessage ( PREFIX + " You do not have the permission. " ) ;
return true ;
}
2020-07-29 21:03:05 +00:00
2021-05-22 04:26:48 +00:00
try
{
TFGuilds . getPlugin ( ) . getConfig ( ) . load ( ) ;
TFGuilds . getPlugin ( ) . getLogger ( ) . info ( " Successfully reload the configuration file. " ) ;
sender . sendMessage ( PREFIX + " The configuration file have been reloaded successfully. " ) ;
2020-07-14 23:22:37 +00:00
return true ;
}
2021-05-22 04:26:48 +00:00
catch ( Exception ex )
{
ex . printStackTrace ( ) ;
}
return true ;
2020-07-14 23:22:37 +00:00
}
2020-07-29 21:03:05 +00:00
2021-05-22 04:26:48 +00:00
sender . sendMessage ( ChatColor . AQUA + " TFGuilds " + ChatColor . GRAY + " is a plugin which allows players to create their own guilds, provide guild chat, guild teleportation and many more. " ) ;
sender . sendMessage ( ChatColor . GRAY + " Version " + ChatColor . GOLD + TFGuilds . getPlugin ( ) . getDescription ( ) . getVersion ( ) ) ;
sender . sendMessage ( ChatColor . GRAY + " Originally created by " + ChatColor . GOLD + " speednt " + ChatColor . GRAY + " and " + ChatColor . GOLD + " supernt " ) ;
sender . sendMessage ( ChatColor . GRAY + " Developed by " + ChatColor . GOLD + " NotInSync " ) ;
sender . sendMessage ( ChatColor . GRAY + " Source code " + ChatColor . GOLD + " https://github.com/AtlasMediaGroup/TFGuilds " ) ;
2020-07-15 00:20:25 +00:00
return true ;
2020-07-13 00:40:11 +00:00
}
2021-05-22 04:26:48 +00:00
}