Solved your bed was missing or obstructed

Discussion in 'Plugin Development' started by Doct_fr, Jul 18, 2020.

  1. Offline

    Doct_fr

    Code:
            int x = random.nextInt(60000);
            int z = random.nextInt(30000);
            int y = 0;
    Location randomLocation = new Location(player.getWorld(), x, y, z);
    
    player.setBedSpawnLocation(randomLocation, true);
    So basicly this is good but one of my plugin is intercepting it.
    my list of plugin are in attached files. i am opening a towny server with friends soon i hope it will be resolve quick. :) thank you.
     

    Attached Files:

  2. Offline

    KarimAKL

    @Doct_fr I think a valid bed needs to be in the location. What're you trying to do?
     
  3. Offline

    Doct_fr

    @KarimAKL i am try to set spawn point so when you die you spawn there
     
  4. Offline

    KarimAKL

    @Doct_fr Instead of trying to set the bed spawn, listen to the PlayerRespawnEvent and teleport the player to your location.
     
  5. Offline

    Doct_fr

    @KarimAKL but then with towny when you have a town it is putting your spawn point where your town is.
     
  6. Offline

    KarimAKL

    @Doct_fr Then hook into Towny and check whether or not they have a town to spawn into.
     
  7. Offline

    Doct_fr

    Thank for you help but @KarimAKL how can I do that ?
     
  8. Offline

    KarimAKL

  9. Offline

    Doct_fr

    @KarimAKL no need to do that. i figure it out on my own ! Multiverse-Core-4.1.0.jar was intercepting it and it was teleporting me to the world spawn. i went in config file and chnage firstspawnoverride: 'true' to false ! thx for answering my question though. :)
     

Share This Page