CityGates
Description
CityGates is a simple but useful plugin. This plugin allows you to close your large city walls or you mighty fortress with a gate. You make a gate out of block, next you use some simple commands to let the gate open and close on your command! To add the finishing touch to your gate, you can let the gate open and close with animation, like a real portcullis!
Feathures
- Create (animation) gates
- Open/close gates
- Bundle gates together in groups
- Timer to open and close gates on minecraft time
- Use buttons to open gates temporally
- Use redstone to use custom logic on gates
- Open gates by slaying mobs
- Protect gates against griefing
- Advanced permission support
Donation
Make a donation so this project can be maintained. Donate!
How to install
Download the plugin and copy it to your plugin folder of your craftbukkit server. Reload or restart your server to load the plugin. The savefiles of the gates and groups are stored in a yml file. Feel free to edit these files, but you can also use the commands.
Commands
- /gsave <gate/group>
- /greload <gate/group>
Gate commands
- /gp1 (select point 1)
- /gp2 (select point 2)
- /gshow (show your current selection)
- /gcreate [gate name] <direction:north/east/south/west/up/down> (create a <animation> gate)
- /gsetanimation [gate] <direction:north/east/south/west/up/down> (convert normal gate to an animation gate)
- /gchangeblocks [gate/group] [state:open/close] <children> (change the blocks of a gate to the current blocks, use children if you're editing a group)
- /gdelete [gate] <type:none/all> (delete a gate <with children>)
- /gperm [gate/group] [type:all/open/close/kill/button] [true/false] (set if a gate needs permission to interact)
- /gprotect [gate/group] [true/false] (protect a gate against griefing (default = true))
Interaction commands
- /glist (list al the gates)
- /ginfo [gate/group] (details about a gate or group)
- /gopen [gate/group] (open gate)
- /gclose [gate/group] (close gate)
Group commands
- /ggroup create [group name] (create new group)
- /ggroup delete [group] (delete group)
- /ggroup add [group] [gate] (add gate or group to this group)
- /ggroup remove [group] [gate] (remove gate or group from this group)
- /ggroup delay [group] [delay] (set delay between the children to open and close)
Action commands
- /gtimer add [gate/group] (gate now opens and close on time)
- /gtimer remove [gate/group] (gate no longer opens and close on time)
- /gtimer opentime [gate/group] [time] (set the minecraft time (0-23999) when this gate should open)
- /gtimer closetime [gate/group] [time] (set the minecraft time (0-23999) when this gate should close)
- /gbutton add [gate/group] (add the button you're looking at)
- /gbutton remove [gate/group] (remove the button you're looking at)
- /gbutton delay [gate/group] [delay] (set the time to close the gate after pressing the button)
- /gredstone add [gate/group] (add a redstonelistener to the block you're looking at)
- /gredstone remove [gate/group] (remove the redstonelistener from the block you're looking at)
- /gkill set [gate/group] [entity] (open the gate after this entity is killed)
- /gkill remove [gate/group] (remove kill listener for this gate)
- /gkill location [gate/group] (set the location where the mob should be slayen - /gp1 and /gp2)
- /gkill message [gate/group] [msg] (the message the killer receive after killing this mob)
Permissions
Admin
- citygates.admin.*
- citygates.admin.create
- citygates.admin.delete
- citygates.admin.setanimation
- citygates.admin.changeblocks
- citygates.admin.perm
- citygates.admin.protect
- citygates.admin.group.create
- citygates.admin.group.delete
- citygates.admin.group.add
- citygates.admin.group.remove
- citygates.admin.group.delay
- citygates.admin.button.add
- citygates.admin.button.remove
- citygates.admin.button.delay
- citygates.admin.kill.set
- citygates.admin.kill.remove
- citygates.admin.kill.loc
- citygates.admin.kill.msg
- citygates.admin.redstone.add
- citygates.admin.redstone.remove
- citygates.admin.timer.add
- citygates.admin.timer.remove
- citygates.admin.timer.open
- citygates.admin.timer.close
- citygates.admin.load
- citygates.admin.save
User
- citygates.user.open: true
- citygates.user.close: true
- citygates.user.button: true
- citygates.user.kill: true
- citygates.user.list: true
- citygates.user.info: true
Gate permissions
You can set the permission for each gate and group. You can do this with the command : /gperm [gate/group] [type:all/open/close/kill/button] [true/false].
If the permission is set to true you need be an op or have the following permission node:
- All permissions: citygates.user.toggle.[gate/group name] or citygates.user.toggle.*
- Open permission: citygates.user.open.[gate/group name] or citygates.user.open.*
- Close permission: citygates.user.close.[gate/group name] or citygates.user.close.*
- Button permission: citygates.user.button.[gate/group name] or citygates.user.button.*
- Kill permission: citygates.user.kill.[gate/group name] or citygates.user.kill.*
To protect against griefing use the command: /gprotect [gate/group] [true/false].
If the permission is set to true you need be an op or have the following permission node:
- All permissions: citygates.user.toggle.[gate/group name] or citygates.user.toggle.*
- Grief permissions: citygates.user.break.[gate/group name] or citygates.user.break.*
Tutorials
Upcomming........
Well crap... this plugin is losing support... is it even gonna be updated when it needs to?
With NoLagg instaled, com 1.4.6r4 we have this errors:
http://pastebin.com/V79Mi71H
Great works and do not work two button with groups on 1.4.6 r0.3 please repair :)
Awesome, :) but it would be great if you can make it so that pistons show....
I having this inssue on 1.4.6 last dev build.
http://pastebin.com/uMNMzBY1
edit: I dont have more this error on the last craftbukkit dev build on
I really need help, I work on my server a lot and I restart it quite a bit, but it seems every time I restart it the animated gates get messed up and don't close or open right. They start to close/open really slow and have pieces missing. I recreate the gates and they work fine again until I restart the server... please help.
@brianher67
Use presure plates and redstone listener of the gate, players who are allowed to use the gate have permissions and can use a button to open the gate again
Is there a way you can make this work with faction? So when a enemy faction comes close to the gates, they close automatically? That could be SO EPIC! :O
Thats a Shame o well :P i guess i have to make the Gates a Staff only Thing Thanks :P
@KingLucifer
I dont work on this project anymore, I only resolve bugs and update it to the latest cb
I currently working on this mod editor
If you want to prevent your door being harvest you can protect it with a antigrief plugin like worldguard
Hello i run a Steampunk server Called Skyeden i love this plugin i just have a few things to sugest if its possable
1.made gates disable item drops near them(1 to 3 blocks away) to prevent Dupeing because if u cake a gate u can close it remove the stuff close it and open it again and reharvest the stuff
2. config to disalow blocks useable to makeing parts of a door that dont move or to help with the first isssue
@kiki021
It should work fine with the last craftbukkit
Update it please
@dwade20dwade
First do you greate a animation gate or a normal gate?
Second when you create a gate and you stop your server. Is there something in the gate/group config file?
Every time i make a gate and i stop my server it deletes them and i get this error:
[spoiler]
<<code>>
06:52:45 [SEVERE] Could not pass event BlockRedstoneEvent to CityGates org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:332) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav a:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j ava:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j ava:462) at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:116) at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:172) at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:172) at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:172) at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:162) at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:162) at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:162) at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:162) at net.minecraft.server.BlockRedstoneWire.l(BlockRedstoneWire.java:46) at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.ja va:294) at net.minecraft.server.World.m(World.java:438) at net.minecraft.server.World.applyPhysics(World.java:418) at net.minecraft.server.World.update(World.java:371) at net.minecraft.server.World.setData(World.java:312) at net.minecraft.server.BlockPressurePlate.l(BlockPressurePlate.java:142 ) at net.minecraft.server.BlockPressurePlate.b(BlockPressurePlate.java:65)at net.minecraft.server.WorldServer.a(WorldServer.java:449) at net.minecraft.server.WorldServer.doTick(WorldServer.java:168) at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:558) at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212) at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:474) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:406) at net.minecraft.server.ThreadServerApplication.run(SourceFile:539) Caused by: java.lang.NullPointerException at citygates.main.onRedstoneListener(main.java:170) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:330) ... 26 more<</code>>
[/spoiler]
That error is from the updater. But that is not severe because I only update citygates when their is a new update of craftbukkit
i'm running CG at craftbukkit 1.3.2 r1.0 and i het this error:
yeah tried using an old build as well on 2 different machines both did not generate a config however they are still functional
That's very strange :s The config files may never be empty. If there is a problem with writing files, you should see it in the console.
1.6 fresh install doesn't seem to generate a config it generates 3 files general gates and groups all of which are empty no other plugins running on a test server.