Removed message and socialspy because we now have that with sentinel
This commit is contained in:
@@ -64,16 +64,12 @@ public final class OgreDupeAlias extends JavaPlugin {
|
|||||||
getCommand("mutechat").setTabCompleter(new MuteChatCommand());
|
getCommand("mutechat").setTabCompleter(new MuteChatCommand());
|
||||||
getCommand("staffchat").setExecutor(new StaffChatCommand());
|
getCommand("staffchat").setExecutor(new StaffChatCommand());
|
||||||
getCommand("staffchat").setTabCompleter(new StaffChatCommand());
|
getCommand("staffchat").setTabCompleter(new StaffChatCommand());
|
||||||
getCommand("socialspy").setExecutor(new SocialSpyCommand());
|
|
||||||
getCommand("socialspy").setTabCompleter(new SocialSpyCommand());
|
|
||||||
getCommand("commandspy").setExecutor(new CommandSpyCommand());
|
getCommand("commandspy").setExecutor(new CommandSpyCommand());
|
||||||
getCommand("commandspy").setTabCompleter(new CommandSpyCommand());
|
getCommand("commandspy").setTabCompleter(new CommandSpyCommand());
|
||||||
getCommand("recipespy").setExecutor(new RecipeSpyCommand());
|
getCommand("recipespy").setExecutor(new RecipeSpyCommand());
|
||||||
getCommand("recipespy").setTabCompleter(new RecipeSpyCommand());
|
getCommand("recipespy").setTabCompleter(new RecipeSpyCommand());
|
||||||
getCommand("irepair").setExecutor(new IRepairCommand());
|
getCommand("irepair").setExecutor(new IRepairCommand());
|
||||||
getCommand("irepair").setTabCompleter(new IRepairCommand());
|
getCommand("irepair").setTabCompleter(new IRepairCommand());
|
||||||
getCommand("message").setExecutor(new MessageCommand());
|
|
||||||
getCommand("message").setTabCompleter(new MessageCommand());
|
|
||||||
getCommand("attackcooldown").setExecutor(new AttackCooldownCommand());
|
getCommand("attackcooldown").setExecutor(new AttackCooldownCommand());
|
||||||
getCommand("attackcooldown").setTabCompleter(new AttackCooldownCommand());
|
getCommand("attackcooldown").setTabCompleter(new AttackCooldownCommand());
|
||||||
getCommand("givecustom").setExecutor(new GiveCustomCommand());
|
getCommand("givecustom").setExecutor(new GiveCustomCommand());
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ public class SPBEventListener implements Listener {
|
|||||||
Projectile proj = e.getEntity();
|
Projectile proj = e.getEntity();
|
||||||
if (proj instanceof Snowball && proj.getShooter() instanceof Player shooter) {
|
if (proj instanceof Snowball && proj.getShooter() instanceof Player shooter) {
|
||||||
Snowball snowball = (Snowball) proj;
|
Snowball snowball = (Snowball) proj;
|
||||||
shooter.sendMessage("Hit a block");
|
|
||||||
if (snowball.getItem().getType() == Material.BLUE_DYE || snowball.getItem().getType() == Material.BLUE_DYE) {
|
if (snowball.getItem().getType() == Material.BLUE_DYE || snowball.getItem().getType() == Material.BLUE_DYE) {
|
||||||
shooter.sendMessage("Passed dye check");
|
shooter.sendMessage("Passed dye check");
|
||||||
if (!e.getHitBlock().getType().equals(Material.COMMAND_BLOCK) && !e.getHitBlock().getType().equals(Material.CHAIN_COMMAND_BLOCK) && !e.getHitBlock().getType().equals(Material.REPEATING_COMMAND_BLOCK)) {
|
if (!e.getHitBlock().getType().equals(Material.COMMAND_BLOCK) && !e.getHitBlock().getType().equals(Material.CHAIN_COMMAND_BLOCK) && !e.getHitBlock().getType().equals(Material.REPEATING_COMMAND_BLOCK)) {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class ChatConstraints {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean passAllChecks() {
|
public boolean passAllChecks() {
|
||||||
return passChatMuted() && passRepeat() && passSwear() && passUnicode() && passSpam();
|
return passChatMuted() && passUnicode() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean passChatMuted() {
|
public boolean passChatMuted() {
|
||||||
|
|||||||
@@ -27,7 +27,11 @@ public class LaserPointer {
|
|||||||
switch (a) {
|
switch (a) {
|
||||||
case RIGHT_CLICK_AIR, RIGHT_CLICK_BLOCK -> {
|
case RIGHT_CLICK_AIR, RIGHT_CLICK_BLOCK -> {
|
||||||
// Full beam
|
// Full beam
|
||||||
RaycastUtils.raycast(start,rot,30,0.1,(point) -> {
|
Location end = RaycastUtils.raycast(start,rot,60,0.5,(point) -> {
|
||||||
|
return !point.getBlock().isPassable();
|
||||||
|
});
|
||||||
|
Vector rightVec = new Vector(rot.getX(), rot.getY(), rot.getZ());
|
||||||
|
RaycastUtils.raycast(start.clone().add(0,1,0),end,0.1,(point) -> {
|
||||||
Particle.DustOptions dust = new Particle.DustOptions(Color.LIME, 0.5F);
|
Particle.DustOptions dust = new Particle.DustOptions(Color.LIME, 0.5F);
|
||||||
point.getWorld().spawnParticle(Particle.REDSTONE,point,1,0,0,0,0,dust);
|
point.getWorld().spawnParticle(Particle.REDSTONE,point,1,0,0,0,0,dust);
|
||||||
return !point.getBlock().getType().equals(Material.AIR);
|
return !point.getBlock().getType().equals(Material.AIR);
|
||||||
|
|||||||
@@ -17,35 +17,123 @@ import org.bukkit.util.Vector;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class VoidCharm {
|
public
|
||||||
public static void handleVoidCharm(PlayerInteractEvent e) {
|
class
|
||||||
Player p = e.getPlayer();
|
VoidCharm
|
||||||
ItemStack stack = e.getItem();
|
{
|
||||||
Action a = e.getAction();
|
public
|
||||||
if (ItemUtils.matchDisplay(stack, ItemPresets.VOID_CHARM)) {
|
static
|
||||||
e.setCancelled(true);
|
void
|
||||||
switch (a) {
|
handleVoidCharm
|
||||||
case LEFT_CLICK_BLOCK, LEFT_CLICK_AIR -> {
|
(
|
||||||
//test
|
PlayerInteractEvent e
|
||||||
}
|
) {
|
||||||
case RIGHT_CLICK_AIR, RIGHT_CLICK_BLOCK -> {
|
Player
|
||||||
Location start = p.getEyeLocation();
|
p =
|
||||||
Vector rot = p.getLocation().getDirection().normalize();
|
e.getPlayer();
|
||||||
SoundPlayer throwSound = new SoundPlayer(p.getLocation(), Sound.ITEM_TRIDENT_RIPTIDE_3, 1,0.4F);
|
ItemStack
|
||||||
throwSound.playWithin(10);
|
stack =
|
||||||
RaycastUtils.raycast(start, rot, 60, 0.5, (point) -> {
|
e.getItem();
|
||||||
World w = point.getWorld();
|
Action
|
||||||
if (w == null) return false;
|
a =
|
||||||
List<Entity> targets = new ArrayList<>(w.getNearbyEntities(point, 0.5,0.5,0.5, entity -> {
|
e.getAction();
|
||||||
return entity instanceof LivingEntity living && !living.isDead() && living != p;
|
if
|
||||||
}));
|
(
|
||||||
// Create stuff here
|
ItemUtils.matchDisplay
|
||||||
Particle.DustOptions dust = new Particle.DustOptions(Color.BLACK, 1);
|
(
|
||||||
// Check for hits
|
stack,
|
||||||
|
ItemPresets.VOID_CHARM
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
e.setCancelled
|
||||||
|
(
|
||||||
|
true
|
||||||
|
);
|
||||||
|
switch
|
||||||
|
(
|
||||||
|
a
|
||||||
|
)
|
||||||
|
{
|
||||||
|
case RIGHT_CLICK_AIR, RIGHT_CLICK_BLOCK
|
||||||
|
-> {
|
||||||
|
Location
|
||||||
|
start =
|
||||||
|
p.getEyeLocation();
|
||||||
|
Vector
|
||||||
|
rot =
|
||||||
|
p.getLocation()
|
||||||
|
.getDirection()
|
||||||
|
.normalize();
|
||||||
|
SoundPlayer
|
||||||
|
throwSound =
|
||||||
|
new
|
||||||
|
SoundPlayer
|
||||||
|
(
|
||||||
|
p.getLocation(),
|
||||||
|
Sound.ITEM_TRIDENT_RIPTIDE_3,
|
||||||
|
1,
|
||||||
|
0.4F
|
||||||
|
);
|
||||||
|
throwSound.
|
||||||
|
playWithin
|
||||||
|
(
|
||||||
|
10
|
||||||
|
);
|
||||||
|
RaycastUtils.
|
||||||
|
raycast
|
||||||
|
(
|
||||||
|
start,
|
||||||
|
rot,
|
||||||
|
60,
|
||||||
|
0.5,
|
||||||
|
(
|
||||||
|
point
|
||||||
|
)
|
||||||
|
->
|
||||||
|
{
|
||||||
|
World
|
||||||
|
w =
|
||||||
|
point.getWorld();
|
||||||
|
if
|
||||||
|
(
|
||||||
|
w == null
|
||||||
|
)
|
||||||
|
return false;
|
||||||
|
List
|
||||||
|
<Entity>
|
||||||
|
targets =
|
||||||
|
new ArrayList
|
||||||
|
<>
|
||||||
|
(
|
||||||
|
w.getNearbyEntities
|
||||||
|
(
|
||||||
|
point,
|
||||||
|
0.5,
|
||||||
|
0.5,
|
||||||
|
0.5,
|
||||||
|
entity
|
||||||
|
-> {
|
||||||
|
return
|
||||||
|
entity
|
||||||
|
instanceof
|
||||||
|
LivingEntity
|
||||||
|
living &&
|
||||||
|
!living.isDead() &&
|
||||||
|
living !=
|
||||||
|
p;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
Particle.
|
||||||
|
DustOptions
|
||||||
|
dust = new Particle.
|
||||||
|
DustOptions
|
||||||
|
(
|
||||||
|
Color.BLACK, 1
|
||||||
|
);
|
||||||
targets.forEach(target -> {
|
targets.forEach(target -> {
|
||||||
if (target instanceof LivingEntity living) {
|
if (target instanceof LivingEntity living) {
|
||||||
// Player hit here
|
|
||||||
Location targetLoc = target.getLocation();
|
Location targetLoc = target.getLocation();
|
||||||
Location originalLoc = target.getLocation().add(0,0.1,0);
|
Location originalLoc = target.getLocation().add(0,0.1,0);
|
||||||
SoundPlayer bellSound = new SoundPlayer(target.getLocation(), Sound.ITEM_TRIDENT_THUNDER, 1,0.4F);
|
SoundPlayer bellSound = new SoundPlayer(target.getLocation(), Sound.ITEM_TRIDENT_THUNDER, 1,0.4F);
|
||||||
@@ -60,7 +148,6 @@ public class VoidCharm {
|
|||||||
},0,1);
|
},0,1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Every raytrace
|
|
||||||
w.spawnParticle(Particle.REDSTONE, point, 1,0,0,0,0, dust);
|
w.spawnParticle(Particle.REDSTONE, point, 1,0,0,0,0, dust);
|
||||||
return !targets.isEmpty();
|
return !targets.isEmpty();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,9 +17,6 @@ permissions:
|
|||||||
oda.commands.staffchat:
|
oda.commands.staffchat:
|
||||||
description: Access to staffchat.
|
description: Access to staffchat.
|
||||||
default: op
|
default: op
|
||||||
oda.commands.socialspy:
|
|
||||||
description: Access to socialspy.
|
|
||||||
default: op
|
|
||||||
oda.commands.commandspy:
|
oda.commands.commandspy:
|
||||||
description: Access to commandspy.
|
description: Access to commandspy.
|
||||||
default: op
|
default: op
|
||||||
@@ -109,17 +106,6 @@ commands:
|
|||||||
aliases:
|
aliases:
|
||||||
- ipearlrepair
|
- ipearlrepair
|
||||||
- irestock
|
- irestock
|
||||||
message:
|
|
||||||
description: Private message a player
|
|
||||||
usage: /message <player> [<message>]
|
|
||||||
aliases:
|
|
||||||
- msg
|
|
||||||
- pm
|
|
||||||
- dm
|
|
||||||
- tell
|
|
||||||
- whisper
|
|
||||||
- w
|
|
||||||
- message
|
|
||||||
attackcooldown:
|
attackcooldown:
|
||||||
description: Attack cooldown bypass for entities.
|
description: Attack cooldown bypass for entities.
|
||||||
usage: /attackcooldown
|
usage: /attackcooldown
|
||||||
|
|||||||
Reference in New Issue
Block a user