Merge dynmap-api into common dynmap

This commit is contained in:
Mike Primm 2018-08-11 23:42:08 -05:00
parent d2a0f65173
commit f66e63fe45
18 changed files with 260 additions and 53 deletions

View File

@ -1,36 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"> <classpathentry kind="src" output="bin/main" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="gradle_scope" value="main"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="gradle_used_by_scope" value="main,test"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> <classpathentry kind="src" output="bin/main" path="src/main/resources">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> <classpathentry kind="src" output="bin/test" path="src/test/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="gradle_scope" value="test"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="gradle_used_by_scope" value="test"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"> <classpathentry kind="src" output="bin/test" path="src/test/resources">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<attributes> <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<attribute name="maven.pomderived" value="true"/> <classpathentry kind="output" path="bin/default"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<projectDescription> <projectDescription>
<name>helper113</name> <name>bukkit-helper-113</name>
<comment></comment> <comment></comment>
<projects> <projects>
</projects> </projects>
@ -10,6 +10,11 @@
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name> <name>org.eclipse.m2e.core.maven2Builder</name>
<arguments> <arguments>
@ -19,5 +24,6 @@
<natures> <natures>
<nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature> <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures> </natures>
</projectDescription> </projectDescription>

View File

@ -0,0 +1,2 @@
connection.project.dir=..
eclipse.preferences.version=1

View File

@ -1,5 +1,5 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5 org.eclipse.jdt.core.compiler.source=1.8

View File

@ -1,36 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"> <classpathentry kind="src" output="bin/main" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="gradle_scope" value="main"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="gradle_used_by_scope" value="main,test"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> <classpathentry kind="src" output="bin/main" path="src/main/resources">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> <classpathentry kind="src" output="bin/test" path="src/test/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="gradle_scope" value="test"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="gradle_used_by_scope" value="test"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"> <classpathentry kind="src" output="bin/test" path="src/test/resources">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<attributes> <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<attribute name="maven.pomderived" value="true"/> <classpathentry kind="output" path="bin/default"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<projectDescription> <projectDescription>
<name>helper</name> <name>bukkit-helper</name>
<comment></comment> <comment></comment>
<projects> <projects>
</projects> </projects>
@ -10,6 +10,11 @@
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand> <buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name> <name>org.eclipse.m2e.core.maven2Builder</name>
<arguments> <arguments>
@ -19,5 +24,6 @@
<natures> <natures>
<nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature> <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures> </natures>
</projectDescription> </projectDescription>

View File

@ -0,0 +1,2 @@
connection.project.dir=..
eclipse.preferences.version=1

View File

@ -1,5 +1,5 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5 org.eclipse.jdt.core.compiler.source=1.8

18
bukkit/.classpath Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="bin/main" path="src/main/java">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/main" path="src/main/resources">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>

23
bukkit/.project Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>dynmap</name>
<comment>Project dynmap created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,2 @@
connection.project.dir=..
eclipse.preferences.version=1

View File

