Skip to content

A simple plugin created for people who want to generate an interactive map of sectors from minecraft server.

License

Notifications You must be signed in to change notification settings

oski646/sectors-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sectors generator

A simple plugin created for people who want to generate an interactive map of sectors.

Wersja polska: tutaj

Download

sectors.js

Sector object

name String (required)
corners [{ x: Number, y: Number }, { x: Number, y: Number }] (required)
color HEX/RGB (required)
tps Number (optional)
online Number (optional)
text { offsetX: Number, offsetY: Number } (optional)

Example

{
    name: "S1",
    corners: [{ x: -1500, y: -1500 }, { x: -225, y: 150 }],
    color: 'rgba(0, 0, 0, 0.75)',
    tps: 19.98,
    online: 152,
    text: {
        offsetX: -19,
        offsetY: 4
    }
}

Configuration

canvasID String (required)
mapBorder Number (required)
highlightColor HEX/RGB (required)
tps Number (optional)
online Number (optional)
text { offsetX: Number, offsetY: Number } (optional)

Example

{
    canvasID: "sectors",
    mapBorder: 3000,
    highlightColor: 'rgba(255, 255, 255, 0.25)',
}

Initialization

initSectors(sectors, callback, config);

sectors - list with sectors objects
callback - callback function with event, sector and coordinates
config - configuration

Live example

Here you can test how plugin works. https://oski646.github.io/sectors-generator/

About

A simple plugin created for people who want to generate an interactive map of sectors from minecraft server.

Topics

Resources

License

Stars

Watchers

Forks