Filled Custom SignShop

Discussion in 'Plugin Requests' started by Rakinare, Apr 18, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    I Al Istannen

    @Rakinare
    I am quite sure that is entirely client side. You can remove the &l to remove the bold font, but that's it.
     
  2. Offline

    Rakinare

    @I Al Istannen.
    Okay I see, thanks.

    Just noticed, your display item respawn makes, that there are 2 floating items each now.

    Edit: After the next check, one of the items was removed, taking it back to one display item each.
     
  3. Offline

    I Al Istannen

    @Rakinare
    Wow. That should not happen :confused:. They should replace each other. I can't reproduce this either, I will try some more. If I can't and it doesn't impact you too much, I would settle it, as there is nearly no way I can find out why that happens.
     
  4. Offline

    Rakinare

    @I Al Istannen

    Hm okay. Would debug mode maybe help? It just happened again.
     
  5. Offline

    I Al Istannen

    @Rakinare
    So, it now removes every item that is near, is similar to the one the chest sells and has a name. Please try if that helps.
    Here is the link again.
     
  6. Offline

    Rakinare

  7. Offline

    I Al Istannen

    @Rakinare
    Hmm. Could you tell what exacly you do to make it happen?
     
  8. Offline

    Rakinare

    @I Al Istannen

    Just been standing next to it and after some time there were 2 items. Lowered the refresh rate now and see if I can keep reproducing. As of right now it stopped happening for some reason.

    Edit: I could not reproduce it anymore after letting it go for a few minutes on a 5 second refresh rate. Gonna go back to the default ticks and see what happens.
     
  9. Offline

    I Al Istannen

    @Rakinare
    I just can't seem to reproduce it. I use spigot 1.9.2-RO.1 and a vanilla client.
    It is either some weird error happening with deleting the old item or the client doesn't delete it correctly. Are there still two items when you relog? If not I could maybe blame it on the client, you know :D I will download forge and try again :p
    No, that didn't seem to be the problem. Very strange.
     
    Last edited: May 1, 2016
  10. Offline

    Rakinare

    @I Al Istannen

    Happened again. Even 3 items are there now. Relog did not help.

    What I think it is though, it does only happen now when I am far away. So it looks like the item deleting doesn't work when I am too far away from it or not even online. After the next refresh when I am close, the items are back to normal.
     
  11. Offline

    I Al Istannen

    @Rakinare
    I see. It doesn't happen to me, as the chest are all in the spawn chunks which never get unloaded. EDIT: Verified, I could reproduce it further away. It seems logical to me that items in unloaded chunks won't get deleted. They will then be cleared up on the next update, as they are similar to the one in the chest and have a display name. At least I hope that is what happens.
    I don't believe there is much I can do about this though. You would need to increase the update time to faster remove them. If that looks too ugly, say so and I will try to let it clear the items, without flashing.
     
  12. Offline

    Rakinare

    @I Al Istannen

    That's what I thought. Having them reloaded without it being noticable or barely noticeable would be awesome!
     
  13. Offline

    I Al Istannen

    @Rakinare
    I can't reproduce it anymore. Either it works or I am too stupid to reproduce it. Sadly the latter is probably more likely. Here is the link again.
     
    cococow123 and Rakinare like this.
  14. Offline

    Rakinare

    @I Al Istannen

    Kk, gonna try it now. Let's see if it works :)

    Edit: Looks like there is no duplication anymore or I just came back right when it refreshed xD

    Seems to work though, thanks a lot! :)

    Edit2: Yup, no more duplicating! :)
     
    Last edited: May 1, 2016
  15. Offline

    I Al Istannen

    @Rakinare
    It really shouldn't effect duplication, just how it is handled. But if it works, I won't complain ;)

    I have lost track, are there any more features you wanted or suggested? If not, have fun with it :D You can post here or send me a PM every time you need something though!
     
  16. Offline

    Rakinare

    @I Al Istannen

    I think right now I am super happy with what you have done for me! I can't really think of something that I'd need to 100% now.

    Cool would be signs that you click to buy a region since the plugins that are out there probably won't work with IP and IPSS either I guess.
    If it's not too much work that'd be another nice thing to have.
    Basically a sign that I create in a region, uppon right clicking it will give a chat prompt that tells you the price and asks you if you wanna buy it or not.


    Edit: Can a plugin execute a command? If so, if it does /region select <regionname> uppon right clicking, it would show the player the region selection since I have worldeditcui installed as mod.
     
  17. Offline

    I Al Istannen

    @Rakinare
    Yes, plugins can execute commands without a problem. So region buying would just be a wrapper around the /ip addregion command that eats your money? If so, you could maybe solve this with ServerSigns (so much to can a plugin execute a command), but I will implement it anyways, as it is probably a whole lot easier for me to do than for you with ServerSigns. Just wanted to mention the plugin to you, as it may come in handy ;)

    EDIT: How do you want to create the sign? Should the sign Text update if the language does? Should the sign be deleted if the region is bought?
    What if the Sign is in multiple overlapping regions?
     
    Last edited: May 1, 2016
    Rakinare likes this.
  18. Offline

    Rakinare

    @I Al Istannen

    Yeah I have already heard about ServerSigns, wanted to check that out soon as I am probably gonna need it for one or the other thing. I could try setting it up via that if it would be a lot of work but it would be amazing to have the easier way for me :p

    Edit:
    1. line [BuyRegion]
    2. line RegionName
    3. line Price

    After creation:
    1. line For Sale
    2. line Price

    Update on language change would be nice.
    Sign will be deleted and placed again if the user decides to do /ipss sellregion (half the money back of buyprice)
    I will make sure that it's not in overlapping regions, else it's defined by RegionName uppon creation.


    Edit2: I hate that, why is a simple idea always ending in more and more stuff to be added xD Maybe I just want too much perfection .__.
     
    Last edited: May 1, 2016
  19. Offline

    I Al Istannen

    @Rakinare
    Could your read and answer the questions in the post above? The edit. Just edit your post :)

    I will do some school stuff, continue tomorrow. Have a nice evening!
     
    Last edited: May 1, 2016
    Rakinare likes this.
  20. Offline

    Rakinare

    @I Al Istannen

    Thanks for all your work! Wish ya a nice evening too! :)
     
    I Al Istannen likes this.
  21. Offline

    I Al Istannen

    @Rakinare
    Thanks :)

    If you give a user the right for a region with /ip addRegion, how should he sell it? Should he get no money back? How do you want that to be handled? Depending on that I will implement the sellRegion command, so I won't do that until you answer ;)

    EDIT: How do you want to destroy the sign? I made it immune to all attacks, so you either need a way or I need to remove that.

    EDIT 2:
    Also what Role should they have on the region? Owner or member?

    EDIT 3:
    Only admins should be able to create them, shouldn't they?
     
    Last edited: May 2, 2016
  22. Offline

    Rakinare

    @I Al Istannen

    Sorry just came home.

    "Sign will be deleted and placed again if the user decides to do /ip sellregion (half the money back of buyprice)"

    Destroy the sign when? After it got bought, if I did a mistake and wanna replace it or what exactly do you mean?

    Owner of course, they bought it, they own it.

    Only admins can create those signs, indeed.
     
  23. Offline

    I Al Istannen

    @Rakinare
    So the sign stays there until some poor soul buys it? In the cold snowy weather? Alone and forsaken?
    So the mistake one :D

    With the first question I meant, what should happen if the user didn't buy the region, but you granted him the rights via the /ip addRegion command. Then there is no price.
     
  24. Offline

    Rakinare

    @I Al Istannen

    Well, can't Admins destroy everything? I also don't thnik though that it's required to protect it seperately as the area is protected anyways.

    That's a good question. Maybe add a syntax that says sellable or not sellable? Or wouldn't half the price still work, since 0/2 = 0, means no money back?
     
  25. Offline

    I Al Istannen

    @Rakinare
    It is currently protected by my plugin too. Thats why I asked. I will remove that.

    Yes, that will work. I was just wondering where to save the price. Depending on your answer there were multiple valid ways, I will save it in the PlayerRegionObject now. But there is a movie evening with my class, so bye for now.

    I need to implement the sellregion, but that should be it. Depending on when I am home, you might get the new version today.
     
    Rakinare likes this.
  26. Offline

    Rakinare

  27. Offline

    I Al Istannen

    @Rakinare
    I didn't. It was Hungover games. But hey :D
    I did take my time but I am slowly reaching the state where I look in utter disgust at the codebase. Ipss is much nicer. Ip just wasn't designed for half of the features and as I implemented them I didn't know what I would add later.
    If I add another a bit bigger feature I must rewrite larger parts of the code before, else I won't be able to understand what is going on later.

    But apart from this, it might work for you. It did for me, but that doesn't mean anything :D
     
    Rakinare likes this.
  28. Offline

    Rakinare

    @I Al Istannen

    Thanks a lot! Gonna test it out tomorrow and give feedback.

    Edit:
    The basic functions all seem to work perfectly fine, thanks!

    What I can't seem to do is customizing what the sign shows after it was created.
    For some reason there's always a $ sign by default on the sign and in the chat messages.
    Those aren't in the language files, so idk where they are coming from.

    For some reason your signs aren't being protected by Worldguard although they are in a a protected area. I have no clue why that happens.

    Can you add that if you sell your region, the original buy sign is recreated?

    Greetings
    Rakinare
     
    Last edited: May 3, 2016
  29. Offline

    I Al Istannen

    @Rakinare
    The $ is there because I added that to the decimal format pattern in one of the classes. To make that easily customizable, the best way would be to use the same language system I use with IPSS. But migrating this mess is a tedious and exhausting process, which isn't that fun.

    I have an idea about worldguard, but i would be pretty bugged if it is true. I destroy the signs by myself in a EventListener. If worldguard doesn't cancel the even before, the protection would have no effect. I will need to add a check to see if it is an owner or an admin.

    I could, but it is just not feasible with the current code. I originaly fetched the regions from worldedit upon logut. This way you didn't need the ip addRegion command and could use the normal one. Now, what is left from this code is the latter, the save on logout. This prevents me from storing the data where it should belong. The same with the price, but I made an extra map in some other place, but the bad "hacks" just add up. I just had a totally different idea in my mind of how it should look at the end, and didn't totally threw the code away after you wanted a (granted it is easier and nicer) different way. I have to admit though, that some implementations I did are stupid in hindsight. I will have to rewrite parts of it, but it makes me flinch a bit. It will at least take some days and I do hope I can push myself to finishing it.

    Greetings,
    I Al Istannen
     
  30. Offline

    Rakinare

    @I Al Istannen

    Well then screw that.
    What I'd love to have finished is the working protection for the sign, the $ sign removed if possible and the ability to change what the region buy sign displays, or if that's not possible in the current language system, I'd like you to change it to:

    1. Line: For Sale (Zu Verkaufen)
    2. Line: <Price>

    The sellregion command can stay as it is or even be removed, I will just do that manually.

    I really don't wanna make you any more work. Rewriting everything would be just too much.
    Don't do more than you really want/enjoy to do. It's not supposed to feel like work but be a hobby afterall.
     
Thread Status:
Not open for further replies.

Share This Page