mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-28 21:48:43 +01:00
Add note sign; resolves #511
This commit is contained in:
parent
5892181a5d
commit
74ac2d1221
@ -59,6 +59,7 @@ public enum DSignTypeDefault implements DSignType {
|
|||||||
LOBBY("Lobby", "lobby", true, false, LobbySign.class),
|
LOBBY("Lobby", "lobby", true, false, LobbySign.class),
|
||||||
MOB("Mob", "mob", false, false, MobSign.class),
|
MOB("Mob", "mob", false, false, MobSign.class),
|
||||||
MESSAGE("MSG", "msg", false, false, MessageSign.class),
|
MESSAGE("MSG", "msg", false, false, MessageSign.class),
|
||||||
|
NOTE("Note", "note", false, false, NoteSign.class),
|
||||||
OPEN_DOOR("Door", "door", false, false, OpenDoorSign.class),
|
OPEN_DOOR("Door", "door", false, false, OpenDoorSign.class),
|
||||||
PLACE("Place", "place", false, false, PlaceSign.class),
|
PLACE("Place", "place", false, false, PlaceSign.class),
|
||||||
PROTECTION("Protection", "protection", false, false, ProtectionSign.class),
|
PROTECTION("Protection", "protection", false, false, ProtectionSign.class),
|
||||||
|
48
src/main/java/de/erethon/dungeonsxl/sign/NoteSign.java
Normal file
48
src/main/java/de/erethon/dungeonsxl/sign/NoteSign.java
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2012-2019 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
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package de.erethon.dungeonsxl.sign;
|
||||||
|
|
||||||
|
import de.erethon.caliburn.item.VanillaItem;
|
||||||
|
import de.erethon.dungeonsxl.DungeonsXL;
|
||||||
|
import de.erethon.dungeonsxl.world.DGameWorld;
|
||||||
|
import org.bukkit.block.Sign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Daniel Saukel
|
||||||
|
*/
|
||||||
|
public class NoteSign extends DSign {
|
||||||
|
|
||||||
|
public NoteSign(DungeonsXL plugin, Sign sign, String[] lines, DGameWorld gameWorld) {
|
||||||
|
super(plugin, sign, lines, gameWorld);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean check() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInit() {
|
||||||
|
getSign().getBlock().setType(VanillaItem.AIR.getMaterial());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DSignType getType() {
|
||||||
|
return DSignTypeDefault.NOTE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user