Golem that protects player and attacks others?

Discussion in 'Plugin Development' started by kayc01, Apr 10, 2016.

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


    Hey, i was wondering if there is any known way a Golem could be triggered to be a friendly for the player that placed the last pumpkin block on the iron blocks and anyone else is an enemy that is automatically attacked or upon the player that owns the Golem attacking or being attacked.

    Basically the nature of a wolf.

    What events would i need here? A Block Place event and a Creature Spawn event?
    Then what would i do to get what i need working? Any code that can be given would be very helpful.

    Or, should i just use a wolf if its too much work? Iron Golem would be a lot more cooler though.

    My code atm:

        public void onCreatureSpawn(CreatureSpawnEvent event) {
            if(event.getEntityType() == EntityType.WITHER) {
            if(event.getEntityType() == EntityType.IRON_GOLEM) {
    No code... lol because i am not sure which way is the best way to go about it.

  2. Offline


Thread Status:
Not open for further replies.

Share This Page