Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
Avatar for LinuxAddict

LnxaGeoRestrict is a plugin that restricts players from joining a Minecraft server based on their geographic location.

Report GeoRestrict?

This plugin uses https://ipinfo.io/.

IPinfo's free tier provides 50,000 requests per month, which should be sufficient since this plugin stores players' IP information to reduce requests.

Configuration

# API Key for IPInfo (Required)
api-key: ""

# Global Settings
# When enabled, players using VPNs or proxies will be denied access
anti-vpn: true
# Logging verbosity level (0-3, with 3 being most verbose)
log-level: 2

# Filtering Options
# Modes: whitelist (only allow listed), blacklist (block listed)

# Country Filtering
country-mode: blacklist
allowed-countries:
  - LV
  - US
  - LT
  - DE
  - AT
blocked-countries:
  - RU
  - CN
  - IR

# IP Filtering
ip-mode: blacklist
ip-whitelist:
  - 192.168.1.1
  - 10.0.0.1
ip-blacklist:
  - 8.8.8.8

# ISP Filtering
isp-mode: blacklist
isp-whitelist:
  - 'Local ISP'
  - 'Trusted Provider'
isp-blacklist:
  - 'Known Proxy Provider'
  - 'Suspicious Hosting'

# City Filtering
city-mode: disabled
allowed-cities:
  - 'New York'
  - 'London'
blocked-cities:
  - 'Moscow'
  - 'Beijing'

# Advanced IP Range Blocking
ip-range-blacklist:
  - '192.168.0.0/16'
  - '10.0.0.0/8'

# Punishment Settings
# Define the action to take when a player is blocked
# Available actions: kick, ban, warn
# You can configure a different action for each type of restriction
actions:
  country-block: kick
  vpn-block: ban
  isp-block: warn #Implement a warn feature (sending a message to the player)
  ip-block: kick
  city-block: kick
# Ban duration in minutes (0 for permanent ban)
punishment:
  duration: 0

# Discord Webhook Settings
# Discord Webhook URLs - Supports multiple webhooks!
# Each entry should be on a new line, starting with '-'
discord-webhook-urls:
  - ""
# Discord Notification Settings
discord-notifications:
  player-join: false
  player-punish: true
  config-reload: true
  error: true
# Embed Settings
discord-embed:
  title: "LnxaGeoRestrict Notification"
  color: "7506394" # Integer representation of the color

# Custom Messages
messages:
  blocked: '&c[LnxaGeoRestrict] Access denied based on location restrictions.'
  vpn-detected: '&c[LnxaGeoRestrict] VPN/Proxy detected. Access denied.'
  ip-blocked: '&c[LnxaGeoRestrict] Your IP address is not allowed.'
  isp-blocked: '&c[LnxaGeoRestrict] Your ISP is not permitted to access this server.'
  error: '&c[LnxaGeoRestrict] Error verifying your location. Please try again later.'
  warn: '&e[LnxaGeoRestrict] You have been warned due to a geo-restriction. Please check your connection.'

Information

CategoryAdmin Tools
Published onMarch 27, 2025
LicenseGPL
Downloads20
Stars0
Watchers0

Pinned Versions

Members