mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2025-02-17 21:02:12 +01:00
Adapter | API
This commit is contained in:
parent
b5ab282297
commit
7e2153f532
26
adapter/pom.xml
Normal file
26
adapter/pom.xml
Normal 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>
|
@ -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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package de.erethon.dungeonsxl.adapter.block;
|
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.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ public interface BlockAdapter {
|
|||||||
|
|
||||||
void openDoor(Block block);
|
void openDoor(Block block);
|
||||||
|
|
||||||
void setBlockWoolColor(Block block, DColor color);
|
void setBlockWoolColor(Block block, Color color);
|
||||||
|
|
||||||
BlockFace getFacing(Block block);
|
BlockFace getFacing(Block block);
|
||||||
|
|
@ -10,6 +10,12 @@
|
|||||||
<version>0.18-SNAPSHOT</version>
|
<version>0.18-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>de.erethon.dungeonsxl</groupId>
|
||||||
|
<artifactId>dungeonsxl-adapter</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>de.erethon.dungeonsxl</groupId>
|
<groupId>de.erethon.dungeonsxl</groupId>
|
||||||
<artifactId>dungeonsxl-api</artifactId>
|
<artifactId>dungeonsxl-api</artifactId>
|
||||||
|
@ -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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package de.erethon.dungeonsxl.adapter.block;
|
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.Axis;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
@ -51,7 +51,7 @@ public class BlockAdapterBlockData implements BlockAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBlockWoolColor(Block block, DColor color) {
|
public void setBlockWoolColor(Block block, Color color) {
|
||||||
block.setType(color.getWoolMaterial().getMaterial());
|
block.setType(color.getWoolMaterial().getMaterial());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,12 @@
|
|||||||
<version>0.18-SNAPSHOT</version>
|
<version>0.18-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>de.erethon.dungeonsxl</groupId>
|
||||||
|
<artifactId>dungeonsxl-adapter</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>de.erethon.dungeonsxl</groupId>
|
<groupId>de.erethon.dungeonsxl</groupId>
|
||||||
<artifactId>dungeonsxl-api</artifactId>
|
<artifactId>dungeonsxl-api</artifactId>
|
||||||
|
@ -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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
package de.erethon.dungeonsxl.adapter.block;
|
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.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
@ -45,7 +45,7 @@ public class BlockAdapterMagicValues implements BlockAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBlockWoolColor(Block block, DColor color) {
|
public void setBlockWoolColor(Block block, Color color) {
|
||||||
block.setTypeIdAndData(Material.WOOL.getId(), color.getDyeColor().getWoolData(), false);
|
block.setTypeIdAndData(Material.WOOL.getId(), color.getDyeColor().getWoolData(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,12 @@
|
|||||||
</resources>
|
</resources>
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>de.erethon.dungeonsxl</groupId>
|
||||||
|
<artifactId>dungeonsxl-adapter</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>de.erethon.dungeonsxl</groupId>
|
<groupId>de.erethon.dungeonsxl</groupId>
|
||||||
<artifactId>dungeonsxl-api</artifactId>
|
<artifactId>dungeonsxl-api</artifactId>
|
||||||
|
1
pom.xml
1
pom.xml
@ -8,6 +8,7 @@
|
|||||||
<url>https://dre2n.github.io</url>
|
<url>https://dre2n.github.io</url>
|
||||||
<description>Create custom dungeons and adventure maps with ease!</description>
|
<description>Create custom dungeons and adventure maps with ease!</description>
|
||||||
<modules>
|
<modules>
|
||||||
|
<module>adapter</module>
|
||||||
<module>api</module>
|
<module>api</module>
|
||||||
<module>bukkit_blockdata</module>
|
<module>bukkit_blockdata</module>
|
||||||
<module>bukkit_magicvalues</module>
|
<module>bukkit_magicvalues</module>
|
||||||
|
Loading…
Reference in New Issue
Block a user