Why is this not a vanilla setting?

Discussion in 'Server & Community Management' started by Aeternum, Jun 6, 2016.

  1. Aeternum

    Supporter

    Hey, can anyone help me make all compasses on my server point north? instead of spawn?
    Its a single world 1.9 server. I cant find any plugins or settings that let me force all compasses to point north.
    I would prefer them to point the same as the f3 debug menu.
    If anyone can help thanks!
     
  2. Code (Java):

    @EventHandler
    public void onJoin(PlayerJoinEvent e){
      Player p = e.getPlayer();
      new BukkitRunnable(){
        @Override
         public void run(){
           p.setCompassTarget(p.getLocation().getBlock().getRelative(BlockFace.NORTH).getLocation());
         }
      }.runTaskTimer(INSTANCE_OF_MAIN, 0, 20 /*Every second*/);
    }
     
    Try this, if it doesn't work try recoding it before replying again.
     
  3. He's not asking for code, this is "Server & Community Management".
     
  4. Aeternum

    Supporter

    Well I wasnt expecting code, but I can use the code as well. My problem is waiting for eclipse to load. takes forever...
     
  5. Oh, I'll make it a jar for you. Wait a couple mins. I need to open my IDE.
     
  6. Here you go
     

    Attached Files:

  7. Aeternum

    Supporter

    tanks, i didnt have the spigot api jar for 1.9 so i was waiting for it to compile.
     
  8. Aeternum

    Supporter

    ill see if this works right now
     
  9. Aeternum

    Supporter

    Yep it works, once i have the api ill work a little bit with it but thats otherwise what i was trying to do thanks.
    All the plugins i could find are either for a much older version of mc or have to many other features and i wasnt sure exactly how to do this in a plugin so thanks.