Lesson plan

Unit 2: Events

Students explore events and event handlers through an unplugged activity, practice with MakeCode in Minecraft, and build a creative coding project.

Unit 2: Events
Ages
Ages 11-13
Duration
1 hour
Essential question

How do events and event handlers trigger actions in everyday life and inside computer programs?

Overview

Events and event handlers are foundational concepts across every programming language. In this unit, learners examine how specific occurrences act as triggers that cause automated responses, starting from everyday cause-and-effect scenarios and moving into digital systems.

Using MakeCode alongside Minecraft Education, students translate these principles into gameplay. They construct event handler blocks that execute distinct actions within the game world, finishing with an open-ended project that demonstrates their ability to link triggers to outcomes.

Learning objectives

By the end of this lesson students will be able to:

  • Explain how events trigger actions in both daily life and computer programs.
  • Construct event handler blocks in MakeCode to trigger specific in-game results.
  • Recognize how event-driven programming functions during active Minecraft gameplay.
  • Design and execute a creative coding project that links events to custom outcomes.

Blocks and items used in this lesson

Key vocabulary

Event
An action or occurrence detected by a program, such as a player action or keystroke.
Event Handler
A block or routine in code that waits for a specific event and executes actions when it occurs.
Cause and Effect
The principle where an initial event directly produces a specific result or reaction.

Before class

Lesson sequence

Suggested timing: about 210 minutes in total.

  1. Lesson A: Introduction to Events50 min

    Lead an unplugged activity focused on cause and effect to demonstrate how real-world events prompt immediate reactions. Guide students to connect these physical examples to computer programming concepts before opening the game world.

  2. Lesson B: Coding with Events50 min

    Transition students into MakeCode within Minecraft. Have learners assemble their first event handler blocks, observing directly how in-game triggers run predetermined code commands.

  3. Lesson C: Linking Events50 min

    Students practice chaining triggers together and managing multiple event blocks. Provide time for structured exploration where changing the trigger alters the resulting gameplay action.

  4. Lesson D: Get Creative with Events60 min

    Learners apply their skills in a concluding creative project. Students design a custom program that uses several event handlers to create unique mechanics or interactions in their Minecraft world.

Assessment: success criteria

  • Student can identify real-life examples of cause and effect matching the concept of events.
  • Student accurately builds event handler blocks in MakeCode that respond to player actions.
  • Student completes the creative project using functional event handlers to produce intended results.
  • Student explains the role of event handlers using the student workbook and formative assessment checks.

Differentiation

Support

Walk through the initial MakeCode event handler setup step-by-step using the classroom presentation before independent coding begins.

Stretch

Challenge students to link multiple distinct event handlers together to trigger complex, multi-stage interactions in their final project.

Knowledge check

5 questions to check understanding after the lesson. Tap an answer to see if it is right; the score appears at the end.

  1. 1What is the primary role of an event handler in a program?

  2. 2Which real-world concept is used in this unit to introduce events?

  3. 3Which tool do students use to code events inside Minecraft Education for this unit?

  4. 4In which programming languages can you find events and event handlers?

  5. 5How do students demonstrate their learning at the end of the unit?

Resources

Part of the Code with Minecraft curriculum

This is lesson 2 of 11 in Code with Minecraft.

  1. Unit 1: Introduction
  2. Unit 2: Events
  3. Unit 3: Coordinates
  4. Unit 4: Variables
  5. Unit 5: Conditionals
  6. Unit 6: Functions
  7. Unit 7: Iteration
  8. Unit 8: Arrays
  9. Unit 9: AI
  10. Unit 10: Final Project
  11. Hour of AI: Generation AI

Frequently Asked Questions

How is this unit structured across multiple class sessions?

The unit contains four distinct lessons (A through D) that each take roughly 45 to 60 minutes, progressing from an unplugged introduction to guided coding, linking triggers, and an independent creative project.

Where can I find specific formative assessment criteria?

Formative assessment guidance and tracking tools are detailed in the Assessment Guide found in the unit's supporting files alongside the educator's guide.

Adapted from Unit 2: Events by Minecraft Education on Minecraft Education, last updated Mar 10, 2025. This classroom version, the timings and the quiz were written by 9Minecraft Education.

You May Also Like

9Minecraft Education is an independent teaching resource and is not affiliated with Mojang or Microsoft. Lesson plans here are our own classroom-ready adaptations; each one links to the original resource and credits its author. © 2026 9minecraft.net