360 Secure SkillHub
360 安全技能中心

PyPlanet

该 Skill 面向 PyPlanet 游戏服务器插件生态,提供 Hello World 入门模板、GitHub 插件安装器(ghinstall 等命令)以及 Clan Spirits 部落/团队计分插件的用法说明。内容以安装步骤、命令表和示例代码片段为主,未包含安装器与计分插件的完整源码。

分类:开发
tomekdot
tomekdot
热度 0.95
最近更新 2026-08-15 02:41:36

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add tomekdot/pyplanet
兼容性
通用兼容
联网要求
需要联网
数据出网
数据不出本机
Metadata
name
pyplanet
description
PyPlanet plugin development, GitHub installer, and Clan Spirits plugin
version
2.0.0
metadata
{"hermes":{"tags":["pyplanet","maniaplanet","plugin","github","installer","clan-spirits","scoring","template"]}}

🎮 PyPlanet Skills

Complete PyPlanet plugin ecosystem: starter template, GitHub installer, and Clan Wars plugin.

📋 Contents

  1. Hello World — starter template
  2. GitHub Installer — install plugins from GitHub
  3. Clan Spirits — competitive clan scoring

🚀 Hello World

Minimal starter template for PyPlanet plugins.

When to Use

  • Learning PyPlanet plugin structure
  • Starting a new plugin
  • Understanding AppConfig basics

Quick Start

Option 1: Install via GitHub Installer

/ghinstall tomekdot/pyplanet-hello-world

Option 2: Manual Install

  1. Download from https://github.com/tomekdot/pyplanet-hello-world
  2. Place hello_world/ in apps/
  3. Add 'apps.hello_world' to APPS['default'] in settings/apps.py
  4. Restart PyPlanet

Template Code

from pyplanet.apps.config import AppConfig

class MyPlugin(AppConfig):
    name = 'my_plugin'

    async def on_start(self):
        await super().on_start()
        await self.instance.chat('✅ My plugin started!')

    async def on_stop(self):
        await super().on_stop()
        await self.instance.chat('🛑 My plugin stopped!')

📦 GitHub Installer

Install PyPlanet plugins directly from GitHub with one command.

When to Use

  • Installing plugins without manual downloads
  • Managing multiple plugins
  • Updating plugins easily

Commands

Command Description
/ghinstall <user>/<repo> Install from GitHub (tries main then master)
/ghinstall <url.zip> Install from direct zip URL
/ghlist List all GitHub-installed plugins
/ghremove <name> Remove a plugin
/ghupdate <name> Update a plugin

Installation

  1. Create apps/github_installer/__init__.py:
from .app import GitHubInstaller
  1. Create apps/github_installer/app.py (source: github_installer/app.py)

  2. Register in settings/apps.py:

'apps.github_installer',
  1. Restart PyPlanet

🏆 Clan Spirits

Competitive clan/team scoring based on local record positions.

When to Use

  • Setting up clan competitions
  • Tracking clan points
  • Managing clan members

Commands

Command Description
/joinclan <name> Join (or create) a clan
/leaveclan Leave current clan
/myclan Show your clan + total points
/clans Show clan standings
/clanswin Open standings window
/clanmembers [name] List members of a clan
/clanwexport [format] Export standings (csv/json)
/clanw_reset confirm=yes Reset all scoring data (admin)
/clanw_recalc Recalculate points (admin)

Installation

Option 1: GitHub Installer (recommended)

/ghinstall tomekdot/pyplanet-clanspirits

Option 2: Manual Install

  1. Clone from https://github.com/tomekdot/pyplanet-clanspirits
  2. Place clanwars/ in apps/
  3. Add 'apps.clanwars' to APPS['default']
  4. Restart PyPlanet

Data Model

Clan(id, name)
PlayerClan(player_id, clan_id)
PlayerClanMapScore(map_id, player_id, clan_id, points)
ClanAggregateScore(clan_id, points)

🚨 Requirements

  • PyPlanet >= 0.11
  • Python 3.8+
  • local_records app (for Clan Wars)

📚 Sources

📄 See references/original-skills.md for original skill metadata and source details.

📝 License

MIT