disable commands in worlds, and vector help

Discussion in 'Plugin Development' started by dralletje, May 18, 2011.

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

    dralletje

    hello everybody,

    I have two problems. the first is, how can I disable a command or an piece of code if a player is in a disabled world. lets say we have a string disabledWorlds, with in there the disabled worlds separated by comma's. I thought this code
    Code:
    if (!disabledWorlds.contains(player.getLocation().getWorld()))
      // code
    where player is a player object of the player who performed the command. but this doesn't work.
    please help me

    my second question is how I can change a vector to a block face.
    I wanna select a block in the front of a player. but not the one he is looking at.
    like this (image):
    PPP ----------
    PPP
    PPP
    PPP
    BBB|BBB|SSS|
    BBB|BBB|SSS|

    where P is the player, B is a block, - is the players sight and S is the block I wanna select.

    I hope you can help me, awesome communitie
     
Thread Status:
Not open for further replies.

Share This Page