Inactive [DEV] SpoutPlugin - Unleash the flow of endless possibilities [1.0-1.3.2]

Discussion in 'Inactive/Unsupported Plugins' started by SpoutDev, Aug 1, 2011.

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

    SpoutDev

    In order to centralize support of our legacy projects, we will no longer be providing support on Bukkit. Please use www.spout.org for support with our projects going forward.
     
  2. Offline

    ledhead900

    Code:
    2011-10-04 16:49:36 [INFO] ledhead900 [/127.0.0.1:52640] logged in with entity id 77375 at ([Earth] 140.03559635827074, 65.0, 165.59123115132712)
    2011-10-04 16:49:37 [INFO] Reading data
    2011-10-04 16:49:37 [INFO] [Spout] Successfully authenticated ledhead900's Spoutcraft client. Running client version: 1.0.6.449
    2011-10-04 16:49:37 [WARNING] Failed to handle packet: java.lang.NullPointerException
    java.lang.NullPointerException
    at org.getspout.spout.chunkstore.SimpleChunkDataManager.getTaggedBlocks(SimpleChunkDataManager.java:208)
    at org.getspout.spout.block.SpoutCraftChunk.getTaggedBlocks(SpoutCraftChunk.java:253)
    at org.getspout.spout.inventory.SimpleItemManager.sendBlockOverrideToPlayers(SimpleItemManager.java:736)
    at org.getspout.spout.inventory.SimpleItemManager.sendBlockOverrideToPlayers(SimpleItemManager.java:699)
    at org.getspout.spout.player.SimplePlayerManager.setVersionString(SimplePlayerManager.java:115)
    at org.getspout.spoutapi.packet.PacketFullVersion.run(PacketFullVersion.java:37)
    at org.getspout.spout.packet.CustomPacket.a(CustomPacket.java:130)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
    at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:500)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:464)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    CB 1185
    2011-10-04 16:45:19 [INFO] Spout 1.0.6.381 has been initialized

    edit:

    Seems fixed in latest version thx
     
  3. Offline

    Klaste

    I'm currently running a bukkit server with a beta of Dr. Zhark's Mo Creatures SMP. I understand spoutcraft officially can't use modloader mods right now, but there doesn't happen to be any sort of workaround does there? Not a big deal if not, nothing requires that I use spoutcraft right now - I'm just using levelcraft, and some of the extra features would be neat. Not to mention the client-server improvements.
     
  4. Offline

    Wulfspider

    No, there is no "workaround". ModLoader would have to be integrated into the conflicting classes and we'd have to change how we are doing things, which we have no plan on doing. We're getting close to releasing the client API, so you'll start seeing some neat client addons coming out soon. :)
     
  5. Offline

    misutaanime

    ok great, we shall wait for the new recommended build for spoutcraft, just wanted to make sure you guys knew about it.
     
  6. Offline

    marcusant

    I get an error with #0
     
  7. Offline

    Wulfspider

    Huh? What?
     
  8. Offline

    marcusant

    Code:
    2011-10-04 10:46:21 [SEVERE] Could not load 'plugins\Spout.jar' in folder 'plugins':
    unacceptable character #0 special characters are not allowed
    in "<reader>", position 0
        at org.yaml.snakeyaml.reader.StreamReader.checkPrintable(StreamReader.java:68)
        at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:159)
        at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:117)
        at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:106)
        at org.yaml.snakeyaml.scanner.ScannerImpl.scanToNextToken(ScannerImpl.java:964)
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:237)
        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:183)
        at org.yaml.snakeyaml.parser.ParserImpl$ParseImplicitDocumentStart.produce(ParserImpl.java:200)
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:104)
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
        at org.bukkit.util.config.Configuration.load(Configuration.java:82)
        at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:157)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:175)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:215)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:139)
        at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:104)
        at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:52)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:136)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
  9. Offline

    Pasukaru

    @marcusant
    You have an error in your config.yml.
     
  10. Offline

    marcusant

    I've never changed it, but must have gotton corrupted by a power outage because it contains random unreadable gibberish.
     
  11. Offline

    Pasukaru

    Delete the file and reboot the server, Spout should generate a new one.
     
  12. Offline

    marcusant

    thanks for your help
     
    Pasukaru likes this.
  13. Offline

    Pasukaru

    You're welcome. :)
     
  14. Offline

    cheesecake93

    Hey I got a question, I'm playing on a bukkit server with spout.

    I don't use mods for minecraft except for one CTM, the mod is to make glass, bookshelf's and soon glass panels more pretty. http://www.minecraftforum.net/topic/228862-181connected-textures-mod-v14/

    I got one problem with this and that is I can't install the mod so I can use it, can someone of you tell me if I can even install it or not.
     
  15. Offline

    Gabriel333

    I have a problem in my plugin - BIT. The problem is that when two users opens the GUI at the same time the two GUI conflicts. So I know that I need to create one GUI per player. But I dont exactly understand hos to do this?

    Can anyone send me in the right direction?
     
  16. Offline

    Afforess

    Generally speaking, you need to give each player a separate screen. You can't send the exact same widgets to each player, because they are exclusive to 1 screen and 1 player at a time. HOWEVER, you can use widget.copy() to create a copy and show a copy to another player w/o issues.
     
  17. Offline

    Gabriel333

    Can I use something like this for each widget (making an array per widget)?
    Code:
    public static ArrayList<GenericTextField> mytextfield = new ArrayList<GenericTextField>();
    public static HashMap<UUID, String> myTextFields = new HashMap<UUID, String>();
    
    and what about the GenericPopup? Does I need one GenericPopup per player too?

    I still not totally sure I have understod what to do :-(
     
  18. Offline

    Afforess

    Yes.

    I'm not sure if you are aware, because it was added recently, but you don't need to try to keep track or manage widgets for the click or typing events.

    All controls now have a onEvent(Event e) method in them. So you can subclass a widget and override it and do the code there.

    e.g:
    Code:
    public class MyTextField extends GenericTextField{
        public void onTextFieldChange(TextFieldChangeEvent event) {
            //do stuff
        }
    }
    
    which is a lot cleaner than trying to keep track which is which is lists or maps.
     
  19. Offline

    Gabriel333

    No I was not aware of that. I guess I need to make alot of changes in my code then. Im using the "old" method og catching buttons and so... Do you know any plugin where it has been made the right way? I would be easier to understand if I could see an example :)
     
  20. Offline

    Mikhos

    @Afforess
    I updated to Java 7 and it seems to remedy most of my issues. I have only gotten the memory error once since.
     
  21. Offline

    Afforess

    Not sure if there are any.

    Basically, it's like commands. You create each button or text field (or slider) in each class, and then use the events inside those classes to do what you need.

    Ofc, you can still do it the old way. It's just messier.
     
  22. Offline

    SparrowMaxx

    I'm getting a noSuchMethod error when fiddling with the ItemManager, despite using the latest dev version of SpoutCraft and build 422 (the most recent). I don't know if the API is relevant; would having an old API be the source of that sort of problem?
    New problem. I am setting the texture of Material.APPLE to
    http://www.minecraftwiki.net/images/c/c4/Grid_Wheat.png
    But it doesn't seem to want to update the icon. Is this a problem on my end? Do these icons need to be a specific size? (do they even have to be square, or will Spout shape the .png to the right dimensions?)

    Code:
    SpoutManager.getItemManager().setItemTexture(Material.APPLE, this, "http://www.minecraftwiki.net/images/c/c4/Grid_Wheat.png");
     
  23. Offline

    Afforess

    Can you post the full stack trace?
     
  24. Offline

    SparrowMaxx

    I updated the API and it's not an issue anymore, so I assume that's it. See my previous post for the new problem.
     
  25. Offline

    Pamelloes

    I am running into issues with my popup dissapearing immediately after showing up.
    Popup creation code:
    Code:
        @Override
        public void onSpoutCraftEnable(final SpoutCraftEnableEvent e) {
            plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
                public void run() {
                    Player player = e.getPlayer(); // Get a player object from somewhere
                    SpoutPlayer spoutplayer = (SpoutPlayer) player; // Cast it!
                    PopupScreen popup = new MainMenu(plugin, spoutplayer);
                    plugin.log.info(String.format("Opened: %b", spoutplayer.getMainScreen().attachPopupScreen(popup))); // Show the player the popup
                }
            }, 10L);
        }
    ScreenListener (error is probably coming from here):
    Code:
        private class MainMenuScreenListener extends ScreenListener {
            @Override
            public void onScreenClose(ScreenCloseEvent e) {
                e.setCancelled(!canClose);
            }
        }
    Which is embedded in the MainMenu class:
    Code:
    public class MainMenu extends GenericPopup {//only relevant stuff shown :)
         //Lots of variables...
         private boolean canClose=false//important
         //more variables...
    
         //bulk of code
         //....
    }
    Edit: I've traced the problem to the following part of the spout api (org.getspout.spoutapi.packet.PacketScreenAction.java):
    Code:
        @Override
        public void run(int playerId) {
            SpoutPlayer player = SpoutManager.getPlayerFromId(playerId);
            ScreenEvent event;
            switch(ScreenAction.getScreenActionFromId(action)){
                case Close:
                    event = new ScreenCloseEvent(player, player.getMainScreen().getActivePopup(), ScreenType.getType(this.screen) );
                    Bukkit.getServer().getPluginManager().callEvent(event);
                    if (event.isCancelled()) {
                        this.action = (byte) ScreenAction.Close.getId();
                        player.sendPacket(this);
                    } else if (ScreenType.getType(this.screen) == ScreenType.CUSTOM_SCREEN) {
                        player.getMainScreen().closePopup();
                    }
                    if (!event.isCancelled()) {
                        player.openScreen(ScreenType.GAME_SCREEN, false);
                    }
                    break;
    I'm not completely sure what this does, but from what I can tell, after it detects that the event is cancelled, it sends a packet back to the client saying to close it anyways. This doesn't make any sense (though it would explain my problem). If someone from the dev team could check this out, it would be greatly apreciated.
     
  26. Offline

    Afforess

    Not quite. Sending the packet back to the client is the equivalent of telling it NOT to close the screen, and to keep it open. If you don't send a packet back, the client assumes all is well, and closes the screen. In which case, that code is correct.

    As for the problem with your code - not sure, it looks correct to me as well. Any chance I can get a test copy of your plugin to play with, as well as step-by-step instructions on how to reproduce the event cancelling so I can test it?
     
  27. Offline

    Caingen

    So I just had to delete my temp and bin folders in .spoutcraft because it wouldn't load. No big deal until Microsoft flagged Display.class as a severe threat.
     
  28. Offline

    Wulfspider

    Microsoft Security Essentials likes to flag everything... :/
     
  29. Offline

    Gabriel333

    Thanks for your help Afforess. I will try use your guidelines in the weekend - to see if I can make my plugin better :)
     
  30. Offline

    Fuzetsu

    WOAH trying out spout and mcmmo... this is epic! xD
     
  31. Offline

    Raycrash

    Is there a way to copy out the blue url's ?
    (Copy paste)



    Oh and it seems the chunk loading problem is back, they load slower than with the normal minecraft client... :(
     
Thread Status:
Not open for further replies.

Share This Page