misticos
Change workshop skins of items easily

Supported Games

This plugin will allow players to change skin for items in easiest way. Just type skin command, move item to container and move back with skin.

WARNING! READ FIRST

  • Stack Extended may break the plugin. For example, when you have custom stack on item that is used by Skins.
  • Plugin only sends a number of the skin to the client. If your client doesn't load skins but items appear, that means that it's client (your) issue.

Permissions

  • skins.use - Permission for basic plugin usage. (Opening the box to change skins)
  • skins.admin - Permission for advanced admin-only plugin usage. (Add or remove skins)

Commands

  • skin - Main and the only command of the plugin. Can be changed in configuration. Syntax:
skin show - Show skins
skin get - Get Skin ID of the item
skin remove (Shortname) (Skin ID) - Remove a skin
skin add (Shortname) (Skin ID) - Add a skin

Configuration

Default Configuration

{
  "Command": "skin",
  "Skins": [
    {
      "Item Shortname": "shortname",
      "Skins": [
        0
      ]
    }
  ],
  "Container Panel Name": "generic",
  "Container Capacity": 36,
  "UI": {
    "Background Color": "0.18 0.28 0.36",
    "Background Anchors": {
      "Anchor Min X": "1.0",
      "Anchor Min Y": "1.0",
      "Anchor Max X": "1.0",
      "Anchor Max Y": "1.0"
    },
    "Background Offsets": {
      "Offset Min X": "-300",
      "Offset Min Y": "-100",
      "Offset Max X": "0",
      "Offset Max Y": "0"
    },
    "Left Button Text": "<size=36><</size>",
    "Left Button Color": "0.11 0.51 0.83",
    "Left Button Anchors": {
      "Anchor Min X": "0.025",
      "Anchor Min Y": "0.05",
      "Anchor Max X": "0.325",
      "Anchor Max Y": "0.95"
    },
    "Center Button Text": "<size=36>Page: {page}</size>",
    "Center Button Color": "0.11 0.51 0.83",
    "Center Button Anchors": {
      "Anchor Min X": "0.350",
      "Anchor Min Y": "0.05",
      "Anchor Max X": "0.650",
      "Anchor Max Y": "0.95"
    },
    "Right Button Text": "<size=36>></size>",
    "Right Button Color": "0.11 0.51 0.83",
    "Right Button Anchors": {
      "Anchor Min X": "0.675",
      "Anchor Min Y": "0.05",
      "Anchor Max X": "0.975",
      "Anchor Max Y": "0.95"
    }
  },
  "Debug": false
}

Language

English

{
  "Not Allowed": "You don't have permission to use this command",
  "Cannot Use": "I'm sorry, you cannot use that right now",
  "Help": "Command usage:\nskin show - Show skins\nskin get - Get Skin ID of the item",
  "Admin Help": "Admin command usage:\nskin show - Show skins\nskin get - Get Skin ID of the item\nskin remove (Shortname) (Skin ID) - Remove a skin\nskin add (Shortname) (Skin ID) - Add a skin",
  "Skin Get Format": "{shortname}'s skin: {id}",
  "Skin Get No Item": "Please, hold the needed item",
  "Incorrect Skin": "You have entered an incorrect skin",
  "Skin Already Exists": "This skin already exists on this item",
  "Skin Does Not Exist": "This skin does not exist",
  "Skin Added": "Skin was successfully added",
  "Skin Removed": "Skin was removed"
}

For Developers

Hooks

// Called when player tries to open skins menu. Return boolean to override, null to leave it default.
private object CanUseSkins(string playerId)

API

// Call to close the skin box if opened
private void SkinsClose(BasePlayer player)

Additional comments

In case you want to close skinbox and deny opening it, first close the box with API call. Only then return false in CanUseSkins, because if you close the box AFTER you start returning false in CanUseSkins, you can achieve unstable behaviour.

    MIT License


    Copyright (c) 2018-2019 misticos


    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:


    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.


    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.


    Download

    8.7K downloads
    234 watchers

    skinscustomitems