@ -4,7 +4,7 @@ description = 'dynmap'
dependencies { dependencies {
compile group: 'org.bukkit', name: 'bukkit', version:'1.7.10-R0.1-SNAPSHOT' compile group: 'org.bukkit', name: 'bukkit', version:'1.7.10-R0.1-SNAPSHOT'
compile 'com.nijikokun.bukkit:Permissions:3.1.6' compile 'com.nijikokun.bukkit:Permissions:3.1.6'
compile "us.dynmap:dynmap-api:${project.version}" compile project(":dynmap-api")
compile "us.dynmap:DynmapCore:${project.version}" compile "us.dynmap:DynmapCore:${project.version}"
compile group: 'ru.tehkode', name: 'PermissionsEx', version:'1.19.1' compile group: 'ru.tehkode', name: 'PermissionsEx', version:'1.19.1'
compile group: 'de.bananaco', name: 'bPermissions', version:'2.9.1' compile group: 'de.bananaco', name: 'bPermissions', version:'2.9.1'
@ -38,7 +38,7 @@ jar {
shadowJar { shadowJar {
dependencies { dependencies {
include(dependency('org.bstats::')) include(dependency('org.bstats::'))
include(dependency('us.dynmap:dynmap-api:')) include(dependency(':dynmap-api'))
include(dependency('us.dynmap:DynmapCore:')) include(dependency('us.dynmap:DynmapCore:'))
include(dependency(':bukkit-helper')) include(dependency(':bukkit-helper'))
include(dependency(':bukkit-helper-113')) include(dependency(':bukkit-helper-113'))

1
dynmap-api/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build/

23
dynmap-api/build.gradle Normal file
View File

@ -0,0 +1,23 @@
description = "dynmap-api"
dependencies {
compile group: 'org.bukkit', name: 'bukkit', version:'1.7.10-R0.1-SNAPSHOT'
compile "us.dynmap:DynmapCoreAPI:${project.version}"
}
jar {
classifier = 'unshaded'
}
shadowJar {
dependencies {
include(dependency("us.dynmap:DynmapCoreAPI:"))
}
destinationDir = file '../target'
classifier = ''
}
artifacts {
archives shadowJar
}

View File

@ -0,0 +1,16 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>bin</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>zip</format>
</formats>
<fileSets>
</fileSets>
<files>
<file>
<source>${project.build.directory}/${artifactId}-${version}.jar</source>
<outputDirectory>/</outputDirectory>
<destName>dynmap-api.jar</destName>
</file>
</files>
</assembly>

View File

@ -0,0 +1,67 @@
package org.dynmap;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
/**
* This is the interface representing the published API for the Dynmap plugin for Bukkit. Public methods of the
* DynmapPlugin class that are not defined in this interface are subject to change without notice, so
* be careful with forming dependencies beyond these. Plugins accessing dynmap 0.24 or later should
* do so by casting the Plugin to this interface.
*
* This interface is Bukkit specific.
*/
public interface DynmapAPI extends DynmapCommonAPI {
/**
* Trigger update on tiles associated with given locations. If two locations provided,
* the volume is the rectangular prism ("cuboid") with the two locations on opposite corners.
*
* @param l0 - first location (required)
* @param l1 - second location (if null, only single point invalidated (l0))
* @return number of tiles queued to be rerendered (@deprecated return value - just returns 1)
*/
public int triggerRenderOfVolume(Location l0, Location l1);
/**
* Set player visibility
* @param player - player
* @param is_visible - true if visible, false if hidden
*/
public void setPlayerVisiblity(Player player, boolean is_visible);
/**
* Test if player is visible
* @return true if visible, false if not
*/
public boolean getPlayerVisbility(Player player);
/**
* Post message from player to web
* @param player - player
* @param message - message text
*/
public void postPlayerMessageToWeb(Player player, String message);
/**
* Post join/quit message for player to web
* @param player - player
* @param isjoin - if true, join message; if false, quit message
*/
public void postPlayerJoinQuitToWeb(Player player, boolean isjoin);
/**
* Get version of dynmap plugin
* @return version - format is "major.minor-build" or "major.minor.patch-build"
*/
public String getDynmapVersion();
/**
* Set player visibility (transient - if player is configured to be visible, they are hidden if one or more plugins assert their invisiblity)
* @param player - player ID
* @param is_invisible - true if asserting player should be invisible, false if no assertion
* @param plugin - asserting plugin
*/
public void assertPlayerInvisibility(Player player, boolean is_invisible, Plugin plugin);
/**
* Set player visibility (transient - if player is configured to be hidden, they are made visibile if one or more plugins assert their visibility))
* @param player - player
* @param is_visible - true if asserting that hidden player should be visible, false if no assertion
* @param plugin - asserting plugin
*/
public void assertPlayerVisibility(Player player, boolean is_visible, Plugin plugin);
}

View File

@ -0,0 +1,51 @@
package org.dynmap;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* Custom Bukkit event, corresponding to the receiving of a web-chat message from a web UI user
*
* This interface is Bukkit specific.
*/
public class DynmapWebChatEvent extends Event implements Cancellable {
public static final String CUSTOM_TYPE = "org.dynmap.DynmapWebChatEvent";
private static final HandlerList handlers = new HandlerList();
private String source;
private String name;
private String message;
private boolean cancelled;
private boolean isprocessed;
public DynmapWebChatEvent(String source, String name, String message) {
this.source = source;
this.name = name;
this.message = message;
this.cancelled = false;
this.isprocessed = false;
}
@Override
public boolean isCancelled() { return cancelled; }
@Override
public void setCancelled(boolean cancel) { cancelled = cancel; }
public String getSource() { return source; }
public String getName() { return name; }
public String getMessage() { return message; }
/* Processed flag is used to mark message as handled by listener - if set, dynmap will not send it using broadcastMessage() */
public boolean isProcessed() { return isprocessed; }
public void setProcessed() { isprocessed = true; }
@Override
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
}

View File

@ -2,7 +2,9 @@ rootProject.name = 'dynmap-common'
include ':dynmap' include ':dynmap'
include ':bukkit-helper-113' include ':bukkit-helper-113'
include ':bukkit-helper' include ':bukkit-helper'
include ':dynmap-api'
project(':dynmap').projectDir = "$rootDir/bukkit" as File project(':dynmap').projectDir = "$rootDir/bukkit" as File
project(':bukkit-helper-113').projectDir = "$rootDir/bukkit-helper-113" as File project(':bukkit-helper-113').projectDir = "$rootDir/bukkit-helper-113" as File
project(':bukkit-helper').projectDir = "$rootDir/bukkit-helper" as File project(':bukkit-helper').projectDir = "$rootDir/bukkit-helper" as File
project(':dynmap-api').projectDir = "$rootDir/dynmap-api" as File