Solved Spectator Mode

Discussion in 'Plugin Development' started by macproman();, Oct 31, 2014.

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

    macproman();

    Hello everyone!

    I'm back! Now, I really need some help with something. I want to make a spectator mode so when the player dies they will be added to it.

    Also, is there a way so that they wont be considered "alive"?

    Thanks in advance,

    Myles
     
  2. Offline

    Relicum

    Have a list of player UUID's, when the player dies in the game add their UUID to the list. Call the list say spectator then you can check to see if they are a spectator when you need to do a check. But that won't make what you mean by spectator mode, but it answers your question on checking is a player considered alive.
     
  3. Offline

    macproman();

    Could you show me an example of this Relicum?
     
  4. Offline

    Relicum

    What your saying is can I give you the code to make a spectator plugin ? The answer to that is NO. Reason this is not the plugin request forum. People will help you but "show an example" especially when its no small plugin either, you probably don't realise all the things that make up a spectator mode. It sounds like your only just starting out at programming is that correct ??
     
  5. Offline

    acer5999

    Relicum but pseudo is allowed right?
    Code:
    player death event
    if players UUID is in list X
    remove UUID from list X
    add UUID to list Y
    do spectator stuff.... Invisibilty and whatnot
     
    for checking...
    if player UUID is in list X
    player is in game
    if player UUID is in list Y
    player is spectator
    
     
  6. Offline

    Relicum

    acer5999 Pseudo is fine.

    But you have missed the most important points I bet you list starts to get big not just "do spectator stuff.... Invisibilty and whatnot " Try and write all the times you need, not how you code them just a list of what it needs to do. Learning to program is not all about code its about how to think logically and define what you need to do. In this case your find there is so much more than you think.
     
  7. Offline

    acer5999

    I'm rather confused by your comment but alright, I'll play. I put do spectator stuff because I didn't know what he meant by Spectator mode, make the player a ghost? spawn particles around player? make the player invisible and in fly mode? Should I have told him how to create a list and given him the JavaDocs for it? Should I have given him a lesson in logic?
    If so....
    How to create a list:
    Code:java
    1. //List
    2. List<Object> players = new ArrayList</*Put Object in here if you are using something below Java 6*/>();
    3. //HashMap (Contains a Key & Value)
    4. //Player is the Key
    5. //Location is the Value
    6. HashMap<Object,Object> = new HashMap</*Put Object in here if you are using something below Java 6*/>();
     
  8. Offline

    Relicum

    Sorry me must have confused each other I thought you wanted help as well.

    Without being rude this code example is so bad I leave this thread to avoid arguments.

    OMG and that below is meant to help the guy. Sorry shouldn't laugh but there is so many mistakes its unreal.

    Code:java
    1. //List
    2. List<Object> players = new ArrayList</*Put Object in here if you are using something below Java 6*/>();
    3. //HashMap (Contains a Key & Value)
    4. //Player is the Key
    5. //Location is the Value
    6. HashMap<Object,Object> = new HashMap</*Put Object in here if you are using something below Java 6*/>();
     
Thread Status:
Not open for further replies.

Share This Page