Back to Plugins
skupabase icon

skupabase

Active tab
Overview
Latest version
Not specified
Minecraft support
0 versions
Topics synced
0
Claim this plugin

This plugin was imported from Spiget and is currently unclaimed.

Live badges: Downloads badge for skupabase Spigot Downloads badge for skupabase GitHub Stars badge for skupabase License badge for skupabase How to embed →

Plugin Information

Type: Minecraft plugin
Spigot Resource: Open on SpigotMC
Repository: oKidd/skupabase
Created by: Spiget Importer

Description

Skupabase

A Skript addon for running SQL queries against Supabase/Postgres from Minecraft.

Installation

  1. Copy skupabase-0.1.0.jar into your server's plugins/ folder.
  2. Install Skript.
  3. Start the server once.
  4. Configure plugins/Skupabase/config.yml.
  5. Restart the server.

Supabase setup

Step 1

Click the green Connect button.

Step 2

Select:

  • Direct: Connection String
  • Connection Method: Session pooler
  • Type: JDBC

Step 3

Scroll down to Connection string and copy it.

  • Avoid copying a URL that already includes the password.
  • If you do not know the database password, use Reset password.

Step 4

Fill in plugins/Skupabase/config.yml.

Example:

jdbc-url: "jdbc:postgresql://aws-1-sa-east-1.pooler.supabase.com:5432/postgres?user=postgres.jftqytycpvjjcjacojyd"
username: "postgres.jftqytycpvjjcjacojyd"
password: "your_password"
connect-timeout-seconds: 10
query-timeout-seconds: 30
max-result-rows: 500

Usage

Run a query

set {_id} to supabase query "select * from public.players"

Check status

send "%supabase query status {_id}%"

Read the result

send "%supabase query result {_id}%"

Run without keeping the ID

run supabase query "update public.players set coins = coins + 10 where uuid = '...'"

Mini tutorial

Create table

command /create_table:
    trigger:
        set {_id} to supabase query "create table if not exists public.skupabase_test (id bigint generated by default as identity primary key, player_uuid text not null, player_name text not null, created_at timestamptz not null default now())"
        wait 20 ticks
        send "%supabase query status {_id}%"
        send "%supabase query result {_id}%"

Insert

command /insert:
    trigger:
        set {_id} to supabase query "insert into public.skupabase_test (player_uuid, player_name) values ('%uuid of player%', '%player%')"
        wait 20 ticks
        send "%supabase query status {_id}%"
        send "%supabase query result {_id}%"

Select

command /select:
    trigger:
        set {_id} to supabase query "select * from public.skupabase_test where player_uuid = '%uuid of player%' order by id desc limit 1"
        wait 20 ticks
        send "%supabase query status {_id}%"
        send "%supabase query result {_id}%"

Update

command /update:
    trigger:
        set {_id} to supabase query "update public.skupabase_test set player_name = '%player%_edited' where player_uuid = '%uuid of player%'"
        wait 20 ticks
        send "%supabase query status {_id}%"
        send "%supabase query result {_id}%"

Delete

command /delete:
    trigger:
        set {_id} to supabase query "delete from public.skupabase_test where player_uuid = '%uuid of player%'"
        wait 20 ticks
        send "%supabase query status {_id}%"
        send "%supabase query result {_id}%"

Minecraft Plugin Badges

Use these badge images in docs, README files, or forum posts.

Badge Guide
Downloads
Downloads badge for skupabase
![Downloads](https://ezbanners.org/shields/plugins/5c535190-afec-45a4-b028-9d4d85506e31/downloads.png)
Spigot Downloads
Spigot Downloads badge for skupabase
![Spigot Downloads](https://ezbanners.org/shields/plugins/5c535190-afec-45a4-b028-9d4d85506e31/spigot-downloads.png)
GitHub Stars
GitHub Stars badge for skupabase
![GitHub Stars](https://ezbanners.org/shields/plugins/5c535190-afec-45a4-b028-9d4d85506e31/github-stars.png)
License
License badge for skupabase
![License](https://ezbanners.org/shields/plugins/5c535190-afec-45a4-b028-9d4d85506e31/license.png)