Global YouTube rank Json format link to channel.

Discussion in 'Suggestions' started by Ares_Xena, May 27, 2017.

  1. Purge
    Offline

    Purge Boss Member

    Messages:
    2,085
    re-support +Bump
     
  2. Ares_Xena
    Offline

    Ares_Xena Legendary Member

    Messages:
    4,091
    Thanks. ;)
     
  3. Nitro_
    Offline

    Nitro_ Active Member

    Messages:
    212
    There's one? I think kenji. Support
     
  4. Purge
    Offline

    Purge Boss Member

    Messages:
    2,085
    No problem.
     
  5. Moni
    Offline

    Moni Boss Member Premium

    Messages:
    1,654
    This would be really cool. Support :)
     
  6. Porky
    Offline

    Porky Senior Moderator Senior Moderator Competition Team

    Senior Moderator
    Messages:
    7,285
    Reopened on request.
    support
     
  7. rent
    Offline

    rent Tyler Moderator Premium

    Moderator
    Messages:
    3,090
    Support
     
  8. Atom
    Offline

    Atom Legendary Member

    Messages:
    1,951
    support
     
  9. Swift
    Offline

    Swift Boss Member

    Messages:
    5,036
    IGN:
    Swiftlicious
    While yes it would be cool, the problem is most of the gamemodes already contain an action for their json clicks (usually is messaging the player but some are exempt to this I think skyblock is to visit their island) you can only have one json action and "suggest" and "link" are two different ones (well you could have two but it would be confusing because you would have to define to hover over the rank for one hover action and hover over the username for another which also doesn't work for default users since they don't have a visible rank) so basically this means anyone who has the streamer/youtuber rank will not be able to have their islands visited by clicking their username if this was added globally. I can't tell you every json's suggest action as I don't remember them all.

    I'll add this to survival's chat since we only use it to message not such a big deal and if works there and is enjoyed maybeeeee crew will add it elsewhere where the click feature isn't too big of a deal.

    I assume you want something like this anyway right:
    Regular users (That don't have streamer/youtuber rank):
    [​IMG]
    Users that do have Streamer or Youtuber:
    [​IMG]
    Then when you click on it something like this appears (as an example I'll use my favorite youtuber :)):
    [​IMG]
     
    Last edited: Jul 25, 2020
  10. mattenphew
    Offline

    mattenphew Head Moderator Head Moderator Media Team Leader Competition Team Premium

    Head Moderator
    Messages:
    5,389
    Seems like a good idea. But after looking at swift's post we would need to find a work around for it or the youtubers/streamers would need to agree to some form of compromise to implement it. i.e. not allowing users to go to their island through clicking on their name in chat.
     
  11. Grayman
    Offline

    Grayman Experienced Member

    Messages:
    1,308
    Sounds like a good idea to me, Support.
     
  12. Ares_Xena
    Offline

    Ares_Xena Legendary Member

    Messages:
    4,091
    The suggested was made in 2017 so it probably has to be adapted in order to fit the current state of Mineverse. Without any knowledge of the plugin Skyblock plugin, or the source code, I came up with the following solution using the Foundation library. The code might look slightly different.

    Solution #1
    Basic idea is to check if the player is a streamer/youtuber. If so, then open a small prompt in chat whether they want the Link or their Island. Otherwise, just run the default.

    Again, I'm not sure what plugin you use, or if you have access to the source code, or how everything is setup for Mineverse Skyblock. So take this more as an idea.

    This code just handles the prompt bits.
    PlayerListner.java
    Code:
    
    @EventHandler
    public void onPlayerChat(AsyncPlayerChatEvent event) {
        ChatColor chatColorGreen = ChatColor.GREEN;
    
        event.setCancelled(true);
        SimpleComponent.
                of(event.getPlayer().getDisplayName())
                .onHover(
                        event.getPlayer().getDisplayName() +
                                "\n" + chatColorGreen + "Level 0"
                )
                .onClickRunCmd("/visit")
                .append(" " + event.getMessage())
                .send(event.getPlayer());
    }
    
    

    CustomVisitCommand.java
    Code:
    
    public class CustomVisitCommand extends SimpleCommand {
    
        public CustomVisitCommand() {
            super("visit");
        }
    
        @Override
        protected void onCommand() {
    
            /*
                Some check:
                if player is streamer / youtuber:
                    show the SimpleComponent
                else
                    proceed with regular visit
             */
    
            SimpleComponent
                    .of("Click to either visit their island or their channel!\n")
    
                    .append("\nClick here to visit their island!")
                    .onHover("Click to visit their island!")
                    .onClickRunCmd("/time day")
    
                    .append("\n")
    
                    .append("\nClick here to visit their channel!")
                    .onHover("Click here to visit their channel")
                    .onClickRunCmd("/time night")
    
                    .send(sender);
        }
    }
    

    Demonstration:
    Edit: Small demonstration link for the first suggestion.

    Solution #2
    Another option would be to run the normal /visit command, then if the player's island belongs to a streamer, show a prompt prompt in chat to link to that person's Twitch or YouTube.

    There's different solutions but this is a possibility. I'm not sure how the check would happen, because (again) I'm not sure how Skyblock is setup.
     
    Last edited: Jul 26, 2020
  13. Swift
    Offline

    Swift Boss Member

    Messages:
    5,036
    IGN:
    Swiftlicious
    I see your thought process and in this case then that's totally up to matt if he wishes to change how his visit command processes as even if I did have the source, it's not my project to go around editing with. I'm not sure how down he would be to change this to work for both a visit and a channel message considering right now it's just an auto teleportation. I've implemented a little system for how I think it could work for survival once I get around to giving it to Kinsey to see if he'll like that type of thing. They might just be able to edit their island welcome message to include a channel click since whenever you visit someone that appears first.
     

Share This Page