spandan__xd

It supports:

Fabric Spigot Paper Purpur Minecraft 1.21.x including newer 1.21 builds � spigotmc.org +1 Features:

Security cameras Camera groups Computer monitor system Night vision Camera rotation Zoom support Permissions system Basic commands:

Plain text /cctv camera create <name> /cctv group create <name> /cctv group addcamera <group> <camera> /cctv computer get

Kodari AI
KodariMay 18 at 2:23 pm 19,447 (v2)

I’ll create a comprehensive CCTV security camera plugin for Minecraft servers.

CCTVPlugin
A security camera system for Minecraft servers. Players can create cameras at specific locations, organize them into groups, and view them through computer monitors. Features include camera rotation, zoom control, night vision, and group management. Includes comprehensive permission system and admin commands for camera moderation. Compatible with Spigot, Paper, and Purpur 1.21.x.

I’ll create a modular architecture with camera management, group system, computer monitors, and view sessions.

Project created! This CCTV plugin provides:

Core Features:

  • Camera creation at player locations with rotation tracking

  • Camera groups for organizing multiple cameras

  • Computer monitors (placeable items) for viewing cameras

  • View sessions with spectator mode and night vision

  • Configurable zoom and rotation limits

  • Comprehensive permissions system

Commands Implemented:

  • /cctv camera create <name> - Create camera at current location

  • /cctv camera delete <name> - Delete a camera

  • /cctv camera list - List your cameras

  • /cctv group create <name> - Create camera group

  • /cctv group addcamera <group> <camera> - Add camera to group

  • /cctv group removecamera <group> <camera> - Remove camera from group

  • /cctv group list - List your groups

  • /cctv computer get - Get computer monitor item

How it works:

  1. Players create cameras at specific locations

  2. Get a computer monitor item with /cctv computer get

  3. Place the monitor and right-click to open camera selection GUI

  4. Click a camera to enter spectator view at that location

  5. Sneak to exit camera view and return to original location

All data persists to JSON files with automatic save/load on server restart.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
17 1,678
src/main/java/com/cctv/CCTVPlugin.java
package com.cctv;

import com.cctv.command.CCTVCommand;
import com.cctv.listener.CameraInteractListener;
import com.cctv.listener.ComputerInteractListener;
import com.cctv.listener.ViewListener;
import com.cctv.manager.CameraManager;
import com.cctv.manager.ComputerManager;
import com.cctv.manager.GroupManager;
import com.cctv.manager.ViewManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class CCTVPlugin extends JavaPlugin {
    
    private CameraManager cameraManager;
    private GroupManager groupManager;
    private ComputerManager computerManager;
    private ViewManager viewManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.cameraManager = new CameraManager(this);
        this.groupManager = new GroupManager(this);
        this.computerManager = new ComputerManager(this);
        this.viewManager = new ViewManager(this);
        
        cameraManager.loadData();
        groupManager.loadData();
        computerManager.loadData();
        
        getCommand("cctv").setExecutor(new CCTVCommand(this));
        
        getServer().getPluginManager().registerEvents(new CameraInteractListener(this), this);
        getServer().getPluginManager().registerEvents(new ComputerInteractListener(this), this);
        getServer().getPluginManager().registerEvents(new ViewListener(this), this);
        
        getLogger().info("CCTVPlugin has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (viewManager != null) {
            viewManager.stopAllSessions();
        }
        
        if (cameraManager != null) {
            cameraManager.saveData();
        }
        
        if (groupManager != null) {
            groupManager.saveData();
        }
        
        if (computerManager != null) {
            computerManager.saveData();
        }
        
        getLogger().info("CCTVPlugin has been disabled!");
    }
}