Invisible Rails

Discussion in 'Archived: Plugin Requests' started by Norbu10, Sep 16, 2013.

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

    Norbu10

    A plugin for invisible Rails. I know, i know. Most of you guys say : Its not possible!
    But. IT IS! I know it 99% Sure. But can somewhone figure it out

    Command
    - /InvisibleRail (You toggle the Editing mode on/off) and than when you break a rails it will be invisible.

    It will look like air! but it is Rails and it will react like rails.

    Items that can be invisible with this plugin
    - Rails
    - Ladders

    You can use it with :
    Traincarts
     
  2. Online

    timtower Administrator Administrator Moderator

    Norbu10 I am using something like this to make my rails look like water, what commands do you want to use? How do you want to define the rails?
     
  3. Offline

    Norbu10

    timtower

    OH TOTALLY FORGET! ok here :
    Command
    - /InvisibleRail (You toggle the Editing mode on/off) and than when you break a rails it will be invisible.

    It will look like air! but it is Rails and it will react like rails.

    Items that can be invisible with this plugin
    - Rails
    - Ladders
     
  4. Online

    timtower Administrator Administrator Moderator

    Norbu10
    https://www.dropbox.com/s/u8fvlxbcar48s2y/InvisibleRail.jar
    Plugin.yml:
    Code:
    commands:
      invisiblerail:
        description: Duhh
        usage: /invisiblerail
        permission: invisiblerail.use
        permission-message: You dont have perms for this
    Config:
    Code:
    world: {}
    blocks:
    - RAILS
    - LADDER
    Just don't touch the world, that is for storage, blocks is the allowed blocks part
     
  5. Offline

    metalhedd

    timtower apologies for snooping, but I was curious how this was accomplished so I took a look at the source, and I think you may have made a mistake. It doesn't look like this code will do anything at all, it has a BukkitRunnable that's never scheduled to be run, so all it really does it store data in the config file.
     
    iwitrag likes this.
  6. Online

    timtower Administrator Administrator Moderator

    Shit, forgot that one, ty ;)
    EDIT: https://www.dropbox.com/s/u8fvlxbcar48s2y/InvisibleRail.jar ( same link, just reposting, is different file though )
     
  7. Offline

    metalhedd

    Thanks :)
    Does this just send fake block updates to everyone every 50 ticks to change the relevant blocks to air? that seems like it might be unnecessarily hard on bandwidth and resources, is the server smart enough to avoid sending that packet if the player is too far away?
     
    fromgate likes this.
  8. Online

    timtower Administrator Administrator Moderator

    Not really, the plugin will look at the world the player is in but making those calculations won't improve the lag, would probably only increase it, and I am using the same thing in my themepark with water, no issues at all
     
  9. Offline

    Norbu10

    timtower when i break a block it will be broken/It dont act like rails. Plugins that i am using : TCHangrail, Traincarts and ManySmallTweaks.

    <Removed double post - Use edit button to edit your post - Necrodoom>
     
  10. Online

    timtower Administrator Administrator Moderator

    Norbu10 Did you use the command? Did you got the message?
     
  11. Offline

    Norbu10

    timtower I Used /invisiblerail then the message : You now turn blocks invisible when you break them. Than i break rails. Let carts ride from rails to the invisible ones. And it just isnt riding. Just acting like air

    EDIT : I used the second dropbox you send. Not the first one
     
  12. Online

    timtower Administrator Administrator Moderator

    Will look into it, is the rails still there though?
    And both links are the same :p
     
  13. Offline

    Norbu10

    timtower
    No it isnt there.
    Just is sending a message nothing else

    timtower
    if you want you could test it on my server?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  14. Online

    timtower Administrator Administrator Moderator

    Norbu10 Have my own localhost test server
     
  15. Offline

    Norbu10

  16. Online

    timtower Administrator Administrator Moderator

    Haven't tested it yet, I am at school
     
  17. Offline

    Norbu10

    timtower Oh sorry!

    EDIT : Say when you have tested it xD
     
  18. Offline

    DarkRiddles

    timtower likes this.
  19. Offline

    blablubbabc

    You could listen for the chunk packet's via protocol lib and replace the invisible rails with air. Similiar to how Orebfuscator works. That way it would vanish the rails exactly at the moment it needs to and it would not have to send those packets the whole time, but only when actually requested by the player (when the player requests the chunk to be sent).
     
  20. Offline

    DarkRiddles

    hmm, Got an error, using not the latest bukkit version so let me see if that does anything.
     
  21. Online

    timtower Administrator Administrator Moderator

    blablubbabc Nice touch, but if you interact with the block it changes back, then you are busted, that is why I use a set interval
     
    xXSilverswordXx likes this.
  22. Offline

    blablubbabc

    You could catch those packet's too and cancle their sending ;-)
     
  23. Offline

    Norbu10

    Code Language :confused:
     
    Benlewis9000 and blablubbabc like this.
  24. Online

    timtower Administrator Administrator Moderator

    Except that I am not familiar with sending / catching packets, this is just by using sendBlockChange
     
  25. Offline

    Norbu10

    [cake] Cake for the person who creates this plugin ;)
     
  26. Offline

    DarkRiddles

    Alright, same error "Using Latest Bukkit v." Also, this is on start up.

    Code:
    java.lang.NullPointerException
            at nl.timdebrouwer.invisiblerail.InvisibleRail.onEnable(InvisibleRail.ja
    va:38)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:457)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:381)
            at org.bukkit.craftbukkit.v1_6_R2.CraftServer.loadPlugin(CraftServer.jav
    a:282)
            at org.bukkit.craftbukkit.v1_6_R2.CraftServer.enablePlugins(CraftServer.
    java:264)
            at net.minecraft.server.v1_6_R2.MinecraftServer.l(MinecraftServer.java:3
    13)
            at net.minecraft.server.v1_6_R2.MinecraftServer.f(MinecraftServer.java:2
    90)
            at net.minecraft.server.v1_6_R2.MinecraftServer.a(MinecraftServer.java:2
    50)
            at net.minecraft.server.v1_6_R2.DedicatedServer.init(DedicatedServer.jav
    a:151)
            at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java
    :391)
            at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:5
    82)
     
  27. Offline

    Garris0n

    Could just listen to the interact event.
     
  28. Offline

    DarkRiddles

    Breaking block.
    Code:
    07:57:56 [SEVERE] Could not pass event BlockBreakEvent to InvisibleRail v0.0.1
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:427)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:62)
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
    ava:477)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:462)
            at net.minecraft.server.v1_6_R2.PlayerInteractManager.breakBlock(PlayerI
    nteractManager.java:279)
            at net.minecraft.server.v1_6_R2.PlayerInteractManager.dig(PlayerInteract
    Manager.java:125)
            at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java
    :538)
            at net.minecraft.server.v1_6_R2.Packet14BlockDig.handle(SourceFile:46)
            at net.minecraft.server.v1_6_R2.NetworkManager.b(NetworkManager.java:296
    )
            at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java
    :116)
            at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37)
            at net.minecraft.server.v1_6_R2.DedicatedServerConnection.b(SourceFile:3
    0)
            at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:5
    90)
            at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:2
    26)
            at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:4
    86)
            at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java
    :419)
            at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:5
    82)
    Caused by: java.lang.NullPointerException
            at nl.timdebrouwer.invisiblerail.InvisibleRail.blockBreakEvent(Invisible
    Rail.java:70)
            at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:425)
            ... 16 more
     
  29. Online

    timtower Administrator Administrator Moderator

    DarkRiddles Found it already, also fixing the error that you get when you fixed that one
    Good point, to lazy though
     
    DarkRiddles likes this.
  30. Offline

    Garris0n


    for (String string : this.config.getStringList("blocks")) {
    Material mat = Material.valueOf(string);
    if (mat != null)
    {
    this.invblocks.add(mat);

    private List<Material> invblocks = new ArrayList();
    Hmm...
     
Thread Status:
Not open for further replies.

Share This Page