Inactive [DEV] BukkitContrib Alpha 0.1.7 [1000]

Discussion in 'Inactive/Unsupported Plugins' started by Afforess, May 21, 2011.

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

    Afforess

    BukkitContrib is superseded by Spout, the new Bukkit/Client framework.
     
  2. Offline

    Afforess

    And there is your problem.

    The client mod does not start up exactly when the server starts. There is ~250ms delay between authentication.

    Instead, create a BukkitContribListener and check the onBukkitContribSPEnable method. ;)
     
  3. Offline

    IceReaper

    ah, thanks! :)
     
  4. Offline

    Afforess

    @Andrew1431,

    BukkitContrib does not manage SP mods, nor modify or interact with the gameplay rules. It just allows for other plugins to do so. In layman's terms, it the Bukkit mod for SP. Bukkit alone doesn't do anything, and neither does BukkitContrib.

    You will need to grab Capeme, or several other plugins that support BukkitContrib to change capes, etc.

    There is a config setting in plugins/BukkitContrib that allows you to force players to use the SP mod. They will be kicked after logging in w/o it. It will give them the URL to download this mod in the disconnect message.
     
  5. Offline

    subanoomic

    Hi.

    First of all, thanks for this great plugin. It really has some neat features I could use for my plugins.

    I'm writing a test plugin right now and I'm using the modified npcspawnerlib of the Citizens plugin to spawn NPCs.

    I'm changing the skin of an NPC like that:
    getAppearanceManager().setGlobalSkin((HumanEntity)getNpc().getHumanNpc().getMcEntity().getBukkitEntity(), "http://minecraft-skins.com/wp-content/uploads/2011/04/Mage-red.png");

    If I do this when standing next to the NPC, the skin changes just fine. However, after a relogin, the skin is gone. And if someone who hasn't been near the NPC before gets teleported there after the skin was changed like that, he doesn't see it until the method is called again.

    Is this a general problem or am I doing something wrong? Is there a way around it?

    Thanks in advance!
     
  6. Offline

    IceReaper

    correct me if im wrong but, client is getting skindata from original server. the way here to set skin is a "change". so the original will be loaded and then you have to assign all other.. just make a Scheduler which sets skins. cause when you teleport or you move a distance, players get removed /send to the client. got the same problem with my invisibility, but worked after using a scheduler

    okay, wrote it, can trigger it manually. how to correctly set the event?
    tried:
    pm.registerEvent(Event.Type.BUKKIT_CONTRIB_SP_ENABLE, contribListener, Priority.Normal, this);
    which is of course not working cuse the type does not exist. so how to bind it to the event?

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

    subanoomic

    Sounds reasonable. Thanks.
     
  8. Offline

    alta189

    You need to reset the skin for each person that logs in.
     
  9. Offline

    subanoomic

    Another problem:

    JavaDocs says that ContribCraftPlayer extends org.bukkit.craftbukkit.entity.CraftPlayer.

    However, when I do the following:
    Code:
    org.bukkit.craftbukkit.entity.CraftPlayer craftPlayer = (org.bukkit.craftbukkit.entity.CraftPlayer)bukkitPlayer;
    ContribCraftPlayer contribCraftPlayer = (ContribCraftPlayer)craftPlayer;
    
    I get this error:
    Code:
    java.lang.ClassCastException: org.bukkit.craftbukkit.entity.CraftPlayer cannot be cast to org.bukkitcontrib.player.ContribCraftPlayer
            at com.bukkit.subanomic.TestPlugin.NPCManager.update(NPCManager.java:382)
            at com.bukkit.subanomic.TestPlugin.TestPlugin$1.run(TestPlugin.java:208)
            at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:138)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:386)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    
    Did I do something wrong?
     
  10. Offline

    alta189

    Don't use CraftPlayer and ContribCraftPlayer
    Use Player and ContribPlayer
     
  11. Offline

    subanoomic

    I get almost the same error when using ContribPlayer. I do the following:

    Code:
    ContribPlayer contribPlayer = (ContribPlayer)bukkitPlayer;
    
    With bukkitPlayer being an org.bukkit.entity.Player.

    This is the error:

    Code:
    java.lang.ClassCastException: org.bukkit.craftbukkit.entity.CraftPlayer cannot be cast to org.bukkitcontrib.player.ContribPlayer
            at com.bukkit.subanomic.TestPlugin.NPCManager.update(NPCManager.java:381)
            at com.bukkit.subanomic.TestPlugin.TestPlugin$1.run(TestPlugin.java:208)
            at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:438)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    Again, bukkitPlayer is very definitely not a CraftPlayer but a Player.
     
  12. Offline

    alta189

    Works fine for me as I have released two plugins using BukkitContrib. Can you post you code on Github, I can help you then
     
  13. Offline

    subanoomic

    I will do so tomorrow if it can't be fixed. Thanks for your help!

    I need to add the craftbukkit.jar as a library. Maybe this causes the problem? Could you please try adding it to your plugin and see if you get the same error?
     
  14. Offline

    alta189

    I always add bukkit and craftbukkit xD
     
  15. Offline

    Afforess

    Use Event.Type.Custom

    Yes, but I highly recommend you use the interface ContribPlayer, not the implementing class, ContribCraftPlayer.

    At any rate, for it to work, BukkitContrib plugin must be running on your server.

    As for teleports, you will have to manually manage that. But relogging in should restore the skin, after a ~250 ms delay. It may be a bug on my end, I'm looking into it.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  16. Offline

    alta189

    @Afforess Is the Early GUI gonna be out tonight? I dont want to bother you, but I am trying to see if I should wait to update a plugin of mine that I would like to include the GUI stuff in, or if I should finish the update and then add another later with the GUI in it.

    Thanks for all your hard work :D
     
  17. Offline

    Afforess

    There will probably be some kind of update in the early hours of Sat. Morning ~4-5 hours, but the GUI is not done yet. Sunday?
     
  18. Offline

    alta189

    Ok, Thanks for letting me know :D, What will the update in ~4-5 hours include :D
     
  19. Offline

    Afforess

    Improvements to the sound API (wav, midi support), more customization there, custom item tooltips, some minor fixes, and minor tweaks. Should be way easier to update now that 0.0.7 included autoupdating. ;)

    Edit: Oh and the ability to get and set the clipboard of each player! That's already done. Was really easy. ;)
     
    Kateana! likes this.
  20. Offline

    alta189

    Yah, I was meaning to ask you about that, what is the getServer().getUpdateFolder() do. I know it returns the folder(as a string ;)) for the updates, but does it automatically update the jars?
     
  21. Offline

    Afforess

    Um, it's actually bugged. I tried using it. It's supposed to update them on server start or reload, if there are any in there. It doesn't.

    I wrote some code to download the jar on startup, and swap it on /reload.
     
  22. Offline

    alta189

    Oh, that sucks. I was excited that it might work so that I could add that functionality to my plugins. :D
     
  23. Offline

    Afforess

  24. Offline

    alta189

  25. Offline

    narrowtux

    @Afforess
    Did you have a look on security when you opened support for Clipboard?
    Because I'm sure that some users don't want to give all the servers out there access to their clipboard.
    I'd suggest something like most modern browsers do for location-based services. They ask, if server xy may see their location (Just now, Not now, Ever, Never).
    When you don't have time to do that, then at least give the users the chance to disable it completely ;)
     
  26. Hmm, the client mod doesn't seem to want to work for me, I tried installing it on a fresh minecraft.jar too.

    I set the "ForceSinglePlayerClient: true" and it kicks me, it obviously doesn't detect my unworking client mod, what should I do ? :/
     
  27. Offline

    CuZnDragon

  28. Offline

    Afforess

    OptiMine/OptiFog is not needed. I downloaded it with the plans to merge it, only to discover Notch already made all of the speed improvements part of 1.6. The mod does nothing beyond provide some controls now.

    As for the audio mod, I'll take a look when I get a dl link.

    Did you follow the link with instructions on how to install mods? Delete the Meta-Inf folder, copy the files into your jar.

    It's only access to their clipboard if there is text in it, ignored if there is other data (e.g files). I can't see a real problem with accessing the clipboard. Any client mod can do it themselves if they wanted. Just complain to the plugin author if they abuse it.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  29. Offline

    cronikkk

    Cant wait for that API :p
     
  30. Offline

    CuZnDragon

    Yes the OptiFog and OptiMine does do things for those of us with not as good systems with pushing the fog back. Loading chunks better and a few other items. Without it minecraft is unplayable on anything but peaceful as the lag and slow reaction doesn't get you killed.

    Also have you tested BukkitContrib with MCPatcher for the HD textures?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 15, 2016
  31. Offline

    Afforess

    No, it doesn't. I said, I looked at the code, it doesn't do anything significant beyond some minor fog tweaks and custom settings now. 1.6 included the bulk of the positive changes. It doesn't alter chunk loading at all.

    As for HD textures, no, but I plan too.
     
Thread Status:
Not open for further replies.

Share This Page