Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

A plugin demonstrating one possible solution for thread safety

License

Notifications You must be signed in to change notification settings

SagaciousZed/SampleLocalChat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SampleLocalChat

This is a sample plug-in for the Bukkit API. It requires a CraftBukkit server. Bukkit can be found at http://bukkit.org

The goal of this sample plug-in is to demonstrate the work necessary for thread safety. This plugin has a main class named SampleLocalChat, one CommandExecutor named SampleLocalChatCommandExectuor, one Listener named SampleLocalChatListener, one Runnable SampleLocalChatLocationSyncTask, and one utility class ImmutableLocation.

This plug-in provides the ability for a login message to be sent to players connecting. A player with the "samplelocalchat.set" permission can set if local chat is enforced. Ops by default have this permission.

Commands

This plugin has one command: setLocalChat takes a argument which is a boolean string. true will set it to true, all other strings will set set enabled to false. This change is only temporary, and will returned to configured value when disabled and enabled.

Configuration

There are two configuration options: localchat.enabled and localchat.localrage.

  • localchat.enabled is the default value on startup.
  • localchat.localrange is the distance squared that chat can be read.

Compilation

This plugin has a Maven 3 pom.xml and uses Maven to compile. Dependencies are therefore managed by Maven. You should be able to build it with Maven by running

mvn package

a jar will be generated in the target folder. For those unfa1milliar with Maven it is a build system, see http://maven.apache.org/ for more information.

About

A plugin demonstrating one possible solution for thread safety

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages