Looking for a plugin

Discussion in 'Spigot Plugin Help' started by Huddling, May 29, 2017.

  1. Hi,

    Is there a plugin which allows temporary access to an area if a player has a ticket or key of some sort?

    For example if a player wins a 'key' by voting, they can use the key to get temporary access to an area where they can buy special items etc.

    Thanks :)
  2. I think you need a custom plugin.
  3. Ugh... thanks anyway :(
  4. You may be able to work a way around this using other plugins.

    Here's a solution I came up with using PermissionsEX and WorldGuard:
    • Restrict a region to require a certain permission with WorldGuard using the following commands:
      • /region define ExampleRegion
      • /region flag ExampleRegion entry deny
      • /region addmember ExampleRegion g:ExamplePermission
      • /region flag ExampleRegion entry -g nonmembers
    • Then, use PermissionsEX timed permissions feature to give the user permission to enter the area only for a specific time in seconds:
      • /pex user (username) timed add group.ExamplePermission (seconds) (worldname)
    In theory, this should work. If you are using some sort of voting listener plugin such as GAListener for votes, you can have it run the PermissionsEX timed permission command above, and then have it teleport them to the feature via warp or something. There's always a way around things ;) I hope you can figure this out!
  5. Thank you very much for this. Thing is though I want the player to be able to choose when they go, so when they use /warp (example) they get to go there for 60 seconds and then teleported out. I wonder if maybe its possible to make them land on a pressure plate or something that will activate a command block to run the command you suggested above?
  6. Mh. I have never heard of a plugin like that. I already got a idea how you could program that.
    I don't know if WorldEdit has an API but you could code your own Region .class.

    You just have to code a methode that registers when a player leaves or enter the region. If he enters the region and has a key than the key gets removed and he gets added to a list. If he leaves then he gets removed from the list. Next time he tryes to enter he cant enter it because the key is gone. :)

    I could try to program it...seems not to be that hard.
    • Useful Useful x 1