mavenization
gitignore added maven target/ and intellij project stuff simplified a return statement in PluginPlayerListener added TODO in LocationSerializer (creating a world should not be done there)
This commit is contained in:
parent
9e3b6a6cdb
commit
139bfc7d54
7
.gitignore
vendored
7
.gitignore
vendored
@ -6,6 +6,13 @@
|
|||||||
# netbeans
|
# netbeans
|
||||||
/nbproject
|
/nbproject
|
||||||
|
|
||||||
|
# intelliJ
|
||||||
|
.idea/
|
||||||
|
*.iml
|
||||||
|
|
||||||
|
# maven
|
||||||
|
target/
|
||||||
|
|
||||||
# vim
|
# vim
|
||||||
.*.sw[a-p]
|
.*.sw[a-p]
|
||||||
|
|
||||||
|
42
pom.xml
Normal file
42
pom.xml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>de.craftinc</groupId>
|
||||||
|
<artifactId>AncientGates</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<version>1.1.1</version>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bukkit</groupId>
|
||||||
|
<artifactId>bukkit</artifactId>
|
||||||
|
<version>RELEASE</version>
|
||||||
|
<type>jar</type>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<directory>target</directory>
|
||||||
|
<outputDirectory>target/classes</outputDirectory>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<sourceDirectory>src</sourceDirectory>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/resources</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>bukkit-repo</id>
|
||||||
|
<url>http://repo.bukkit.org/content/groups/public</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
</project>
|
@ -72,14 +72,6 @@ public class PluginPlayerListener extends BaseLocationListener implements Listen
|
|||||||
|
|
||||||
|
|
||||||
protected boolean hasPermission(Player player) {
|
protected boolean hasPermission(Player player) {
|
||||||
if (player.hasPermission(Plugin.permissionUse)) {
|
return player.hasPermission(Plugin.permissionUse) || player.hasPermission(Plugin.permissionAll);
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (player.hasPermission(Plugin.permissionAll)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,9 @@ public class LocationSerializer
|
|||||||
{
|
{
|
||||||
World world = Plugin.instance.getServer().getWorld(name);
|
World world = Plugin.instance.getServer().getWorld(name);
|
||||||
|
|
||||||
|
// TODO: Creating a world silently in the background is not a good thing I think. No one expects a Gate
|
||||||
|
// Plugin to do that. It would be better to handle gates which point to non-existing worlds safely (not
|
||||||
|
// teleporting at all)
|
||||||
if (world == null) {
|
if (world == null) {
|
||||||
world = Plugin.instance.getServer().createWorld(new WorldCreator(name).environment(Environment.NORMAL));
|
world = Plugin.instance.getServer().createWorld(new WorldCreator(name).environment(Environment.NORMAL));
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ version: 1.1.1
|
|||||||
description: A plugin to create gates for fast traveling.
|
description: A plugin to create gates for fast traveling.
|
||||||
author: tomco
|
author: tomco
|
||||||
authors: [oloflarsson, locutus, DrAgonmoray, s1m0ne, tomco]
|
authors: [oloflarsson, locutus, DrAgonmoray, s1m0ne, tomco]
|
||||||
website: http://www.craftinc.de/blog/?p=255
|
website: http://www.craftinc.de/ancient-gates/
|
||||||
|
|
||||||
main: org.mcteam.ancientgates.Plugin
|
main: org.mcteam.ancientgates.Plugin
|
||||||
database: false
|
database: false
|
||||||
@ -26,5 +26,3 @@ permissions:
|
|||||||
description: Allows you to use open gates.
|
description: Allows you to use open gates.
|
||||||
acientgates.manage:
|
acientgates.manage:
|
||||||
description: Gives access to commands manipulating gates.
|
description: Gives access to commands manipulating gates.
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user