···11# TuxStrap
2233-A modern event-driven plugin system for Roblox game management, built with TypeScript and Bun.
44-55-## Features
66-77-- **Event-Driven Architecture**: Direct event emission to plugins without RPC overhead
88-- **Type-Safe Events**: Full TypeScript support with proper type checking
99-- **Plugin System**: Easy-to-use plugin registration and management
1010-- **State Management**: Real-time game state tracking and updates
1111-- **Backward Compatibility**: Legacy hook system still supported
1212-1313-## Installation
1414-1515-```bash
1616-bun install
1717-```
1818-1919-## Usage
2020-2121-### Basic Setup
2222-2323-```typescript
2424-import { EventEmitter, registerPlugin } from "./src/index";
2525-2626-// Register a plugin
2727-registerPlugin({
2828- name: "My Plugin",
2929- id: "my-plugin",
3030- forceEnable: true,
3131- configPrio: 0
3232-}, (plugin) => {
3333- // Subscribe to events
3434- const gameJoinSub = plugin.on("GAME_JOIN", (gameData) => {
3535- console.log("Joined game:", gameData.placeId);
3636- });
33+A modern Bloxstrap alternative for Linux, built with TypeScript and Bun.
3743838- // Cleanup when done
3939- return () => gameJoinSub.unsubscribe();
4040-});
4141-4242-// Emit events
4343-EventEmitter.emitGameJoin({
4444- ipAddr: "127.0.0.1",
4545- placeId: "123456789",
4646- jobId: "test-job-id",
4747- serverType: "PUBLIC"
4848-});
4949-```
5050-5151-### Available Events
5252-5353-- `GAME_JOIN`: Emitted when joining a game
5454-- `GAME_LEAVE`: Emitted when leaving a game
5555-- `PLAYER_JOIN`: Emitted when a player joins
5656-- `PLAYER_LEAVE`: Emitted when a player leaves
5757-- `BLOXSTRAP_RPC`: Emitted for Bloxstrap RPC events
5858-- `STATE_CHANGE`: Emitted when game state changes
5959-6060-## Migration from BloxstrapRPC
6161-6262-If you're migrating from the old BloxstrapRPC API, see the [Migration Guide](docs/EVENT_SYSTEM_MIGRATION.md) for detailed instructions.
6363-6464-## Development
6565-6666-```bash
6767-# Run the main application
6868-bun run src/index.ts
6969-7070-# Test the event system
7171-bun run src/test-event-system.ts
7272-```
7373-7474-## Project Structure
7575-7676-```
7777-src/
7878-├── api/
7979-│ ├── CurrentState.ts # Game state management
8080-│ ├── EventCollector.ts # Main event collection system
8181-│ ├── EventEmitter.ts # Event emission interface
8282-│ ├── Plugin.ts # Plugin registration system
8383-│ ├── RobloxLogHooks.ts # Legacy hook system (deprecated)
8484-│ └── types.ts # TypeScript type definitions
8585-├── plugins/
8686-│ ├── default.ts # Default plugin configuration
8787-│ ├── example.ts # Example plugin implementation
8888-│ └── index.ts # Plugin loading
8989-└── index.ts # Main entry point
9090-```
9191-9292-This project was created using `bun init` in bun v1.2.18. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
55+wip