-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit dd7685c
Showing
17 changed files
with
530 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
WorldEditArt -  | ||
=== | ||
|
||
License: | ||
|
||
Forum description | ||
|
||
``` | ||
Please refer to [URL='https://github.com/PEMapModder/Small-ZC-Plugins/wiki/WorldEditArt-%7C-Home']the wiki[/URL] for information. Sorry for the inconvenience caused, but it is more convenient for me to edit there and more beautiful for you to view there. | ||
As restricted by forum rules, I need to write a brief description here, however. [B]Here is a brief introduction and list of commands[/B], but [B]please[/B] read the wiki. | ||
Simple introduction: WorldEditArt helps you to change a large amount of blocks at a same time via various methods. | ||
Simple command list: No, just run `//help <page>` in game and look at the commands you have. | ||
Simple feature list: selection of different shapes, setting and replacing blocks within a selection, jump like TPCompass | ||
Unstable feature list: macros, clipboards, wands | ||
[B][U][SIZE=4]Please report bugs to [URL='https://github.com/PEMapModder/Small-ZC-Plugins/issues/']bug tracker[/URL] not in the reviews/thread![/SIZE] | ||
[SIZE=4]Please do not give bad ratings because of the bugs! Report them to the bug tracker page! | ||
Please do not give bad ratings because of the unimplemented featuers! I am going to update![/SIZE][/U][/B] | ||
[B][COLOR=#ff0000]Warning #1: This plugin modifies your world. Use with care. Do not give op permission to players easily! | ||
Warning #2: This plugin is currently in beta version. Please read the config file (if you don't have a good YML editor, beautiful version [URL='https://github.com/PEMapModder/Small-ZC-Plugins/blob/master/WorldEditArt/resources/config.yml']here[/URL]) and the wiki for details about the special switches for beta usage (such as untested features switches). | ||
Warning #3: This plugin registers a lot of permission nodes. Take extra care when toggling these nodes with permission plugins like xPermissions, or every player will destroy your world![/COLOR] | ||
[COLOR=#0000ff]Have fun playing with WorldEditArt![/COLOR][/B] | ||
FAQ | ||
- [I]****, there are no any commands when I check my commands on console! Shouldn't console have permission to all commands?[/I] | ||
- [I]Why are there only a few commands when I used [U]//[/U]?[/I] | ||
Please read the wiki. The help page only shows the commands you can currently use. | ||
When you are on console, there are no commands that you could use since you are not in-game. Please join the game to use the commands. | ||
When you are in-game, if you hadn't made a selection, you don't have access to commands like //set since these commands | ||
Info | ||
https://github.com/PEMapModder/Small-ZC-Plugins/wiki/WorldEditArt-%7C-Home | ||
Support | ||
https://github.com/PEMapModder/Small-ZC-Plugins/issues/ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bin | ||
=== | ||
A directory that stores compiled binaries (.phar files) of commits |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
--- | ||
name: WorldEditArt | ||
author: PEMapModder | ||
version: 2.0.0_gamma_dev_#0 | ||
api: | ||
- 1.13.0 | ||
load: POSTWORLD | ||
main: pemapmodder\worldeditart\WorldEditArt | ||
description: A powerful advanced world editor | ||
website: https://github.com/PEMapModder/Small-ZC-Plugins/tree/master/WorldEditArt | ||
permissions: | ||
wea: | ||
description: Allows using all WorldEditArt commands | ||
children: | ||
wea.cmd: | ||
description: Allows using the command | ||
wea.anchor: | ||
description: Allows using //anchor | ||
wea.copy: | ||
description: Allows using //copy | ||
wea.cuboid: | ||
description: Allows using //cuboid | ||
wea.cut: | ||
description: Allows using //cut | ||
wea.cylinder: | ||
description: Allows using //cylinder | ||
wea.desel: | ||
description: Allows using //desel | ||
wea.macro: | ||
description: Allows using all subcommands of //macro | ||
children: | ||
wea.macro.start: | ||
description: Allows using //macro start | ||
wea.macro.end: | ||
description: Allows ending a macro by all means | ||
children: | ||
wea.macro.end.ng: | ||
description: Allows using //macro ng | ||
default: true | ||
wea.macro.end.save: | ||
description: Allows using //macro save | ||
wea.macro.wait: | ||
description: Allows using //macro wait | ||
wea.macro.pause: | ||
descrition: Allows using //macro pause | ||
wea.macro.resume: | ||
description: Allows using //macro resume | ||
wea.paste: | ||
description: Allows using //paste | ||
wea.pos: | ||
description: Allows using //pos1 and //pos2 | ||
wea.replace: | ||
description: Allows using //replace on all shapes of selections | ||
children: | ||
wea.replace.cuboid: | ||
description: Allows using //replace for cuboid selections | ||
wea.replace.cylinder: | ||
description: Allows using //replace for cylinder selections | ||
wea.replace.sphere: | ||
description: Allows using //replace for sphere selections | ||
wea.tool: | ||
description: Allows using all subcommands that modify selected tools | ||
children: | ||
wea.tool.jump: | ||
description: Allows using //jump | ||
wea.tool.wand: | ||
description: Allows using //wand | ||
wea.set: | ||
description: Allows using //set on all shapes of selections | ||
children: | ||
wea.set.cuboid: | ||
description: Allows using //set for cuboid selections | ||
wea.set.cylinder: | ||
description: Allows using //set for cylinder selections | ||
wea.set.sphere: | ||
description: Allows using //set for sphere selections | ||
wea.sphere: | ||
description: Allows using //sphere | ||
wea.test: | ||
description: Allows using //test on all shapes of selections | ||
children: | ||
wea.test.cuboid: | ||
description: Allows using //test for cuboid selections | ||
wea.test.cylinder: | ||
description: Allows using //test for cylinder selections | ||
wea.test.sphere: | ||
description: Allows using //test for sphere selections | ||
... |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
# For unspecified damage values and infinite maximum integers, put -1 | ||
defaultConfig: | ||
# the item to be used as a wand | ||
wand: | ||
id: 294 | ||
damage: -1 | ||
# the item to enable jump | ||
jump: | ||
id: 345 | ||
damage: -1 | ||
|
||
# options related to safety (avoid accidental destruction) | ||
safety: | ||
# when safe mode is enabled, only areas tagged as "under construction" can be edited. | ||
safeMode: false | ||
# when set to true, users have to run the //sudo command to enable WorldEditArt commands. | ||
sudoRequired: true | ||
|
||
# options related to optimization (to save memory, to reduce lag, etc.) | ||
|
||
# max number of sudoers at the same time | ||
max-sudoers: -1 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
/* | ||
* Small-ZC-Plugins | ||
* | ||
* Copyright (C) 2015 PEMapModder and contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* @author PEMapModder | ||
*/ | ||
|
||
namespace pemapmodder\worldeditart; | ||
|
||
use pemapmodder\worldeditart\user\PlayerSession; | ||
use pocketmine\event\Listener; | ||
use pocketmine\event\player\PlayerQuitEvent; | ||
|
||
class SessionManager implements Listener{ | ||
/** @var PlayerSession[] */ | ||
private $playerUsers = []; | ||
public function quit(PlayerQuitEvent $event){ | ||
if(isset($this->playerUsers[$event->getPlayer()->getId()])){ | ||
$this->playerUsers[$event->getPlayer()->getId()]->finalize(); | ||
unset($this->playerUsers[$event->getPlayer()->getId()]); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace pemapmodder\worldeditart; | ||
|
||
|
||
use pocketmine\plugin\PluginBase; | ||
|
||
class WorldEditArt extends PluginBase{ | ||
public function onEnable(){ | ||
$this->saveDefaultConfig(); | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
src/pemapmodder/worldeditart/libworldedit/space/CuboidSpace.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
|
||
/* | ||
* Small-ZC-Plugins | ||
* | ||
* Copyright (C) 2015 PEMapModder and contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* @author PEMapModder | ||
*/ | ||
|
||
namespace pemapmodder\worldeditart\libworldedit\space; | ||
|
||
use pocketmine\level\Position; | ||
use pocketmine\math\Vector3; | ||
|
||
class CuboidSpace implements Space{ | ||
/** @var int */ | ||
private $x1, $x2, $y1, $y2, $z1, $z2; | ||
/** @var string */ | ||
private $levelName; | ||
public function serialize(){ | ||
return "$this->x1:$this->x2:$this->y1:$this->y2:$this->z1:$this->z2:$this->levelName"; | ||
} | ||
public function unserialize($serialized){ | ||
list($x1, $x2, $y1, $y2, $z1, $z2, $levelName) = unserialize($serialized); | ||
$this->x1 = (int) $x1; | ||
$this->y1 = (int) $y1; | ||
$this->z1 = (int) $z1; | ||
$this->x2 = (int) $x2; | ||
$this->y2 = (int) $y2; | ||
$this->z2 = (int) $z2; | ||
$this->levelName = $levelName; | ||
} | ||
public function isInside(Vector3 $v){ | ||
return | ||
min($this->x1, $this->x2) <= $v->x and | ||
min($this->y1, $this->y2) <= $v->y and | ||
min($this->z1, $this->z2) <= $v->z and | ||
max($this->x1, $this->x2) >= $v->x and | ||
max($this->y1, $this->y2) >= $v->y and | ||
max($this->z1, $this->z2) >= $v->z and | ||
!($v instanceof Position) or $v->getLevel()->getName() === $this->levelName; | ||
} | ||
public function isValid(){ | ||
return isset($this->x1, $this->x2, $this->y1, $this->y2, $this->z1, $this->z2); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
/* | ||
* Small-ZC-Plugins | ||
* | ||
* Copyright (C) 2015 PEMapModder and contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* @author PEMapModder | ||
*/ | ||
|
||
namespace pemapmodder\worldeditart\libworldedit\space; | ||
|
||
use pocketmine\math\Vector3; | ||
|
||
interface Space extends \Serializable{ | ||
public function isInside(Vector3 $v); | ||
} |
53 changes: 53 additions & 0 deletions
53
src/pemapmodder/worldeditart/provider/userconfig/UserConfig.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
/* | ||
* Small-ZC-Plugins | ||
* | ||
* Copyright (C) 2015 PEMapModder and contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General private License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* @author PEMapModder | ||
*/ | ||
|
||
namespace pemapmodder\worldeditart\provider\userconfig; | ||
|
||
use pemapmodder\worldeditart\WorldEditArt; | ||
|
||
class UserConfig{ | ||
const UNSPECIFIED_INT = -1; | ||
/////////// | ||
// ITEMS // | ||
/////////// | ||
/** @var int */ | ||
private $wandId; | ||
/** @var int */ | ||
private $wandDamage; | ||
/** @var int */ | ||
private $jumpId; | ||
/** @var int */ | ||
private $jumpDamage; | ||
|
||
//////////// | ||
// SAFETY // | ||
//////////// | ||
/** @var bool */ | ||
private $safeMode; | ||
/** @var bool */ | ||
private $sudoRequired; | ||
/** @var int */ | ||
private $blockChangeThreshold; | ||
|
||
////////////////// | ||
// OPTIMIZATION // | ||
////////////////// | ||
private $maxUndoQueue = 5; | ||
private $perSecondEdits = 5; | ||
|
||
public function __construct(WorldEditArt $main){ | ||
|
||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/pemapmodder/worldeditart/provider/userconfig/UserConfigDataProvider.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
/* | ||
* Small-ZC-Plugins | ||
* | ||
* Copyright (C) 2015 PEMapModder and contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* @author PEMapModder | ||
*/ | ||
|
||
namespace pemapmodder\worldeditart\provider\userconfig; | ||
|
||
use pemapmodder\worldeditart\user\User; | ||
|
||
interface UserConfigDataProvider{ | ||
public function loadUserConfig(User $user); | ||
public function saveUserConfig(User $user, UserConfig $config); | ||
} |
Oops, something went wrong.