Parkour Plugin

Discussion in 'Plugin Development' started by SmokedPotatoMC, May 21, 2015.

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


    I was wondering if anyone would know how to make a plugin that allows players to warp to the start of a checkpoint using a slime ball, and how to make walking over certain areas make a new checkpoint. Just a brief idea on how I could do this. Thank you.
  2. Offline


    I think it would be the easiest to place pressureplates as checkpoints.
  3. Offline


    @SmokedPotatoMC PlayerMoveEvent to check if they step onto a certain type of block and set it as their checkpoint (HashMap probably), as for the slime ball PlayerInteractEvent to see if they right click a slime ball then tp them wherever
  4. Offline

    timtower Administrator Administrator Moderator

    Moved to plugin development.
  5. Offline


    uh, you could have it when you are at certain coords that are maby set in the config
  6. Offline


    Sounds complicated. What would be one actual line of code I could use?
  7. Offline


    • Create a method that uses PlayerInteractEvent
    • If the ItemInHand.getType() is equal to SlimeBall or SlimeBlock
    • Create an int x, int y, and int z that are the location of the start of parkore
    • player#teleport(x,y,z)//the one acutal line of code
    If you meant to do this in one line of code, then you can't do it.
    Last edited: May 24, 2015
  8. Offline


    public void onInteract(PlayerInteractEvent event) {
    Player player = (Player) event.getPlayer();
    if (player.getItemInHand().equals(Material.SLIME_BALL) && event.getAction().equals(Action.RIGHT_CLICK_AIR)) {
    And of course have a command or something to set the location. It *should* work but I haven't tried it or anything. I also don't know if getting the location from a config would be the best, but, whatever
Thread Status:
Not open for further replies.

Share This Page