This repository has been archived by the owner on Nov 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6bdc4be
commit a2bc6f0
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Eclipse stuff | ||
/.classpath | ||
/.project | ||
/.settings | ||
|
||
# netbeans | ||
/nbproject | ||
|
||
# we use maven! | ||
/build.xml | ||
/target | ||
|
||
# vim | ||
.*.sw[a-p] | ||
|
||
# various other potential build files | ||
/build | ||
/bin | ||
/dist | ||
/manifest.mf | ||
|
||
# Mac filesystem dust | ||
/.DS_Store | ||
|
||
# intellij | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ |
22 changes: 22 additions & 0 deletions
22
src/main/java/com/feildmaster/module/faction/EventListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.feildmaster.module.faction; | ||
|
||
import com.feildmaster.channelchat.event.channel.*; | ||
import org.bukkit.event.*; | ||
|
||
public class EventListener implements Listener { | ||
|
||
@EventHandler(priority=EventPriority.HIGHEST) | ||
public void onReload(ReloadEvent event) { | ||
Module.getplugin().reloadChannel(); | ||
} | ||
|
||
@EventHandler(priority=EventPriority.HIGHEST) | ||
public void onChannelDelete(ChannelDeleteEvent event) { | ||
if(event.isCancelled()) return; | ||
|
||
if(event.getChannel() instanceof FactionChannel) { | ||
event.setCancelled(true); | ||
event.setCancelReason("You can't delete FactonChannel!"); | ||
} | ||
} | ||
} |