HCFEssentials

Status
This thread has been locked.

Transient

♣ Java Developer ♣
Banned
Feedback score
-1
Posts
33
Reactions
24
Resources
0
Hello MC-market today im going to be asking you guys for your opinion on a new project im working on.
This project is called HCFEssentials the purpose of this core is to be a traditional HCFCore for HCFactions. My plans for this core is to one day have factions in it and have full essentials inside it.
The current progress of it is small as i have been working on my own commandAPI and api for other parts of the plugin so i can use it as a dependence for other projects.
036f1cccf77eadbc013dbc9e073275d0.png
 

Attachments

  • 036f1cccf77eadbc013dbc9e073275d0.png
    036f1cccf77eadbc013dbc9e073275d0.png
    11.6 KB · Views: 50
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Transient

♣ Java Developer ♣
Banned
Feedback score
-1
Posts
33
Reactions
24
Resources
0
change log
Updated Developer API
Command Register in manager = this.commands.add(new TestCommand(this));
Added More essential Commands
Rewrite Methods class for developers to use for example
Code:
    @EventHandler
    public boolean onCommand(CommandSender commandSender, Command command, String label, String args)
    {
        if (command.getName().equalsIgnoreCase("clear"))
        {
            if (!(commandSender instanceof Player)) { return true; }

           
            Player player = (Player) commandSender;
           
            player.sendMessage("Cleared");
            Methods.wipe(player);
           
        }
        return false;
    }
[DOUBLEPOST=1495369425][/DOUBLEPOST]+ GameMode Command Example

Code:
public class GamemodeCommand extends CommandClass
{
    public GamemodeCommand()
    {
        super("gamemode", "puts you in gamemode creative or survival");
    }

    public boolean onCommand(CommandSender commandSender, Command command, String s, String[] args)
    {
        if (!(commandSender instanceof Player))
        {
            commandSender.sendMessage((Object) ChatColor.RED + "Please use the server to execute this command.");
            return true;
        }
       
        Player player = (Player) commandSender;
        if(args.length == 0)
        {
            player.sendMessage(ChatColor.RED + "Usage: /gamemode <1, 0>");
            return true;
        }
       
        if(args[0].equalsIgnoreCase("1"))
        {
            player.setGameMode(GameMode.CREATIVE);
            player.sendMessage(ChatColor.RED + "Gamemode Creative");
        }
        else if(args[0].equalsIgnoreCase("0"))
        {
            player.setGameMode(GameMode.SURVIVAL);
            player.sendMessage(ChatColor.RED + "Gamemode Survival");
           
            /**
             * Optional this prevents people spawning things in and going out of gamemode to abuse :D
             *
             * This can be disabled my hashing it out
             */
           
            Methods.wipe(player);
        }
        return false;
    }
}
[DOUBLEPOST=1495369466][/DOUBLEPOST]
change log
Updated Developer API
Command Register in manager = this.commands.add(new TestCommand(this));
Added More essential Commands
Rewrite Methods class for developers to use for example
Code:
    @EventHandler[/B][/CENTER]
[B]
[CENTER]    public boolean onCommand(CommandSender commandSender, Command command, String label, String args)
    {
        if (command.getName().equalsIgnoreCase("clear"))
        {
            if (!(commandSender instanceof Player)) { return true; }

          
            Player player = (Player) commandSender;
          
            player.sendMessage("Cleared");
            Methods.wipe(player);
          
        }
        return false;
    }

[DOUBLEPOST=1495369425][/DOUBLEPOST]+ GameMode Command Example

Code:
public class GamemodeCommand extends CommandClass
{
    public GamemodeCommand()
    {
        super("gamemode", "puts you in gamemode creative or survival");
    }

    public boolean onCommand(CommandSender commandSender, Command command, String s, String[] args)
    {
        if (!(commandSender instanceof Player))
        {
            commandSender.sendMessage((Object) ChatColor.RED + "Please use the server to execute this command.");
            return true;
        }
      
        Player player = (Player) commandSender;
        if(args.length == 0)
        {
            player.sendMessage(ChatColor.RED + "Usage: /gamemode <1, 0>");
            return true;
        }
      
        if(args[0].equalsIgnoreCase("1"))
        {
            player.setGameMode(GameMode.CREATIVE);
            player.sendMessage(ChatColor.RED + "Gamemode Creative");
        }
        else if(args[0].equalsIgnoreCase("0"))
        {
            player.setGameMode(GameMode.SURVIVAL);
            player.sendMessage(ChatColor.RED + "Gamemode Survival");
          
            /**
             * Optional this prevents people spawning things in and going out of gamemode to abuse :D
             *
             * This can be disabled my hashing it out
             */
          
            Methods.wipe(player);
        }
        return false;
    }
}

