KillsPoints

Discussion in 'Archived: Plugin Requests' started by xMDK, Jan 11, 2014.

  1. Offline

    xMDK

    Okay sounds great, I appreciate it!
     
    Axanite likes this.
  2. Offline

    hubeb

    rf2minecraft have you posted the code on github or bitbucket?
     
  3. Offline

    Axanite

    Last edited by a moderator: Jun 6, 2016
  4. Offline

    hubeb

    rf2minecraft
    Here is the code for the sign shops(give me credit :p):
    Code:java
    1. public class PlayerListener implements Listener {
    2. @SuppressWarnings("deprecation")
    3. @EventHandler
    4. public void onCLick(PlayerInteractEvent e){
    5. Player p = e.getPlayer();
    6. if(e.getAction() == Action.RIGHT_CLICK_BLOCK){
    7. if(e.getClickedBlock().getState() instanceof Sign){
    8. Sign s = (Sign)e.getClickedBlock().getState();
    9. String l0 = s.getLine(0);
    10. String l1 = s.getLine(1);
    11. int l2 = Integer.parseInt(s.getLine(2));
    12. int l3 = Integer.parseInt(s.getLine(3));
    13. Material m = Material.getMaterial(Integer.parseInt(l1));
    14. ItemStack item = new ItemStack(m,l3);
    15. if(l0.equalsIgnoreCase(ChatColor.DARK_RED+"[SHOP]")){
    16. if(l2 > SettingsManager.getInstance().getPoints(p)){
    17. p.sendMessage(ChatColor.DARK_RED + "{KillsPoints}" + ChatColor.RED + " You do not have enough points!");
    18. } else {
    19. p.getInventory().addItem(item);
    20. p.updateInventory();
    21. SettingsManager.getInstance().removePoints(e.getPlayer(), l2);
    22. p.sendMessage(ChatColor.DARK_RED + "{KillsPoints} " + ChatColor.RED + l2 + " was taken from your balance.");
    23. }
    24. }
    25. }
    26. }
    27. }


    replace your old internal class with this one and your plugin should work perfectly :) Sorry it took so long, ive been busy.
     
    Axanite likes this.
  5. Offline

    Axanite

    hubeb I think I know what i missed looking at that. I forgot to update inventory xD Just realised, now my commands don't work ;/
     
  6. Offline

    hubeb

    rf2minecraft
    yeah I noticed that too, I thought you just gave me the wrong plugin.yml so i left it be :)
    Do you need help with that too?
     
    Axanite likes this.
  7. Offline

    Axanite

    yeah please
     
  8. Offline

    onlinerocker

    Working on a project similar to this at the moment.
    I'll post again when it's finished/stable enough for a release.
     
  9. Offline

    hubeb

  10. Offline

    onlinerocker

  11. Offline

    hubeb

    Axanite likes this.
  12. Offline

    Axanite

    As hubeb said, the plugin is basically done. I believe I have all the features sorted. Just a few things need sorting then its done :)
     
  13. Offline

    EverReddie

    This sounds like an interesting plugin. I might use it when it's released. :)
     
    Axanite likes this.
  14. Offline

    FightManiac

    Tag me when it's done :D.
     
  15. Offline

    Axanite

  16. Offline

    FightManiac

  17. Offline

    Axanite


    Haven't had much time to do testing but once its tested and all bugs ironed out, it will be ready for release :)
     
    xMDK likes this.
  18. Offline

    FightManiac

  19. Offline

    Axanite

    Aha schools getting in the way. I promise I'll have it tested ASAP.
     
    xMDK likes this.
  20. Offline

    xMDK

    No need to rush @rf2minecragt no pressure from me :)
     
    Axanite likes this.

Share This Page