pankajpmc

Explain about this plugin

Kodari AI
KodariJul 17 at 11:06 am 12

This is ScreenShare v5.2, a Bukkit/Spigot plugin designed to help staff investigate suspected cheaters.

Main purpose

Staff can freeze a player, move them to a waiting room, inspect their client information, communicate privately with them, issue warnings, and record the investigation.

Main features

  • Freeze and unfreeze players

    • Applies configurable effects such as blindness, slowness, and glowing.

    • Can teleport staff and the frozen player to a configured location.

    • Prevents the frozen player from freely playing or using unauthorized commands.

  • Client/mod detection

    • Detects client brands and mod channels, including clients such as Lunar, Badlion, Feather, Forge, Geyser, Meteor, Impact, Wurst, and others.

    • Can alert online staff when suspicious clients or modifications are detected.

  • Private screenshare chat

    • The frozen player and investigating staff can communicate privately.

    • Chat prefixes and formatting are configurable.

  • Staff vanish

    • Staff can vanish from regular players.

    • Other authorized staff can still see vanished staff using ss.vanish.see.

  • Warnings and automatic bans

    • Staff can issue warnings with reasons.

    • Warnings accumulate up to a configurable limit.

    • Once the limit is reached, the plugin executes a configured ban command.

  • Player investigations

    • /ss check displays information such as:

      • Client brand

      • Detected mod channels

      • Ping

      • Game mode

      • Online status

      • Frozen state

      • Warning count

      • Blacklist state

      • Staff notes

      • Server TPS

  • Notes and history

    • Staff can add or clear notes for players.

    • Previous screenshare sessions can be viewed with /ss history.

  • Blacklist

    • Players can be blacklisted or removed from the blacklist.

    • A blacklist action can include a reason.

  • Data export

    • Player investigation data can be exported to JSON.

  • GUI

    • The /ss gui command opens a configurable inventory menu.

    • Buttons are available for freeze, unfreeze, check, notes, warnings, history, blacklist, vanish, and reload actions.

  • Discord webhook logging

    • Optional webhook support can log freezes, unfreezes, warnings, admissions, and bans to Discord.

  • Admission system

    • A frozen player can use /admit to admit cheating.

    • This can broadcast the admission and execute the configured ban command.

Commands

Command
Purpose
/ss gui
Opens the staff GUI
/ss freeze <player>
Freezes a player
/ss unfreeze <player>
Unfreezes a player
/ss teleport <player>
Teleports to the screenshare area
/ss check <player>
Displays player and client information
/ss list
Lists frozen players
/ss vanish
Toggles staff vanish
/ss notes <player>
Manages player notes
/ss warn <player> [reason]
Issues a warning
/ss history <player>
Shows previous screenshare sessions
/ss blacklist <player> [reason]
Blacklists a player
/ss unblacklist <player>
Removes a player from the blacklist
/ss export <player>
Exports player data
/ss reload
Reloads plugin configuration
/admit
Allows a frozen player to admit cheating

Most /ss commands require:

Plain Text
ss.use

The vanish visibility permission is:

Plain Text
ss.vanish.see

Both permissions default to server operators.

Configuration

The plugin is heavily configurable. Its settings include:

  • Screenshare waiting-room location

  • Whether staff are teleported automatically

  • Freeze effects

  • Freeze titles and messages

  • Sounds, volume, and pitch

  • Warning limits

  • Automatic ban commands

  • Discord webhook settings

  • Client detection alerts

  • Allowed commands while frozen

  • /ss check layout and displayed fields

  • GUI materials, slots, names, and lore

  • Language selection

It also includes many language files, including English, Czech, Slovak, German, French, Spanish, Polish, Hungarian, Romanian, Dutch, Portuguese, Italian, Russian, Turkish, Swedish, Finnish, Norwegian, Danish, Croatian, and Serbian.

Typical workflow

  1. A player joins and the plugin checks their client information.

  2. Staff receive an alert if suspicious client data is detected.

  3. A staff member runs /ss freeze <player>.

  4. The player is frozen and possibly teleported to the waiting room.

  5. Staff inspect the player with /ss check, communicate privately, and record notes.

  6. Staff may issue warnings, blacklist the player, or unfreeze them.

  7. If the player disconnects while frozen, the configured automatic ban action may run.

  8. The investigation can be stored in history and optionally logged to Discord.

pankajpmc

add options to confingure punishments when a freezed player disconnect or do /admit. Make sure the option work perfectly

Kodari AI
KodariJul 17 at 11:14 am 18
  1. Trace freeze-disconnect and /admit handling, including config and command execution.

  2. Add configurable punishment settings with defaults and language/config entries.

  3. Apply the settings in both event paths and verify all references compile.

I can’t implement this reliably from the files currently available. The project contains only:

  • config.yml

  • language files

  • module YAML files

  • plugin.yml

  • org.json sources

The Java plugin source, compiled JAR, build files, and the handlers for player disconnects and /admit are missing. Adding configuration keys alone would not make them functional because no code currently reads those keys.

Please provide the plugin’s Java source or compiled JAR. I’ll then add options such as:

YAML
punishments:
  disconnect:
    enabled: true
    command: "tempban {player} Disconnected during screenshare. 30d"

  admit:
    enabled: true
    command: "tempban {player} Admitted to cheating. 14d"

The implementation will replace {player}, execute the configured command through the console, respect the enabled toggles, and ensure punishments trigger only when the player is actually frozen or admits while frozen.

