What is CraftPlayer & DataWatcher

Discussion in 'Spigot Plugin Development' started by chunza2542, Apr 15, 2017.

  1. Can you explain. What is CraftPlayer & DataWatcher with some example.
     
  2. Mas

    Mas

    CraftPlayer is the implementation of the 'Player' interface in the Bukkit API.

    I'm not sure about DataWatcher, show where you saw it?
     
  3. @ItsMas_ I saw DataWatcher in corpse plugin.
    Can you give me an example When I can use CraftPlayer.
     
  4. I don't know that DataWatcher is but the CraftPlayer is the Craftbukkit* implementation of Player.

    * Craftbukkit is the actual runtime and Bukkit and/or Spigot is an API
     
  5. In simple terms, DataWatcher keeps track of entity metadata(visibility, gravity) etc. The wiki should have a list of tracked data.