Need a basic /tp and /i source

Discussion in 'Plugin Development' started by jimbo8, Mar 15, 2012.

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

    jimbo8

    I need a basic /tp (playername) and /i (ID) (Amount). I want a source code, or a tutorial so i can put it all in one plugin... I have already made my first own plugin today(hooray!). I will really want a code where i can change what it says and stuff... + i need to learn how to write the code by myself ;) Thanks. Jimbo8.(Sorry if this is the wrong place to post and sorry for bad english)
     
  2. Offline

    Double0negative

    basically for tp it goes something like

    Code:
    player.setLocation(player2.getLocation())
    
    Not entirely sure about the /i, ive never done anything with items
     
  3. Offline

    Sayshal

    Look at Commandbook, they seem to do it pretty well. :) Source/Github can be found at build.sk89q.com
     
  4. Offline

    WaffleOnABike

  5. Offline

    ItsHarry

    Don't use setLocation, it causes errors.
    If you want to teleport a player, use .teleport(location); instead.
     
  6. Offline

    jimbo8

    How do i connect a java file with the main file? The plugin i made was in 2 files, but idk how i did put them together... I am still a beginner xD
     
  7. Offline

    x86cam

    PHP:
    getCommand("test").setExecutor(new commandTest());
     
  8. Offline

    jimbo8

    But how do i connect for example,

    Teleport.java with Main.java? And how do i connect multiple? Like 3 ones like this:

    Teleport.java with iCommand.java with Main.java
     
  9. You should probally learn a bit of Java before trying to make Bukkit plugins.
     
    TopGear93 likes this.
  10. Offline

    jimbo8

    I know a little bit java, but i more "forgot" how to do that x) I have watched like 50 episodes from TheNewBoston.
     
  11. Offline

    VeryBIgCorp

    Do you mean importing?
     
  12. Offline

    jamietech

    At the beginning of your class add:
    Code:
    public Teleport teleport = new Teleport(constructorshere);
    which will allow you to access your "Teleport" class with just teleport.methodHere()
     
Thread Status:
Not open for further replies.

Share This Page