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
|
||||
/nbproject
|
||||
|
||||
# intelliJ
|
||||
.idea/
|
||||
*.iml
|
||||
|
||||
# maven
|
||||
target/
|
||||
|
||||
# vim
|
||||
.*.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) {
|
||||
if (player.hasPermission(Plugin.permissionUse)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (player.hasPermission(Plugin.permissionAll)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
return player.hasPermission(Plugin.permissionUse) || player.hasPermission(Plugin.permissionAll);
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,10 @@ public class LocationSerializer
|
||||
protected static World getWorld(String 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) {
|
||||
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.
|
||||
author: 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
|
||||
database: false
|
||||
@ -25,6 +25,4 @@ permissions:
|
||||
ancientgates.use:
|
||||
description: Allows you to use open gates.
|
||||
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