pillar

Discussion in 'Plugin Development' started by 327, Jun 1, 2017.

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

    327

    im making a new minigame testing a concept and I was wondering how would I keep placing blocks in like a straight pillar for like 10 blocks? and how can I make it slow so it looks like someone invis is buidling it
     
    Last edited: Jun 1, 2017
  2. Offline

    CeramicTitan

    block.getRelative(BlockFace.UP) > set this to whatever. Add this to a for loop and it should execute 10 times. Do this in your onBlockPlace event.

    Just an idea, not sure if its the 'best' way or if it will work.
     
  3. Offline

    327

    what does block equal?
     
  4. Offline

    Zombie_Striker

    @327
    "block" is the starting block (i.e, the block at the bottom of the pillar)

    To add delay between each block placement, use Delayed tasks in increments. Once one block is placed, wait a few ticks before placing the other.
     
    CeramicTitan likes this.
  5. Offline

    327

    Code:
    [19:38:02 ERROR]: Error occurred while enabling
    Minigame v1.0 (Is it up to date?)
    java.lang.NullPointerException
            at me.bukkit.William.MainClass.onEnable(MainClass.java:41) ~[?:?]
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:335) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugin(CraftServer.java:356) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.enablePlugins(CraftServer.java:316) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecraft.server.v1_8_R1.MinecraftServer.q(MinecraftServer.java:402) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecraft.server.v1_8_R1.MinecraftServer.k(MinecraftServer.java:370) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecraft.server.v1_8_R1.MinecraftServer.a(MinecraftServer.java:325) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:211) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:505) [spigot-1.8.jar:git-Spigot-550ebac-7019900]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
     
  6. Offline

    Zombie_Striker

    @327
    1. Why are you still on 1.8? Older updates should never be used. Update to 1.11.
    2. Something on line 41 in the onEnable is null. Try to figure out which variable is null and make sure it is not null, or post the full class.
     
  7. Offline

    327

    its my command register

    ok i fixed that but now i get

    Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token
    found character '\t(TAB)' that cannot start any token. (Do not use \t(TAB) for indentation)
    in 'reader', line 6, column 1:
    start:

    but my plugin.rml is
    commands:
    start:

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
  8. Offline

    Zombie_Striker

    @327
    You cannot use tabs when adding spaces. You must use spaces in multiples of two.
     
  9. Offline

    327

    i tried
    but how can i make it stop when it hits a block or gets 10
     
  10. Offline

    CeramicTitan

    Add a counter variable that increments everytime a block gets added.
     
Thread Status:
Not open for further replies.

Share This Page