Ytspawn Plugin Documentation
Overview
Ytspawn is a Minecraft plugin that integrates YouTube live chat with in-game events, allowing viewers to spawn entities and trigger special events in the Minecraft world through chat commands.
JOIN THIS DISCORD SERVER AND GET YOUR PASSWORD
https://discord.gg/exeontop
Features
- YouTube Live Chat Integration
- Entity Spawning
- Special Events
- Custom Named Entities
- OP Chicken Feature
- Speed Horse Spawning
- Configurable Settings
Configuration
Edit the config.yml file to set up the plugin:
apiKey: "YOUR_YOUTUBE_API_KEY"
videoId: "YOUTUBE_LIVE_VIDEO_ID"
channelId: "YOUTUBE_CHANNEL_ID"
pollingInterval: 200
spawnInterval: 100
- apiKey: Your YouTube Data API key
- videoId: ID of the live stream video
- channelId: Your YouTube channel ID
- pollingInterval: Time between chat message polls (in ticks)
- spawnInterval: Minimum time between entity spawns (in ticks)
Usage
Chat Commands
Viewers can type these commands in the YouTube live chat:
-
- "zombie" - Spawns a zombie
- "cow" - Spawns a cow
- "sheep" - Spawns a sheep
- "wolf" - Spawns a wolf
- "cat" - Spawns a cat
- "creeper" - Spawns a creeper
- "irongolem" - Spawns an iron golem
- "skeleton" - Spawns a skeleton
- "pig" - Spawns a pig
- "chicken" - Spawns a chicken
- "parrot" - Spawns a parrot
- "pillager" - Spawns a pillager
- "ravager" - Spawns a ravager
- "villager" - Spawns a villager
- "piglin" - Spawns a piglin
- "zoglin" - Spawns a zoglin
- "slime" - Spawns a slime
- "magmacube" - Spawns a magma cube
- "choco" - Spawns a baby panda named "Choco"
- "opchicken" - Spawns a special rotating chicken that drops valuable loot
- "speed" - Spawns a pre-tamed horse with a saddle
- "silverfish" - Spawns a silverfish
- "endermite" - Spawns an endermite
- "axolotl" - Spawns an axolotl
Special Events
- New Sponsor: Spawns a Warden named "New Member"
- Super Chat: Spawns an Ender Dragon named "Super Chat Dragon"
Technical Details
Dependencies
- Bukkit/Spigot API
- YouTube Data API v3
(no need to add to your server)
How to get your api key
- Create a new project or select an existing one.
- Click on "Enable APIs and Services" at the top of the page.
- Search for "YouTube Data API v3" and select it.
- Click the "Enable" button to activate the API for your project.
- Once enabled, go to the "Credentials" section in the left sidebar.
- Click on "Create Credentials" and select "API Key" from the dropdown menu.(also create for auth )
- Your new API key will be generated. Copy this key.
- Open the config.yml file in your ytspawn plugin folder.
- Replace the existing apiKey value with your new API key:
Key Methods
- onEnable(): Initializes the plugin and YouTube API connection
- pollChatMessages(): Fetches and processes live chat messages
- rotateChickenAndDropLoot(): Handles the OP Chicken feature
- dropOpLoot(): Generates random valuable loot
Error Handling
The plugin implements exponential backoff for API request failures to prevent excessive API calls and potential rate limiting.
Performance Considerations
- Asynchronous chat polling to prevent server lag
- Configurable intervals for polling and spawning to manage server load
Limitations
- Requires an active YouTube live stream
- Dependent on YouTube API quotas and rate limits
This documentation provides an overview of the ytspawn plugin's features, configuration, usage, and technical details. It serves as a comprehensive guide for users and developers working with the plugin.