Skip to content

Commit d89dc0b

Browse files
authored
Updated files to version 2.1-SNAPSHOT
1 parent 0d8825c commit d89dc0b

3 files changed

Lines changed: 128 additions & 0 deletions

File tree

api/enums/CheckType.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
package com.asintoto.cmod.api.enums;
3+
4+
/**
5+
*
6+
* @author Asintoto
7+
*/
8+
public enum CheckType {
9+
CHAT_A,
10+
CHAT_B,
11+
COMMAND_A,
12+
COMMAND_B,
13+
FLOOD_A,
14+
TAB_A
15+
}

api/events/CModFlagEvent.java

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
2+
package com.asintoto.cmod.api.events;
3+
4+
import com.asintoto.cmod.api.enums.CheckType;
5+
import org.bukkit.entity.Player;
6+
import org.bukkit.event.Cancellable;
7+
import org.bukkit.event.Event;
8+
import org.bukkit.event.HandlerList;
9+
10+
/**
11+
*
12+
* @author Asintoto
13+
*/
14+
public class CModFlagEvent extends Event implements Cancellable{
15+
private static final HandlerList HANDLERS = new HandlerList();
16+
private final CheckType type;
17+
private boolean isCancelled;
18+
private final Player player;
19+
private String flaginfo;
20+
21+
public CModFlagEvent(Player player, CheckType type, String flaginfo) {
22+
this.player = player;
23+
this.type = type;
24+
this.flaginfo = flaginfo;
25+
this.isCancelled = false;
26+
}
27+
28+
public static HandlerList getHandlerList() {
29+
return HANDLERS;
30+
}
31+
32+
@Override
33+
public HandlerList getHandlers() {
34+
return HANDLERS;
35+
}
36+
37+
@Override
38+
public void setCancelled(boolean isCancelled) {
39+
this.isCancelled = isCancelled;
40+
}
41+
42+
@Override
43+
public boolean isCancelled() {
44+
return this.isCancelled;
45+
}
46+
47+
public Player getPlayer() {
48+
return this.player;
49+
}
50+
51+
public CheckType getCheckType() {
52+
return this.type;
53+
}
54+
55+
public String getFlagInfo() {
56+
return this.flaginfo;
57+
}
58+
59+
public void setFlagInfo(String flaginfo) {
60+
this.flaginfo = flaginfo;
61+
}
62+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
package com.asintoto.cmod.api.events;
3+
4+
import org.bukkit.entity.Player;
5+
import org.bukkit.event.Cancellable;
6+
import org.bukkit.event.Event;
7+
import org.bukkit.event.HandlerList;
8+
9+
/**
10+
*
11+
* @author Asintoto
12+
*/
13+
public class CModPunishmentEvent extends Event implements Cancellable{
14+
private static final HandlerList HANDLERS = new HandlerList();
15+
private boolean isCancelled;
16+
private final Player player;
17+
private final int violetions;
18+
19+
public CModPunishmentEvent(Player player, int violetions) {
20+
this.player = player;
21+
this.violetions = violetions;
22+
this.isCancelled = false;
23+
}
24+
25+
public static HandlerList getHandlerList() {
26+
return HANDLERS;
27+
}
28+
29+
@Override
30+
public HandlerList getHandlers() {
31+
return HANDLERS;
32+
}
33+
34+
@Override
35+
public void setCancelled(boolean isCancelled) {
36+
this.isCancelled = isCancelled;
37+
}
38+
39+
@Override
40+
public boolean isCancelled() {
41+
return this.isCancelled;
42+
}
43+
44+
public Player getPlayer() {
45+
return this.player;
46+
}
47+
48+
public int getPlayerVioletions() {
49+
return this.violetions;
50+
}
51+
}

0 commit comments

Comments
 (0)