Code:
Methods Example

public class Methods implements Listener
{
   
    public static void wipe(Player player)
    {
        player.setFoodLevel(10);
        player.setHealth(20L);
        player.getInventory().clear();
        player.sendMessage(ChatColor.RED + "Cleared Inventory" + "Ping@ " + player.getPing());
    }
}
[DOUBLEPOST=1495373237][/DOUBLEPOST]
change log
Updated Developer API
Command Register in manager = this.commands.add(new TestCommand(this));
Added More essential Commands
Rewrite Methods class for developers to use for example
Code:
    @EventHandler[/B][/CENTER]
[B]
[CENTER]    public boolean onCommand(CommandSender commandSender, Command command, String label, String args)
    {
        if (command.getName().equalsIgnoreCase("clear"))
        {
            if (!(commandSender instanceof Player)) { return true; }

          
            Player player = (Player) commandSender;
          
            player.sendMessage("Cleared");
            Methods.wipe(player);
          
        }
        return false;
    }

[DOUBLEPOST=1495369425][/DOUBLEPOST]+ GameMode Command Example

Code:
public class GamemodeCommand extends CommandClass
{
    public GamemodeCommand()
    {
        super("gamemode", "puts you in gamemode creative or survival");
    }

    public boolean onCommand(CommandSender commandSender, Command command, String s, String[] args)
    {
        if (!(commandSender instanceof Player))
        {
            commandSender.sendMessage((Object) ChatColor.RED + "Please use the server to execute this command.");
            return true;
        }
      
        Player player = (Player) commandSender;
        if(args.length == 0)
        {
            player.sendMessage(ChatColor.RED + "Usage: /gamemode <1, 0>");
            return true;
        }
      
        if(args[0].equalsIgnoreCase("1"))
        {
            player.setGameMode(GameMode.CREATIVE);
            player.sendMessage(ChatColor.RED + "Gamemode Creative");
        }
        else if(args[0].equalsIgnoreCase("0"))
        {
            player.setGameMode(GameMode.SURVIVAL);
            player.sendMessage(ChatColor.RED + "Gamemode Survival");
          
            /**
             * Optional this prevents people spawning things in and going out of gamemode to abuse :D
             *
             * This can be disabled my hashing it out
             */
          
            Methods.wipe(player);
        }
        return false;
    }
}
[DOUBLEPOST=1495369466][/DOUBLEPOST]

Code:
Methods Example

public class Methods implements Listener
{
  
    public static void wipe(Player player)
    {
        player.setFoodLevel(10);
        player.setHealth(20L);
        player.getInventory().clear();
        player.sendMessage(ChatColor.RED + "Cleared Inventory" + "Ping@ " + player.getPing());
    }
}


Updated / Added Another Method

Code:
public class Methods implements Listener
{
   
    public static void wipe(Player player)
    {
        player.setFoodLevel(10);
        player.setHealth(20L);
        player.getInventory().clear();
        player.sendMessage(ChatColor.RED + "Cleared Inventory" + " Ping: " + player.getPing());
    }
   
    public static void ping(Player player)
    {
        player.sendMessage(ChatColor.GREEN + "Ping: " + player.getPing());
    }
}

Code:
    @Getter public static Essentials instance;
    @Getter private CommandManager commandManager;

    public void onEnable()
    {
        instance = this;
        this.commandManager = new CommandManagerUtil(this);
        this.commandManager.registerAll(new StaffModule(this));

        Plugin plugin = this.getServer().getPluginManager().getPlugin("ProtocolLib");
        if (plugin != null && plugin.isEnabled())
        {
            try
            {}
            catch (Exception ex)
            {
                this.getLogger().severe("Error hooking into ProtocolLib from Essentials.");
                ex.printStackTrace();
            }
        }
    }

    public void onDisable()
    {
        super.onDisable();
       
        instance = null;
    }
 
Last edited:
Banned forever. Reason: Ban Evading (Obey, Snapchat)
Status
This thread has been locked.
Top