Adapter | API

This commit is contained in:
Daniel Saukel 2020-01-12 16:10:08 +01:00
parent b5ab282297
commit 7e2153f532
8 changed files with 54 additions and 9 deletions

26
adapter/pom.xml Normal file
View File

@ -0,0 +1,26 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.erethon.dungeonsxl</groupId>
<artifactId>dungeonsxl-adapter</artifactId>
<version>0.18-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>de.erethon.dungeonsxl</groupId>
<artifactId>dungeonsxl-parent</artifactId>
<version>0.18-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>de.erethon.dungeonsxl</groupId>
<artifactId>dungeonsxl-api</artifactId>
<version>${project.parent.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>${spigotVersion.latest}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2012-2019 Frank Baumann
* Copyright (C) 2012-2020 Frank Baumann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
*/
package de.erethon.dungeonsxl.adapter.block;
import de.erethon.dungeonsxl.util.DColor;
import de.erethon.dungeonsxl.api.player.PlayerGroup.Color;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
@ -29,7 +29,7 @@ public interface BlockAdapter {
void openDoor(Block block);
void setBlockWoolColor(Block block, DColor color);
void setBlockWoolColor(Block block, Color color);
BlockFace getFacing(Block block);

View File

@ -10,6 +10,12 @@
<version>0.18-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>de.erethon.dungeonsxl</groupId>
<artifactId>dungeonsxl-adapter</artifactId>
<version>${project.parent.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>de.erethon.dungeonsxl</groupId>
<artifactId>dungeonsxl-api</artifactId>

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2012-2019 Frank Baumann
* Copyright (C) 2012-2020 Frank Baumann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
*/
package de.erethon.dungeonsxl.adapter.block;
import de.erethon.dungeonsxl.util.DColor;
import de.erethon.dungeonsxl.api.player.PlayerGroup.Color;
import org.bukkit.Axis;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
@ -51,7 +51,7 @@ public class BlockAdapterBlockData implements BlockAdapter {
}
@Override
public void setBlockWoolColor(Block block, DColor color) {
public void setBlockWoolColor(Block block, Color color) {
block.setType(color.getWoolMaterial().getMaterial());
}

View File

@ -10,6 +10,12 @@
<version>0.18-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>de.erethon.dungeonsxl</groupId>
<artifactId>dungeonsxl-adapter</artifactId>
<version>${project.parent.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>de.erethon.dungeonsxl</groupId>
<artifactId>dungeonsxl-api</artifactId>

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2012-2019 Frank Baumann
* Copyright (C) 2012-2020 Frank Baumann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
*/
package de.erethon.dungeonsxl.adapter.block;
import de.erethon.dungeonsxl.util.DColor;
import de.erethon.dungeonsxl.api.player.PlayerGroup.Color;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
@ -45,7 +45,7 @@ public class BlockAdapterMagicValues implements BlockAdapter {
}
@Override
public void setBlockWoolColor(Block block, DColor color) {
public void setBlockWoolColor(Block block, Color color) {
block.setTypeIdAndData(Material.WOOL.getId(), color.getDyeColor().getWoolData(), false);
}

View File

@ -22,6 +22,12 @@
</resources>
</build>
<dependencies>
<dependency>
<groupId>de.erethon.dungeonsxl</groupId>
<artifactId>dungeonsxl-adapter</artifactId>
<version>${project.parent.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>de.erethon.dungeonsxl</groupId>
<artifactId>dungeonsxl-api</artifactId>

View File

@ -8,6 +8,7 @@
<url>https://dre2n.github.io</url>
<description>Create custom dungeons and adventure maps with ease!</description>
<modules>
<module>adapter</module>
<module>api</module>
<module>bukkit_blockdata</module>
<module>bukkit_magicvalues</module>