Infamous plugin? :o

Discussion in 'Archived: Plugin Requests' started by Killergod101, Apr 16, 2014.

  1. Offline

    Killergod101

  2. Offline

    Desle

    Killergod101
    Not sure what to do... no clue how to fix the problem I'm having
     
  3. Offline

    timtower Administrator Administrator Moderator

    What kind of problem?
     
  4. Offline

    Desle

    timtower If you open an inventory, you have 2 inventories open; Your player inventory and the one you opened. The bar that divides those two, is not an actual bar, but it's part of the slot besides it.. So if you click on the right place of the bar, it'll act like you put in in the inventory, but really, you didin't. So it would trigger the event, but not actually put the item in or take it out.
     
  5. Offline

    timtower Administrator Administrator Moderator

    Don't really get the issue...
     
  6. Offline

    Desle

    timtower

    Say you've opened a chest. You'll get a gui shown, that includes your player inventory and the chest inventory.
    The bar that divides those two inventories is not actually a bar, but is an extension of the adjacent slot;

    Bukkit thinks it's the extension of the adjacent slot, and thus a normal slot that triggers the event, although Minecraft doesn't. So if you click there, bukkit's event might trigger, but minecraft doesn't actually do anything, that it would normally do when you click on the real slot.
    --
    Bukkit doesn't care if you click on the adjecant slot or the bar, it'll both act the same.
    --

    How I have it now, it would upgrade the power if you put an item in a slot.. but.. since bukkit also triggers when you click the bar, and minecraft doesn't, you can upgrade your power without putting the item in.
     
  7. Offline

    timtower Administrator Administrator Moderator

    Desle Bukkit gets its events from minecraft...
     
  8. Offline

    Desle

    timtower
    That's.. what they.. want you to think. No really, no clue why they act differently..
     
  9. Offline

    timtower Administrator Administrator Moderator

    Start a conversation with me, then I will try to help you fix this.
     
  10. Offline

    Desle

    timtower
    Thanks, although there's not much I can add to the explanation.. that's pretty much it.
    Here's my listener though;

    Code:java
    1. public void onClick(InventoryClickEvent e) {
    2. if (e.isShiftClick()) {
    3. e.setCancelled(true);
    4. return;
    5. }
    6. if (!(e.getRawSlot() < 9)) {
    7. return;
    8. }
    9. ///////CONCRETE
    10. if (e.getInventory().getTitle().equals("Concrete")) {
    11. if (e.getSlotType() != null && e.getCursor() != null && e.getCurrentItem() == null) {
    12. if (e.getCursor().getType() == Material.NETHER_STAR && e.getCursor().getItemMeta().hasDisplayName() && e.getCursor().getItemMeta().getDisplayName().equals(ChatColor.GRAY + "Level Star")) {
    13. SkillManager.get().addConcrete(player, 1);
    14. Effects(player);
    15. } else {
    16. e.setCancelled(true);
    17. player.updateInventory();
    18. }
    19. } else {
    20. e.setCancelled(true);
    21. player.updateInventory();
    22. }
    23. return;
    24. }


    ----
    Not a conversation, let me.. try that again

    Killergod101

    Status of the plugin


    Killergod101
    I'm going to add a delay, so you need to recharge in order for a power to become usable again.. although I think you'd like to keep the XP bar of minecraft, so I'll so it a bit more.. fancy but it doesn't indicate the time left it'll be recharging.

    --
    1/6 powers done.. The one completed is Walljump. It is fully functional and can be levelled up..
    Also, the max level achievable is 9.
    And still, what to do about the alt boosting, etc?

    --
    Going to stop for this day. Tomorrow I'll work on doublejump and get that one fully working.. and the day after that I'll make the smoke, concrete, video and neon, since those are just copy-paste work.. Then later come the finishing touches, like setting the max level achievable, effects, sounds and ofcourse the configuration file if you REALLY need one.. but that'll come last.



    --
    I've used the hearts as indicator that it's recharging.



    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  11. Offline

    TGRHavoc

    Desle
    Just curious, what sound effect did you use for when you open the GUI?
     
  12. Offline

    Desle

    TGRHavoc
    HORSE_ARMOR. For the other one I used... ZOMBIE_UNFECT
     
  13. Offline

    Killergod101

    Desle I'm not too worried about boosting, if they get caught boosting the ops can do what they want with them. Ill start making a banner/picture for when you post it on bukkit. And are you gonna use the Beacon idea? Draining a beacon will cause it to lose the beam and give a player a shard(Nether star) which is used to level up your powers.
     
  14. Offline

    Killergod101

    Desle the videos just showed for me :p Looks amazing! If you need any help just ask.
     
  15. Offline

    Desle

    Killergod101
    I didin't really work on this, anymore, because I'm busy with other stuff, sorry.
    Here's a list of the things that are not working yet;
    • The abilities themselves
    • Leveling up
    • Gaining shards
    • Details
    I might do this later this week, but currently I really can't, sorry.
     

Share This Page