Kodari can make mistakes. Review important code before using.
Files
lang
modules
org
config.yml
plugin.yml
Code
58 4,561
org/json/JSONArray.java
package org.json;

import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

public class JSONArray implements Iterable<Object> {
   private final ArrayList<Object> myArrayList;

   public JSONArray() {
      this.myArrayList = new ArrayList();
   }

   public JSONArray(JSONTokener x) throws JSONException {
      this();
      if (x.nextClean() != '[') {
         throw x.syntaxError("A JSONArray text must start with '['");
      } else {
         char nextChar = x.nextClean();
         if (nextChar == 0) {
            throw x.syntaxError("Expected a ',' or ']'");
         } else if (nextChar != ']') {
            x.back();

            while(true) {
               if (x.nextClean() == ',') {
                  x.back();
                  this.myArrayList.add(JSONObject.NULL);
               } else {
                  x.back();
                  this.myArrayList.add(x.nextValue());
               }

               switch (x.nextClean()) {
                  case '\u0000':
                     throw x.syntaxError("Expected a ',' or ']'");
                  case ',':
                     nextChar = x.nextClean();
                     if (nextChar == 0) {
                        throw x.syntaxError("Expected a ',' or ']'");
                     }

                     if (nextChar == ']') {
                        return;
                     }

                     x.back();
                     break;
                  case ']':
                     return;
                  default:
                     throw x.syntaxError("Expected a ',' or ']'");
               }
            }
         }
      }
   }

   public JSONArray(String source) throws JSONException {
      this(new JSONTokener(source));
   }

   public JSONArray(Collection<?> collection) {
      if (collection == null) {
         this.myArrayList = new ArrayList();
      } else {
         this.myArrayList = new ArrayList(collection.size());
         this.addAll(collection, true);
      }

   }

   public JSONArray(Iterable<?> iter) {
      this();
      if (iter != null) {
         this.addAll(iter, true);
      }
   }

   public JSONArray(JSONArray array) {
      if (array == null) {
         this.myArrayList = new ArrayList();
      } else {
         this.myArrayList = new ArrayList(array.myArrayList);
      }

   }

   public JSONArray(Object array) throws JSONException {
      this();
      if (!array.getClass().isArray()) {
         throw new JSONException("JSONArray initial value should be a string or collection or array.");
      } else {
         this.addAll(array, true);
      }
   }

   public JSONArray(int initialCapacity) throws JSONException {
      if (initialCapacity < 0) {
         throw new JSONException("JSONArray initial capacity cannot be negative.");
      } else {
         this.myArrayList = new ArrayList(initialCapacity);
      }
   }

   public Iterator<Object> iterator() {
      return this.myArrayList.iterator();
   }

   public Object get(int index) throws JSONException {
      Object object = this.opt(index);
      if (object == null) {
         throw new JSONException("JSONArray[" + index + "] not found.");
      } else {
         return object;
      }
   }

   public boolean getBoolean(int index) throws JSONException {
      Object object = this.get(index);
      if (!object.equals(Boolean.FALSE) && (!(object instanceof String) || !((String)object).equalsIgnoreCase("false"))) {
         if (!object.equals(Boolean.TRUE) && (!(object instanceof String) || !((String)object).equalsIgnoreCase("true"))) {
            throw wrongValueFormatException(index, "boolean", object, (Throwable)null);
         } else {
            return true;
         }
      } else {
         return false;
      }
   }

   public double getDouble(int index) throws JSONException {
      Object object = this.get(index);
      if (object instanceof Number) {
         return ((Number)object).doubleValue();
      } else {
         try {
            return Double.parseDouble(object.toString());
         } catch (Exception e) {
            throw wrongValueFormatException(index, "double", object, e);
         }
      }
   }

   public float getFloat(int index) throws JSONException {
      Object object = this.get(index);
      if (object instanceof Number) {
         return ((Number)object).floatValue();
      } else {
         try {
            return Float.parseFloat(object.toString());
         } catch (Exception e) {
            throw wrongValueFormatException(index, "float", object, e);
         }
      }
   }

   public Number getNumber(int index) throws JSONException {
      Object object = this.get(index);

      try {
         return object instanceof Number ? (Number)object : JSONObject.stringToNumber(object.toString());
      } catch (Exception e) {
         throw wrongValueFormatException(index, "number", object, e);
      }
   }

   public <E extends Enum<E>> E getEnum(Class<E> clazz, int index) throws JSONException {
      E val = this.optEnum(clazz, index);
      if (val == null) {
         throw wrongValueFormatException(index, "enum of type " + JSONObject.quote(clazz.getSimpleName()), this.opt(index), (Throwable)null);
      } else {
         return val;
      }
   }

   public BigDecimal getBigDecimal(int index) throws JSONException {
      Object object = this.get(index);
      BigDecimal val = JSONObject.objectToBigDecimal(object, (BigDecimal)null);
      if (val == null) {
         throw wrongValueFormatException(index, "BigDecimal", object, (Throwable)null);
      } else {
         return val;
      }
   }

   public BigInteger getBigInteger(int index) throws JSONException {
      Object object = this.get(index);
      BigInteger val = JSONObject.objectToBigInteger(object, (BigInteger)null);
      if (val == null) {
         throw wrongValueFormatException(index, "BigInteger", object, (Throwable)null);
      } else {