Posts by yahgiggle

    you should setup all your UIelements first under say onplayerconnect like this


    Java
    @EventMethod
    public void elementClickTest(PlayerUIElementClickEvent evt){
    Player player = evt.getPlayer();
    String playername = player.getName();
    System.out.println(playername);
    int id = evt.getUIElement().getID(); // the id is the elementclicked id so you can just use if (elementclickedID == id){ then do this}
    System.out.println(id);
    System.out.println("processing click");
    }


    so to get the element id do this


    UIElement thiselement = new UIElement();

    elementclickedID = thiselement.getID;



    You can save that in a Attribute so you can fetch it under the clickEvent like this


    player.setAttribute("elementclickedID" elementclickedID);



    then to get it you do player.getAttribute("elementclickedID");


    so

    elementclicked = player.getAttribute("elementclickedID");


    if (evt.getUIElement().getID() == elementclicked){ player.sendtextmessage("then this thiselement was clicked"}

    Thanks yahgiggle. I did another test, 300KB in 20 minutes. The log file will vary in size depending how busy the server is. the 20 minute test had 3 players on at same time. Sometimes I may have 10+ on at same time. Java days we had over 25+ on at same time, frequently. The issue will be exacerbated once many more portals are down and more players are connected, triggering thousands of events, filling the logs with irrelevant data and taking up space (not to mention other plugins as they are released).


    red51

    the plugin onplayerchangeblockevent only logs the information when players are moving, the number of portals have nothing at all to do with this, so more portals wont mean more onplayerchangeblockevents, so i guess you could ask your players to stop moving around because they are using up hdd space lol :-P

    yahgiggle I understand your point. But the log file will increase to 5GB+ if i left server running all day (is my point).

    It literally spams the event 200+ times per minute (literally), that is not normal, sorry. Open server console and take a look, it FLOODS it, and that was just one portal and one player on at the time.

    so ive got the plugin running on my own server, the log file over 24h got to about 800kb i really don't think there's a problem other than the log file been spammed with the event, ive messaged red51 to see if there is a way we can remove that message, its not even needed in my opinion.

    Juggernaut


    So it should the whole point of the on change block position in the API is to use this exactly how I've used it, I've talked to red about this and he has told me that using this method has very little effect on the performance.

    Juggernaut

    The updates I've done addresses the database problem, also have already added sound effects and a choice of colours, the extra effect was something already on my mind, but first I need to add a portal control panel so admins can rename, delete or teleport to any portal, I like the panel customization idea, I'll look into that but after I get everything else done 👍

    Is the plugin supposed to be constantly updating every player's position in the server console? It seems to be causing the server to use a lot of CPU/RAM.

    yes but this shouldn't use much processing power or ram, have you got the information showing the difference of before and after the plugin is used, ive looked on my computer and see no performance hit at all, or spike in cpu/ram usage

    Looks very interesting If I had one criticism "and it's just mine" I would have liked a 3-second pause or a message telling me that you are now returning back the the to entrance portal ( named when possible) instead of that quick jump, :thumbup::thumbup:

    Groovaholic

    I can make it so you don't jump, the reason you do jump ATM is because you are inside the portal when you made it, but I can give you say 3 seconds to get out before you jump

    Very nice, but from my point of view it would make more sense to give each portal a name so that you can only build one portal on site and choose where you want to be teleported - this way one portal per location is enough and you don't need space with "many" portals around to get to the desired goal - it was also the case with Stargate that you could set the goal.

    room6675

    I was going to do this but decided not to due to it not feeling like a portal, when you go inside a portal you don't get a menu to pick where you go, you just go wherever the portal takes you, what you really want is a teleporter. I think I can make another plugin but this one would have a teleporter room you get inside, let me think about this.

    I've now tested it at leisure. Works wonderfully. But: why two different colors for the portals when I come back to the entrance portal through the exit portal? It would make more sense to have the same color. It would be perfect if I also had a choice of colors in the future. How can I delete a portal again apart from deleting the entire database or noting down the location (x,y,z), searching for the portal in the DB and deleting this entry there?

    room6675

    The two colours are for a player to know witch end they are at, say you are walking around and you find a red portal, well the idea was they then know it's a return portal, most likely to a main base, as I stated in my main post, a way to name and delete portals is coming, and other stuff like sound effects.

    Looks promising yahgiggle. but I do not see any settings nor a way to adjust permissions. on a server with many players portals will be littered about everywhere in no time, with no way to remove them vs uninstalling the plugin. will be used by griefers unless proper settings and ability to limit it's use. just some thoughts. e.g. griefer makes portal in starting area, destination will over a chasm, griefer waits at bottom to collect loot from bodies whilst laughing maniacally. :D

    Only admins can place them, well it's meant to be only admins oO

    WOW, very cool :thumbup: :)

    Thank you very much


    yahgiggle how do you check with JAVA

    if the player is in Portal ?

    Thanks Kryssi_79


    For knowing if a player is inside a portal is not even needed, the portal is just a location marker, the real information is taken from the players location so if player is in location xyz and this location matches a saved location in a database then the player is inside a portal. I will add my whole script once it's 100% finished, then you can look and see how it's done.

    Portals v4


    The Portal Plugin has been Updated Again, sorry its a on going project, as i make it, users request new things!!! and then adjustments are made


    To place a portal hit the P key -- you need to be at the location you want the first portal to be at

    The menu will open and you can enter the colour by clicking the colour enter the entrance and exit names then exit the menu by clicking the red X at the top right

    you can then goto your exit location and hit the O key, this sets the exit portal


    The Names or new portals wont show for new players till they log off and back on, this may change in another update


    Version 3

    • Sound effects
    • has names for both ends
    • has databases for each world
    • an adjustment for the placing of the name tag
    • no longer need to hit enter, just exit the menu
    • Now has Admin Setting Command is /portals use the ingame chat for commands
    • Admins can now teleport to any portal from the Admin Panel
    • Admins can rename any portal from the Admin panel
    • Admins can now Delete portal sets A portal set is the entrance and exit
    • on teleport exit now cannot get stick in a teleport loop if the server is slow to load

    Version 4

    • Bug fix's
    • Removed some chat text messages
    • changed the way prefabs are loaded, should reduce memory usage

    Version 4.1

    • Not Null Bug Fix

    Version 4.2

    • Added rotation, the rotation is now set to the players rotation, This needs a new DB to work (sorry) the old DB wont work with this version 4.2
    • Fixed portals not displaying for all players when placed
    • All players can now use the (/portals) command only admins can delete and rename portals, but all players can use the teleport to any portal button.
    • Now you need to hold down the leftshift key plus hit the P key to open the menu, to place a entrance portal, hold down leftshift and push the O key to place the Exit portal  Note: you now use the buttons in the ui to place both portals


    Version 4.3

    • Small update, fixed text names not showing when placing new portals



    Version 4.4


    • Added more options under the UI now can select clear portal - clear = no effect so its invisible apart from the text - also added Settings Place entrance and place exit buttons,
    • player now exits the portal facing away from the portal in the direction the portal was placed.


    Version 4.5

    • Whole new UI
    • Removed commands - everything is now done in the UI admins and non admin players both use the leftshift + p keys to open the menu
    • Added option for Admins to turn on or off the Teleport menu for non admin players - if the option is off - non admins cannot see the non admin teleport menu
    • When using the teleport menu to teleport you will now be teleported and rotated facing away from the teleport


    Version 4.6

    • When deleting a portal the portal and its text are now fully removed, for all players at the time of deleting it


    Version 4.7

    • Bug fix's
    • Portals no longer gets the information needed from the database on every block change.
















    Files

    • PortalsV4.7.7z

      (205.56 kB, downloaded 105 times, last: )

    Boost Plugin


    OK the plugin has been upgraded, you now have 4 types of boosts Health, Thirst, Hunger and Stamina, each boost has its own effect and sound, the sound files can be swapped out for your own, just use the same type of file with the same name, the sound files can be found in the assets folder


    Admins now have the option to adjust the settings, Open the Settings menu by typing ( /boost ) in the chat


    interval = how long before the next boost by minutes

    Amount = how much boost they get, 100 would be back to full but 50 would remove 50% so you would always want to make it 100 or more, more will give the player a longer time before the boost runs out, but once it runs out it should reset back to the game default of 100, till you get the next boost, so it is possible to do the boost over 100%


    Admins use the command reloadplugins under the command console to enable any new changes, or the new settings wont take effect till the next reboot


    Version 2.1

    • Null bug fix





    Short demo version^^



    Long demo version ^^


    Files

    • Boost2.1.7z

      (3.51 MB, downloaded 122 times, last: )