Skip to content

biyachuev/CoordinatesDisplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoordinatesDisplay

A lightweight Minecraft plugin that displays player coordinates in real-time using either ActionBar or Scoreboard.

Features

  • Multiple Display Modes:

    • ActionBar: Shows coordinates above the hotbar (non-intrusive)
    • Scoreboard: Displays coordinates in the sidebar
    • Off: Disable coordinate display
  • Rich Information Display:

    • X, Y, Z coordinates (floor values)
    • Cardinal direction (N, NE, E, SE, S, SW, W, NW)
    • In-game time (24-hour format)
  • Per-Player Settings: Each player can choose their preferred display mode

  • Real-time Updates: Coordinates update every 0.5 seconds (10 ticks)

Requirements

  • Spigot/Paper 1.20.1 or higher
  • Java 17 or higher

Installation

  1. Download the latest CoordinatesDisplay-1.0.1.jar from releases
  2. Place the JAR file in your server's plugins/ folder
  3. Restart your server
  4. Configure player preferences using commands

Commands

Command Aliases Description
/coords /coordinates, /coord Show help menu
/coords actionbar /coords ab Enable ActionBar display mode
/coords scoreboard /coords sb Enable Scoreboard display mode
/coords off - Disable coordinate display

Permissions

Currently, all commands are available to all players. Permission system can be added in future versions if needed.

Configuration

No configuration file is needed. All settings are managed per-player through commands.

Display Examples

ActionBar Mode

XYZ: 245 / 64 / -892 [N] / 14:32

Scoreboard Mode

x = 245
y = 64
z = -892
[N] / 14:32

Technical Details

Project Structure

src/main/java/com/example/coordinates/
├── CoordinatesPlugin.java      # Main plugin class
├── CoordinatesDisplay.java     # Core display logic
└── CoordinatesCommand.java     # Command handler

Key Classes

  • CoordinatesPlugin: Plugin entry point, handles initialization and shutdown
  • CoordinatesDisplay: Manages coordinate display logic, player modes, and scheduled updates
  • CoordinatesCommand: Processes player commands and mode switches

Direction Calculation

The plugin calculates cardinal directions based on player yaw angle:

  • North (N): 157.5° - 202.5°
  • Northeast (NE): 202.5° - 247.5°
  • East (E): 247.5° - 292.5°
  • Southeast (SE): 292.5° - 337.5°
  • South (S): 337.5° - 22.5°
  • Southwest (SW): 22.5° - 67.5°
  • West (W): 67.5° - 112.5°
  • Northwest (NW): 112.5° - 157.5°

Time Calculation

In-game time is converted from world ticks (0-24000) to 24-hour format:

  • Minecraft time starts at 6:00 AM (tick 0)
  • Each hour = 1000 ticks
  • Minutes are interpolated proportionally

Building from Source

Prerequisites

  • JDK 17 or higher
  • Maven 3.6+

Build Steps

# Clone the repository
git clone <repository-url>
cd CoordinatesDisplay

# Build with Maven
mvn clean package

# The compiled JAR will be in target/CoordinatesDisplay-1.0.1.jar

Development

Adding New Features

  1. Coordinate display is handled in CoordinatesDisplay.java
  2. Commands are processed in CoordinatesCommand.java
  3. The scheduled task runs every 10 ticks (line 56 in CoordinatesDisplay.java)

Modifying Update Frequency

To change the update frequency, modify line 56 in CoordinatesDisplay.java:

task.runTaskTimer(plugin, 0L, 10L); // Change 10L to desired tick interval

Known Issues

  • Scoreboard mode may conflict with other plugins using scoreboards
  • Player preferences are not persisted between server restarts

Future Enhancements

  • Config file for default settings
  • Persistent player preferences (database or file storage)
  • Permission system integration
  • Customizable coordinate format
  • Biome display
  • Configurable update interval
  • Support for different color schemes

License

This project is provided as-is for educational and server use.

Support

For bug reports and feature requests, please contact the plugin author or create an issue in the project repository.

Author

YourName

Version History

  • 1.0.1 - Current release

    • Multiple display modes (ActionBar/Scoreboard)
    • Real-time coordinate updates
    • Direction and time display
  • 1.0.0 - Initial release

About

Minecraft plugin that displays player coordinates in ActionBar or Scoreboard with configurable conflict prevention

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages