Jump to content

Suggestion - ACV1


WaterIsIllegal

Recommended Posts

Posted

Hi. This suggestion could be a way to make HB/smoke/rope dart reports a lot easier.

When someone shoots you with a HB, there should be a message that says: "You've been hb'ed by Mainblast!", "Mainblast has used smoke on you!" or "Alien pulled you with a rope dart".

It's for ACV1, (obviously :P) and I think this should be implemented.

Posted

That's a great idea! But with the smoke, it should be like "Zawita used smoke!" because it's a ranged item. But I don't really know how this can be inplemented.

Posted

But you don't think that it's better to solve the bug instead of add a message of who threw the HB?

If we have to modify something, let's do it right.

Posted

Maybe there can be an anti-projectiles area in the spawn made from a plugin or something? i mean... when you throw an arrow, instead of being useles, it rejects and goes down, that'd be like a force field

  • 3 months later...
Posted

Hey, sorry for bumping this suggestion but well, I think it is a problem which still needs to be solved.

We could follow two paths to fix this "bug", both of them need @brunyman as a developer to do it:

1. We have to check how the WorldGuard API works and see if there is any code which lets you know in which region you are (I think there is). If yes, Bruny, has to add in the HB/Smoke/etc code a checker to see if a player is in a region forbiden to use those items. If yes: they wont work.

2. This is simpler but wont fix the problem: just add a line of code that will be sent to the target saying who used HB/Smoke/etc on them. (This wont fix the error, but if Bruny cant find the way of implementing the first path: this will make reports and bans easier!

Edit:

On spigot some people used this code for World Guard (https://www.spigotmc.org/threads/worldguard-checking-if-players-in-a-region.67426/):

                    for(ProtectedRegion r : WGBukkit.getRegionManager(p.getWorld()).getApplicableRegions(p.getLocation())) {
                        if (r.getId().equalsIgnoreCase("ACv1_Spawn")) {
                         return; // Also there could be a World Guard flag checker to see if the region has PVP enabled or not, instead getting the region the player is in
                        }
				        if ((p.getGameMode() == GameMode.CREATIVE)) {
					        return; // So staff on creative mode cant be affected
				        } 
                        // Do whatever code for HB/Smoke/etc
                    }

 

Also this code would check if the region the player is in has PVP enabled or not (https://www.spigotmc.org/threads/worldguard-api-check-if-player-can-pvp.226101/):

            if (Bukkit.getServer().getPluginManager().getPlugin("WorldGuard") != null){
                RegionManager regionManager = wg.getRegionManager(p.getWorld());
                ApplicableRegionSet set = regionManager.getApplicableRegions(p.getLocation());
                for (ProtectedRegion region : set) {
                    if (region != null){
                        if (!set.allows(DefaultFlag.PVP)) {
                            event.setCancelled(true);
                            return;
                        }
                    }
                }
            }

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site you agree to the following Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.